Hi. I have a situation where I have a large number of objects coming from modo
after being modelled. Alembic is the best way to transfer everything by far,
however the shape node and the transform node come in with the same name. This
causes problems in other scripts. Ive tried to use this to rename the shape
node, but because the transform has the same name, it wont work. Is there a
quick fix for this?
#RENAME THE SHAPE NODE TO BE UNIQUE
for i in cmds.ls(sl=1):
cmds.select(cl=1)
cmds.select(i)
get_shape = cmds.listRelatives(i, shapes=1)[0]
get_shape_fixed = get_shape + '_shape'
cmds.rename(get_shape, get_shape_fixed)
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.