Cannot seem to permanently set rotateOrder to a different value

27 views
Skip to first unread message

Alan Fregtman

unread,
Nov 16, 2015, 12:54:33 PM11/16/15
to Maya Python List
Hey guys,

I'm setting rotateOrder on a transform node and it keeps changing back to xyz. I set an integer value on it, pymel tells me the value has changed when I read it, but when the script is finished, the value is not what I set it to.

What dark sorcery could be behind this? Am I not supposed to set the rotateOrder value with a attrib.set()? Any ideas?

Any help appreciated.
Thanks,
   -- Alan


Alan Fregtman

unread,
Nov 16, 2015, 1:16:34 PM11/16/15
to Maya Python List
For the record I tried via pymel, via maya.cmds and even via mel.eval() on a setAttr line, and they all say it was set, then it turns out it wasn't. Very strange!

Mahmoodreza Aarabi

unread,
Nov 16, 2015, 1:47:00 PM11/16/15
to python_in...@googlegroups.com

Hello Alan
i tried this now and it works

from maya import cmds
jnt = str(cmds.ls(sl=True)[0])
cmds.setAttr(jnt + '.rotateOrder', 2) # zxy

it does not work for you at all?


--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAN%3DPNLHFGcTOqY%3DkMpaACHPkH0qoSNHmOxLjW3t1w-umZuNVHQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--


Bests,
madoodia

Alan Fregtman

unread,
Nov 16, 2015, 6:15:41 PM11/16/15
to Maya Python List
Yep, it works for me too, but there was something else messing me up.

I had two simple'ish functions. One copies attributes by getting and setting values, one by one. That one claimed that rotateOrder had been set and modified correctly but then I had this other function to copy animation by hooking up animcurves from the source to the destination node. It's fairly innocent, and there is no animation on rotateOrder, yet somehow it appears that some other internal attribute manages to cause the value to reset.

In the end it was solved by changing the order of operations. I copy the attribute values first and THEN try to copy animation... That works.

Thank you for your help nonetheless. :)


Reply all
Reply to author
Forward
0 new messages