Instead of manipulating an explicit node you can use the one that is currently selected in the DAG. This is handy to get generic information from nodes without having to rewrite the command to update a node name.
syntax:
selected_node
selected_nodes
This will not return the node's name but it's ID so to get a selected node's name you would do something like this:
example:
puts
[knob [selected_node].name]
Again, you want Tcl to evaluate from the inside out: First you need it to find out the selected node's ID so you have to put "selected_node" into brackets to evaluate it first. Then you want to use that ID to find out it's name so you use brackets
for the knobs command just like before. Once the outer brackets are
evaluated you can print the result into the shell using "puts".
Another useful Nuke command is "knobs" to find out what knobs a certain node has:
syntax:
knobs {-a,w,d,v}
a,w,d andv are optional arguments to do the following:
- -v: list knob name and value pairs
- -a: list all knobs
- -w: write addUserKnob commands
- -d: list only knobs with non-default values
print available knobs for the currently selected node
knobs [selected_node]]

the following line will print all knobs for the currently selected node including some DAG specific things like position, thumbnails etc.
Also print the a knob/value pair instead of just listing the knob name.
knobs -av [selected_node]

Author: rueter
Submitted: 2006-05-18 16:25:03 UTC
Tags:
Software: Nuke
Views: 32,585
Related Items
-
Quill pen and ink bottle 3D Model
$20.00 (USD) -
Tire and Rim 3D Model
$9.00 (USD) -
I-Mac 3D Model
$30.00 (USD) -
Dinning chair and table 3D Model
$20.00 (USD) -
Quick and dirty medium/low res 45. Smith and Wesson handgun 3D Model
$25.00 (USD) -
CHLBR Batch Render plugin for nuke 8.x for Nuke 1.0.0 (nuke plugin)
$40.00 (USD) -
Bath and Shower Set 3D Model
$40.00 (USD) -
walnut bed and bedside table 3D Model
$40.00 (USD) -
Tiger I Initial Version 3D Model
$65.00 (USD)