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

-Nathan



From: vfx2be 
Sent: Wednesday, February 15, 2012 9:47 PM
To: [email protected] 
Subject: [Nuke-python] How to make a loop to disable all blur in a comp ?

hi,

I'm a beginner at coding so I tried this :

      Code:  
      import nuke
      exp = nuke.expression('($gui)')
      myblurNode = nuke.toNode( 'Blur1' )

      for i in nuke.allNodes():


          if i.name().startswith('Blur'):
            myblurNode["disable"].setValue(exp)  


Works, for the Blur1 of course, but I don't know how to iterate for Blur2, 3, 
etc...

By the way, as you can see, I am not really trying to set Disable at 1 but at 
$gui. For some unknow reason, that set it a 1 instead of adding the expression 
$gui .. Any clue ?

Thanks a lot !!


--------------------------------------------------------------------------------
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
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