On 17/01/2015 at 00:11, xxxxxxxx wrote:
Cinema 4D Version: 16
Platform: Windows ;
Language(s) : C++ ;
In the prefs, there's an option to set where new objects are inserted. [Top, Previous, Next, Parent, Child, Root]
But I want to move my plugin Object to a specific spot in the Object Manager on creation.
_<_img src="http://www.genemagtoto.com/c4d/insert_issue.png" height="216" width="482" border="0" /_>_
Basically I want my plugin object to be inserted after all selected objects, as it's a generator that reads the selected objects and I want to avoid priority issues.
The problem is, C4D's insertion does not work when multiple objects are selected. Instead, the object is placed at the very top of the OM list.
There's no document in my object's Init() method, so I can't do it there.
I'm trying to do it in Message() via MSG_MENUPREPARE, but C4D locks up when I try calling node->InsertAfter(LastSelectedObject) in it.
Any way of doing it?