Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I want to create a MyRoot object under an object that is not allowed to be dragged by the user (like the Root under the CA object), I set DRAGANDDROP_FLAG_FORBID to the flag in the DragAndDrop struct of MSG_DRAGANDDROP, but I can still drag it out of the parent.
MyRoot
Root
CA
DRAGANDDROP_FLAG_FORBID
flag
DragAndDrop
MSG_DRAGANDDROP
This is the code in Message().
Message()
Bool MyRoot::Message(GeListNode* node, Int32 type, void* data) { if (type == MSG_DRAGANDDROP) { DragAndDrop* dnd = static_cast<DragAndDrop*>(data); if (dnd == nullptr) return false; if (dnd->flags & DRAGANDDROP_FLAG_SOURCE) dnd->flags |= DRAGANDDROP_FLAG_FORBID; } return true; }
Hi @AiMiDi, MSG_DRAGANDROP will be received when the host receive a drag, I didn't tried but I guess only dialog can react to this message. In you case you will need to set the NBIT NBIT_NO_DD like so op.ChangeNBit(c4d.NBIT_NO_DD, c4d.NBITCONTROL_SET).
MSG_DRAGANDROP
NBIT_NO_DD
op.ChangeNBit(c4d.NBIT_NO_DD, c4d.NBITCONTROL_SET)
Cheers, Maxime.