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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to