or just:

for n in nuke.allNodes('Blur'):
       n["disable"].setExpression('$gui')

The allNodes function has a filter function for node classes.

Abraham


Am 16.02.2012 um 18:56 schrieb Diego Piccinato:

for n in nuke.allNodes():
if n.Class() == 'Blur':
n["disable"].setExpression('$gui')


You were using myblurNode["disable"].setValue(exp) at each iteration
instead of "i" which is why it was setting only the first node.
Better use class() instead as a blur node might not necessarily
contain "blur" in its name. Also, setValue expects value for the
knob type (boolean in this case), try setExpression instead.
Cheers,
D


Abraham Schneider
Senior VFX Compositor


ARRI Film & TV Services GmbH
Tuerkenstr. 89
D-80799 Muenchen / Germany

Phone +49 89 3809-1269

EMail [email protected]
www.arri.de/filmtv
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

________________________________


ARRI Film & TV Services GmbH
Sitz: München Registergericht: Amtsgericht München
Handelsregisternummer: HRB 69396
Geschäftsführer: Franz Kraus, Dr. Martin Prillmann, Josef Reidinger
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to