Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Duplicate Special "World"

Duplicate Special "World"

dg3duy
Collaborator Collaborator
305 Views
2 Replies
Message 1 of 3

Duplicate Special "World"

dg3duy
Collaborator
Collaborator

I wonder how to get the copy to be world, I don't see in the documentation about that, any clues?
I can only find duplicate information.
https://help.autodesk.com/cloudhelp/2020/CHS/Maya-Tech-Docs/CommandsPython/duplicate.html
world.png

0 Likes
Accepted solutions (1)
306 Views
2 Replies
Replies (2)
Message 2 of 3

Kahylan
Advisor
Advisor
Accepted solution

Hi!

 

Thats because this flag triggers a secondary command that parents the created objects to the root.

You can achieve it like this:

import maya.cmds as mc
duplicates = mc.duplicate(whatever other settings you need, rr = True)
mc.parent(duplicates, w = True)

For this to work this simple you need the "rr" Flag in your duplicate command, otherwise it will also parent all the leafnodes to the root.

 

I hope it helps!

Message 3 of 3

dg3duy
Collaborator
Collaborator

@Kahylan Fantastic! thank you very much

0 Likes