Hi All!
I'm currently writing my first ever Python script in Maya and I'm trying to attach a function call to an arbitrary action (selection change here). The problem is that when I run through my code, the function call in the scriptJob is executed immediately. Is there some argument that I'm missing to keep job from executing until after all other code has been run? Below is a snippet of my code:
mc.select(cameraUp, r = True)
mc.setToolTo('moveSuperContext')
mc.scriptJob(e = ["selectionChanged", attachCameraToCurve(curve, camera, 100)], ro = True)
I've also tried this with the toolChanged event, I suspect the job is being registered before the above commands complete and is being immediately triggered.
Thanks!