GeUserArea.GetDragObject() for xpresso node
-
Hi,
I am working on drag and drop operation of UserArea.
What I would like to do is replicate the behavior of adding a node in the XPresso Editor: drag the text of the node name in the X-Pool and drop it into the node graph, and a new node will be created.For UserArea, there is GetDragObject() to get the dragged information, and an example of its use is shown in this thread.
However, using this method to drag an xpresso node name from X-Pool to the UserArea returns the following results.{'type': 400007002, 'object': None}
400007002 is c4d.DRAGTYPE_GVNODE_STORE, so we know that something related to the XPresso node is being dragged, but 'object' is None, so we cannot identify which node is being dragged.
Hopefully there is a way to get the specific value of the dragged node (e.g. c4d.ID_OPERATOR_BITMAP).Any help would be greatly appreciated.
-
Hi sadly this is not supported in Python and to be honest it won't be implemented soon if it ever get implemented since that's the first time we receive this feature request since Python and xpresso exist so this land at the bottom of all our feature request.
Note that in C++ you can handle it like that:
Cheers,
Maxime. -
Thanks for the clarification and the C++ example!
I'll try to think of other ways. -
Hey everyone,
Just as an FYI:
cinema::GvCopyBuffer
is not a public type. Just saying this so that future C++ users do not run against a wall here. One might be able to wiggle through with a forward/dummy deceleration ofGvCopyBuffer
, but officially this is not supported in the public C++ API either. And we therefore cannot provide forum support for this in C++ either.Cheers,
Ferdinand