Hey man For combining curve it is better to put all shapes of them inside one transform node.
Before: [image: Inline image 1] After: [image: Inline image 2] On Thu, Oct 20, 2016 at 7:12 AM, Kevin C. Burke <[email protected]> wrote: > > > Hello, > I'm trying to write a script for combining multiple NURBS curves. If I > scale the curves, then try to combine them, they don't keep their > transformations. > > import pymel.core as pm > > curves = pm.selected() > > for curve in curves: > pm.makeIdentity(curve, apply=True, translate=1, rotate=1, scale=1) > > for curve in curves[1:]: > shape = curve.getShape() > pm.parent(shape, curves[0], relative=True, shape=True) > pm.delete(curve) > > > For some reason, the makeIdentity command (aka Freeze Transformations) > won't run before the parent command. I've tried: > > - time.sleep > - flushIdleQueue: froze Maya 2016 > - parenting the transforms to the master transform (curves[0], below) > before running makeIdentity > > If I take out the parent command, the makeIdentity works as expected. > > I'm running out of ideas. Can anyone help please? Thank you! > > > > <https://lh3.googleusercontent.com/-OHhLlgUlePI/WAg88lEUfZI/AAAAAAABeGY/gxgDNVlJxJ8pf9ETL77l5ga2fg1dtyDewCLcB/s1600/Capture.PNG> > > -- > 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/2d9a378d-8a1f-49a0-b60a- > 6c8d14ea39a3%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/2d9a378d-8a1f-49a0-b60a-6c8d14ea39a3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Bests, madoodia -- 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/CADvbQw%2BU-2Esk_NmvHo3sKQfX-466E_uMgL_Kvm%2B3apq5pz10Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
