Changing Existing Node Parameters, using Python in Nuke

Hello there,

I’m attempting to streamline my work flow in nuke by using Python to change existing node parameters globally. In this case I have laid out various "Card3d" nodes and I want to change all the motion blur parameters in one fall swoop.

So here is what I’m inputting in the script editor:

c = nuke.allNodes( ‘Card3D’ )
c["motionblur"].setValue (2)
c["shutteroffset"].setValue (0)

this is what the script editor outputs:

c = nuke.allNodes( ‘Card3D’ )
c["motionblur"].setValue (2)
c["shutteroffset"].setValue (0)
# Result: Traceback (most recent call last):
File "<string>", line 2, in <module>
TypeError: list indices must be integers

I’m a noob when it comes to python so I’m in a bit over my head. What I gather from this is that my syntax is wrong and I can’t give allNodes a variable… atleast not the way I’ve written it. Any thoughts or suggestions would be greatly appreciated!

No Responses to “Changing Existing Node Parameters, using Python in Nuke”

Post a Comment