teapot Posted July 5, 2013 Share Posted July 5, 2013 (edited) Hello, 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)[/CODE]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 July 5, 2013 by teapot Quote Link to comment Share on other sites More sharing options...
anim Posted July 5, 2013 Share Posted July 5, 2013 (edited) maybe something like this? x = hou.node('/obj/geo1')for p in x.parms(): if type(p.eval()).__name__ == "str": p.set( "1" ) else: p.set( 1 )[/CODE][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 July 5, 2013 by anim Quote Link to comment Share on other sites More sharing options...
teapot Posted July 5, 2013 Author Share Posted July 5, 2013 Thanks, work as expected Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.