On 27/04/2016 at 09:21, xxxxxxxx wrote:
Cinema 4D Version: 14
Platform: Windows ;
Language(s) : C++ ;
I've been looking into the Drag&Drop functionality for GeUserAreas and I can't get it to work. In my GeDialog I have GeUserAreas that correspond to materials in separate files. My goal is for the user to be able to start dragging a GeUserArea to the Material Manager or over an object and have it placed properly.
Having it dragged to the Material Manager works correctly, when I try doing the same over an object it only creates an empty texture tag.
I started my code based off a forum post that had the same question,
In my GeUserArea's InputEvent() I have the HandleMouseDrag function
if (data.GetLong() == BFM_INPUT_MOUSE)
if (data.GetLong() == BFM_INPUT_MOUSELEFT)
if(HandleMouseDrag(msg, DRAGTYPE_ATOMARRAY, arr, 0) == TRUE)
I also created a SceneHook plugin based off the responses to some of the forum posts. When I run the plugin my SceneHook plugin does not receive any of the messages that it seems it should be, I receive no print outs from the function running.
Bool SettingsSceneHook::Message(GeListNode* node, LONG type, void* data)
if(type == MSG_DESCRIPTION_CHECKDRAGANDDROP)
GePrint("Description Check Drag&Drop");
if(type == MSG_MATERIALDRAGANDDROP)
if(type == MSG_DRAGANDDROP)
I've been looking into this for a couple of days now and I'm not sure where the issue is, any assistance would be greatly appreciated.
On 28/04/2016 at 00:52, xxxxxxxx wrote:
Directly dropping the newly created material over an object can't work as it doesn't exist in the document and the TextureTag can't resolve its link.
The dropped material has to be inserted in the document before so I'm not sure how your plugin workflow should be.
About the SceneHook messages I don't think they can be useful in such situation:
On 29/04/2016 at 11:02, xxxxxxxx wrote:
Thank you for the quick response. I thought that that might be the case, just wanted to make sure before moving forward.