Hey Guys,
Working on a tool right now that will copy a shapenode to all the selected
transform nodes. But it seems to be giving me instances when I duplicate the
shape. what's going on here?
import pymel.core as pm
def copyShape( objects ):
source = objects.pop()
for target in objects:
pm.delete( target.getShapes() )
dupShape = pm.duplicate( source.getShape(), addShape=True )[0]
dupShape.setParent( target, add=True, shape=True )
source.deselect()
sel = pm.ls(sl=1)
copyShape(sel)
--
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 view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/f22cbfcf-3a23-4b13-a2fb-d76e380252df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.