PDA

View Full Version : Instancing Dilema....


EverZen
11-28-2007, 11:43 AM
I am instancing groups from within a tool, and getting some results I dont understand. I want the instanced group to behave exactly as it would as if I had used the edit menu --> Clone --> instance tool.

I am using the command

maxOps.cloneNodes ObjGroup cloneType:#instance NewNodes:&Ob

to create my new group. The ObjGroup is an array containing the group head and the children.

EDIT: As I understand this command instances the controller too...I think, whereas the default copy options will copy the controller.... I need to copy the controller, can this be done?

If I make a clone using this command then I can move the new group around fine, but if I open the group and move the children, then the transform changes I make to the children are replicated in the original group! This does not happen if I use the edit menu --> Clone --> instance tool. Using this tool you can open the group and adjust the children and any other instances of the group remain uneffected by the movements.

So in short my problem seems to be something like the tranforms (controller) of the children are also instancing as well as the shape! meaning I cannot move a child, without the same child moving in the 100 other groups! This is seriously effecting a couple of my scenes. If someone could please explain to me how to instance in the same way as the standard tool, then I would really appreciative!

Thanks everyone!

Rich

vize
11-28-2007, 01:35 PM
try this:

maxOps.cloneNodes ObjGroup cloneType:#instance NewNodes:&Ob
InstanceMgr.GetInstances ObjGroup &inst
InstanceMgr.MakeControllersUnique inst ObjGroup.transform.controller #group


or look here http://discussion.autodesk.com/thread.jspa?threadID=608499

EverZen
11-28-2007, 01:42 PM
Bang on the money :) Thanks vize, thats a really concise way of doing it. I have just had a play with those commands, and it opens up the possibilities of leaving certain controllers instanced and releasing others from being instanced, which could be very powerful.

Thanks for you time :)

Rich

CGTalk Moderation
11-28-2007, 01:42 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.