|
Hey,
I need a scriptjob to run whenever an enum attribute changes on a specified node. The problem I’m having is that it also runs the job whenever I change the frame in the timeline or during playback.
leftHandJob = scriptJob(ac=[u'leftHandIkFkSwitch.IkFkSwitcher',u'leftHandSwitcher()'], kws=True)
This is the faulty job.
I tried to fix it by adding in timechanged=u’pass’, but to no avail. It only lets you do one condition.
leftHandJob = scriptJob(ac=[u'leftHandIkFkSwitch.IkFkSwitcher',u'leftHandSwitcher()'], kws=True, tc=u'pass') # Error: RuntimeError: You must specify exactly one of the following flags: -ct -cf -cc -e -ie -ac -con -tc -uid -lc -le -j -k -ka -ex #
I didn’t realize this before because there were no markers on my screen, but since I added in a keyframe element to the function, it shows up on every single frame when I scrub through the timeline.
Is there a way to get this function to run when and only when the named attribute changes?
Any help or suggestions would be greatly appreciated, Thanks!
~Sean
|