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

Subscribe
Site Links
Home > Nuke > Tutorials > tcl scripting > Nuke and Tcl - basics I > Page 4 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

Looping

One of the most useful things when using tcl in Nuke is the looping functionality. There are several ways to create loops in tcl but the "foreach" method is probably the most useful and easiest one at first so let's stick with that one for now.


syntax:

foreach variable list {}


this will loop through all elements in a list (i.e. list of nodes). each time it loops the variable will hold the current item in the list.

examples:

this line reads the name of all selected nodes and prints them to the shell

foreach cur_node [selected_nodes] {puts [knob $cur_node.name]}

click for larger version

changing the node colour for all selected nodes

foreach cur_node [selected_nodes] {knob $cur_node.tile_color 3}

click for larger version

the following line will change the knob called "size" for all selected nodes. In this case you will have to make sure that you only have nodes selected that have that knob, otherwise this will produce an error:


foreach cur_node [selected_nodes] {knob $cur_node.size 10}

click for larger version




.




Continue Tutorial:  previous page 1 2 3 4 

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: Effective Keying Techniques

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 37 in /var/www/inc/fx_functions2.php on line 759

No Results to Display


More Tutorials by rueter

1. texture warping by frank rueter (11/21/06)
2. Creating simple user interfaces by frank rueter (05/19/06)
3. Nuke and Tcl - intro by frank rueter (05/17/06)
4. proc to toggle viewers inputs on and off by frank rueter (05/19/06)
5. Nuke and Tcl - basics II by frank rueter (05/22/06)






Sponsors

Sponsor

Contact Us | Post Jobs | Post News | Post Events