Or rather, what's the earliest point after construction that is guaranteed
to be called at which I can query a knob's value?

So far, I've found the earliest I can do that is in the second pass of
knobs(), after the makeKnobs pass, and provided the knob I'm interested in
has the EARLY_STORE flag set.

However, while the makeKnobs() pass seems to always be called immediately
after construction, a second pass to knobs() is not called until a knob
changes, or the control panel is opened, or the Op gets validate called on.
At least from what I can tell...

So, my problem comes when you have a node that's not part of the tree, but
its knobs might be expression-linked to. In that case, I can see the Op gets
constructed and knobs() gets called for the makeKnobs() pass, but neither
validate() or a second knobs() pass is called, so I can't rely on them if I
want to get/set knob values of a node that's outside the Viewer/Render tree.

Is there a way within my Op to handle a scenario where I want to get/set
some knobs as soon as possible after construction, at a point that's
guaranteed to be called? Or is this something that should be better dealt
with using the Python API? (i.e. with an onCreate callback)

I thought of maybe forcing a second call to knobs() from within the
makeKnobs() pass, something like:

if ( f.makeKnobs() ) {
    knobs(knob_closure_here)
}

But I don't know if A) This is a good idea at all. B) How to build the right
Knob_Closure to pass to the knobs() function.

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

Reply via email to