Jump to content
garf

Scripting 'Hide/Disable When' on parameters

Recommended Posts

Hello,

I'd like to include a 'hide/disable when' conditional on a parameter which is being created by a script. How do I do this?

null = hou.node("/obj").createNode("null")
null.setName('newNull')

tabs = null.parmTemplateGroup()

for folder in tabs.entries():
    tabs.hideFolder(str(folder.label()), True)
 
null.setParmTemplateGroup(tabs)
parmGroup = null.parmTemplateGroup()
parmGroup.addParmTemplate(hou.ToggleParmTemplate("overrideToggle", "Override Cache Version", 1))
parmGroup.addParmTemplate(hou.IntParmTemplate("overridingVersion", "Overriding Version", 1))
null.setParmTemplateGroup(parmGroup)

null.parm('overrideToggle').set(0)
null.parm('overridingVersion').disable(1)

 

 

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

×