[Python, Maya 2024] Problem with scriptJob

[Python, Maya 2024] Problem with scriptJob

Br0ken1334
Advocate Advocate
738 Views
1 Reply
Message 1 of 2

[Python, Maya 2024] Problem with scriptJob

Br0ken1334
Advocate
Advocate

Hi!

I'm trying to do 

maya.cmds.scriptJob( runOnce=True, attributeChange=['persp.rotateY', doSomething] )

But  "doSomething" is triggered even if rotateY doesn't changed.

In Maya 2019 it worked correctly.

0 Likes
739 Views
1 Reply
Reply (1)
Message 2 of 2

mcw0
Advisor
Advisor

ScriptJobs can be tricky.  Have you considered a global variable to store the previous ry value?  Then you can do an extra comparison/condition in your "doSomething" code.

0 Likes