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

Subscribe
Site Links
Home > Nuke > Tutorials > tcl scripting > Iteration thru a script > Page 1 Change background colorChange background colorChange background colorChange background color
Iteration thru a script
Tutorial by throb
Login to add a Bookmark 0 votes for an average rating of 0.00

Updated:   05/19/06

Works on:    Windows  Linux  MacOS-X
Nuke Versions:   4.x
Readership Level:   Basic
Owner:   throb
Author Name:  throb
Homepage:   http://throb.net

This very quick tutorial goes into a little more bits than Frank's excellent set. Kudos to Frank!

let's say you want to do certain things to a certain node type...
for instance, you want to change blurs only...

foreach $mynode [nodes] {
if {[class $mynode] == "Blur"} {
knob $mynode.size 10
}
}

This will iterate through the entire script, find all the nodes of type Blur and change their size to 10.
Now, if you want to find out the class of a node, this command does it:
class [selected_node]

if you want to take all the blur nodes and set their input to a specific read do this:

foreach $mynode [nodes] {
if {[class $mynode] == "Blur"} {
input $mynode 0 Read1
}
}

But Uncle Throbby, how do i use this with multiple input nodes??!?!
Well, captain...here it is..simple!

foreach $mynode [nodes] {
if {[class $mynode] == "Merge"} {
input $mynode 0 Read1
input $mynode 1 Read2
}
}


Ok, it's late...enough nerding for me!

.

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: Color Correction and Layers

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 throb

1. Linear Workflow in 3DSMax and VRay by Rob Nederhorst (08/31/05)
2. Iteration thru a script by throb (05/19/06)






Sponsors

Sponsor

Contact Us | Post Jobs | Post News | Post Events