Duplicate object without duplicating children?

Duplicate object without duplicating children?

Anonymous
Not applicable
1,290 Views
2 Replies
Message 1 of 3

Duplicate object without duplicating children?

Anonymous
Not applicable
Does anyone know of a way I can duplicate a control object (its a nurbs curve, if that matters) in my rig without duplicating everything below it? Our rigs are pretty complex, so duplicating and deleting the unneeded stuff isn't really desirable, if there's a way around it.

I'm trying to write a function that does this, but so far no luck.
0 Likes
1,291 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable
I would not have a control object that has children in a rig. I'd use constraints, not parenting. But anyway, if you need to duplicate an object without duplicating the children, select the transform and instance the shape node immediately below it. Now you have an instance, so duplicate that and then delete the instance.

string $shapes[] = `listRelatives -s`;
string $tmp[] = `instance $shapes`;
duplicate $tmp;
delete $tmp;



if you don't care that it's an instance, and you probably don't, since the control objects would all have the same shape anyway, the command is simply

instance `listRelatives -s`;
Message 3 of 3

Anonymous
Not applicable
Thanks!
0 Likes