value vs knob command
The simplicity of tcl's command based nature makes it nice and easy to use in Nuke's text knobs, such as labels (you can actually use tcl that way in pretty much any knob in Nuke that can take an expression).
The value and knob commands in particular are very handy to show node properties in the DAG.
In a node's label, simply type the following:
1 |
[value <knob name>]
|
Here is an example for the exposure node's "mode" knob:
1 2 |
[value mode] rgb: [value red], value green], [value blue] |
Note that the "value" command will resolve any expressions or animation curves for you, and return their respective current value.
If you want to get the literal content of a knob without prior resolution, use the "knob" command instead:
1 |
[knob <knob name>]
|
1 |
[knob rotate]
|
And here is a combo of value and knob command:

Comments
[expr [value groupNode.hasRe vision]?"[ knob groupNode.revis ion]":""]
[ knob groupNode.revis ion] on its own returns 006
[if {[knob groupNode.hasRe vision]==true} {return [knob groupNode.revis ion]} else {return nope}]
Thanks for your help guys.
I would like to transfer the label of a cascaded node into the nodal stream.
In the second node I put [value input.label] and it works without problems, but from the third node the value of the expression of the second is always written and not the value. It doesn't change if I use [knob input.label] in the second. I could not find alternatives, I tried everything possible with my (little) current knowledge.
Thanks in advance for any advice.
RSS feed for comments to this post