I would like to create a callback that runs some commands on a node on viewer 
update. I.E. just before the DAG gets evaluated.


What would be the best way to go about doing this?
I have tried adding a PythonKnob with the command I would like to run.
I have also tried registering a function with 
nuke.callbacks.addBeforeFrameRender()
Neither are giving me what I was hoping for.

I basically am trying to have a Roto node pass info to downstream node when 
there is a change in the Roto data.

It looks something like this example where rpNode is a Roto Node:
<code>
strKnob=nuke.String_Knob('rotostream')
rpNode.addKnob(strKnob)
pyknob = nuke.PythonKnob('roto2yaml')
pyknob.setValue("thisNode().knob('rotostream').setValue(splineUtils.roto2yaml(nuke.thisNode()))")
               
rpNode.addKnob(pyknob)
</code>
The knobs are created just fine..How can I force the PythonKnob to be evaluated?



_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to