f
f
Apple Store
Global SectionArticlesBookstoreDictionaryDownloadsDVDsEventsForumsGalleryJob ListingsNewsNewslettersSchools
 Advanced Search
USER: PASS:  Login  Register

Subscribe
Site Links
Home > Nuke > Tutorials > tcl scripting > Nuke and Tcl - basics I > Page 3 Change background colorChange background colorChange background colorChange background color
Nuke and Tcl - basics I
Tutorial by frank rueter
Login to add a Bookmark 0 votes for an average rating of 0.00

Updated:   05/18/06

Works on:    Windows  Linux  MacOS-X
Nuke Versions:   4.x
Readership Level:   Basic
Owner:   rueter
Author Name:  frank rueter

Using selections

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
examples:

print available knobs for the currently selected node

knobs [selected_node]]

click for larger version

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]



.




Continue Tutorial:  previous page 1 2 3 4 next page

Login to add a Bookmark 0 votes for an average rating of 0.00

Related Learning Tools
Nuke Related DVDs

No Results.
Nuke Related Books



The Art and Science of Digital Compositing
Global DVDs



Shake 101: Interface and Workflow

Top Rated Nuke Tutorials

1. proc to toggle viewers inputs on and off by frank rueter (05/19/06)
2. Nuke and Tcl - intro by frank rueter (05/17/06)
3. Nuke and Tcl - basics I by frank rueter (05/18/06)
4. Nuke and Tcl - basics II by frank rueter (05/22/06)
5. Iteration thru a script by throb (05/19/06)


Related Tips


Warning: mysql_result() [function.mysql-result]: Unable to jump to row 0 on MySQL result index 36 in /var/www/inc/fx_functions2.php on line 759

No Results to Display


More Tutorials by rueter

1. proc to toggle viewers inputs on and off by frank rueter (05/19/06)
2. Nuke and Tcl - basics I by frank rueter (05/18/06)
3. Nuke and Tcl - basics II by frank rueter (05/22/06)
4. Creating simple user interfaces by frank rueter (05/19/06)
5. camera trigonometry by frank rueter (11/01/06)






Sponsors

Sponsor

Contact Us | Post Jobs | Post News | Post Events