Kevin C. Burke
2016-10-20 03:42:06 UTC
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!
<Loading Image...
>
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!
<Loading Image...
--
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 python_inside_maya+***@googlegroups.com.
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.
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 python_inside_maya+***@googlegroups.com.
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.