Can you be more specific about what doesn't work as expected?
On Wed, Sep 28, 2016 at 1:37 AM vilkdage <[email protected]> wrote: > Any ideas why it only works on shapes with surfaces (polygon and NURB > primitives, but not curves or Volume Primitives)? > > > import pymel.core as pm > > selected = pm.ls (selection = True) > if len(selected) == 1: > pm.warning('Must select 2 or more objects...'); > elif len(selected) >= 2: > selected.reverse() > sel_end = selected[0] > sel_child = selected[1:] > pm.parent(sel_child, sel_end) > for allObjects in sel_child: > pm.makeIdentity(allObjects, a = True, t = True, r = True, s = True) > findShape = pm.listRelatives(allObjects, s = True, ad = True) > pm.select(d = True) > pm.parent(findShape, sel_end, r = True, s = True) > pm.delete(allObjects) > pm.select() > > -- > 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/07de4863-5a93-4e4e-8902-49cb68326774%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/07de4863-5a93-4e4e-8902-49cb68326774%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAPGFgA05HHXhdKMdYf54DV3kh_xvYjRrEQ3%2B0JOeUCwc6SreyQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
