THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/08/2006 at 07:26, xxxxxxxx wrote:
Cinema 4D Version: 9.6
Language(s) : C++ ;
Is there any way of locking the order of objects in the regular Cinema 4D object browser?
Basically, I create a parent with (N) number of children, and I want to block the user's ability to re-order these children. More important, I want to make it so these children can't be moved out from the parent.
Is this at all possible with the C++ SDK? Thank you!
On 20/08/2006 at 10:40, xxxxxxxx wrote:
I have a similar thing used in COFFEE, so I suppose it would be better/safer with C++.
In my case I have given each child a unique name (with a "++" in front and after not to have the user have a identical name somewhere else).
My parent is put in a linkfield so I can check the children through it, for both name and position in the OM hierarchy.
I suppose each object have an internal unique doc ID so you might use that for checking them and replace/rename them if needed.
If it is the case that the user should not select the children at all, you might only need to make them unselectable (re-set the AOBJ bit if it is wrong).
There is most likely a more elegant solution and I would like to have some tips about it as well:)
On 21/08/2006 at 06:34, xxxxxxxx wrote:
Thank you for your insight Lennart. Can you explain how I make them unselectable?
How do I receive the messages that my children have changed order or are being dragged in the Object Browser?
Is there anyway to replicate the behaviour that C4D uses to tell the user an object can't be moved, like showing the circle with the line through it? I would really prefer to just not allow the user to move these children at all, while still allowing them to be selected.
On 21/08/2006 at 12:34, xxxxxxxx wrote:
In the SDK look up, under BaseList2D, SetBit/GetBit. Check the flag for BIT_AOBJ and reset it to off. This way the user cannot select it.
To have the object selectable but not movable look up the Call Command for the ProtectTag and it add it to the object. Then have the document check that it is there, and if not add it.
On 22/08/2006 at 16:59, xxxxxxxx wrote:
Got it all working great, using a combination of your suggestions.
One last question for anybody who knows. This isn't crucial, but is there any way in the SDK to access/change the mouse icon when dragging in the Object Browser, to let the user know that moving the children is not permitted?
On 24/08/2006 at 13:03, xxxxxxxx wrote:
No, I don't think you have any control over the mouse at that point.