Hey all,

Been going out of my mind the last few days and hoping one of you geniuses
might be able to help ease my pain.

Basically I need to script the use of O_Solver to set three keyframes.

I'm running into issues though because of the way Nuke handles threads.  If
I do something like this all in the main thread:

solverNode = nuke.toNode("O_Solver1")

addKeyKnob = solverNode.knob("addAnalysisKey")

print "Jumping to frame %d" % firstFrame

nuke.frame(firstFrame)

print "Setting Key"

addKeyKnob.execute()


Then what happens is the key gets set, but NOT on the proper frame.  Nuke
doesn't seem to have finished setting the frame before the next call, so
the key ends up being set on whatever frame the playhead happened to be on.

So I then reworked things to do it all in a subthread.  This worked
perfectly, but then I had the problem of knowing when it was done.  If I
tried to block the main thread while waiting on the subthread, then Nuke
again wouldn't properly set the keyframes.  Unfortunately it is vital that
I be able to wait and not return until all keyframes are set :(

Any thoughts?

-- 
- John Vanderbeck
- Prime Focus World, Vancouver
- 2D Pipeline TD
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to