I'm currently developing a treeview-plugin for all my scripts/presets etc.. I was wondering if it is possible to drag and drop items of said treeview directly to my layout.
I'm currently thinking along those lines:
In my declared
ListItem (obj) I have a property of
Instance which can hold the reference to the CommandPlugin for each script.
@property def Instance(self): # of course this just a placeholder (but a valid one...) return c4d.plugins.FindPlugin(600000174)
GenerateDragArray I will create an Array with my said Instance/Reference, also I've tried setting different flags for
def GenerateDragArray(self, root, userdata, obj): if obj.IsSelected: return [obj.Instance] return None def GetDragType(self, root, userdata, obj): return c4d.DRAGTYPE_COMMAND def SetDragObject(self, root, userdata, obj): return obj.Instance
...but, sadly it's NOT working as I would expect...
Is this possible with python in general, or a limitation? What am I missing?