Jump to content
Sign in to follow this  

set value for all parms in a node

Recommended Posts


I want to create button to set all my parameters to some value [for example 1].

I did something like this:

x = hou.node('/obj/geo')
x.parmTuple(str(p.name() for p in x.parmTuples()).set(1,1,1)


AttributeError: 'NoneType' object has no attribute 'set'

I suppose it is ultra simple [to set value for all parms] but I can't figue out how to deal with it.

Edited by teapot

Share this post

Link to post
Share on other sites

maybe something like this?

x = hou.node('/obj/geo1')
for p in x.parms():
if type(p.eval()).__name__ == "str":
p.set( "1" )
p.set( 1 )


[size=4]and if you are sure that all your parms are float and ints then you don't have to check for strings[/size]

Edited by anim

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this