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. :)


On Mon, Nov 16, 2015 at 1:46 PM Mahmoodreza Aarabi <[email protected]>
wrote:

> 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?
> ​
>
> On Mon, Nov 16, 2015 at 9:46 PM, Alan Fregtman <[email protected]>
> wrote:
>
>> 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!
>>
>>
>> On Mon, Nov 16, 2015 at 12:54 PM Alan Fregtman <[email protected]>
>> wrote:
>>
>>> 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
>>>
>>>
>>> --
>> 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/CAN%3DPNLHFGcTOqY%3DkMpaACHPkH0qoSNHmOxLjW3t1w-umZuNVHQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/python_inside_maya/CAN%3DPNLHFGcTOqY%3DkMpaACHPkH0qoSNHmOxLjW3t1w-umZuNVHQ%40mail.gmail.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%2BaqoEiAqV3dS%3DKOFpk9BcDXYEMJFZ-uyNvQi0BgQ3j8w%40mail.gmail.com
> <https://groups.google.com/d/msgid/python_inside_maya/CADvbQw%2BaqoEiAqV3dS%3DKOFpk9BcDXYEMJFZ-uyNvQi0BgQ3j8w%40mail.gmail.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/CAN%3DPNLGVVfyyqa5eQz08Sdd2L%2B8N0s3qiApEmXy721S%3DEGcoXA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to