Jump to content

Adding a Parameter (button) after an Exiting One in Python


Recommended Posts

Hi there!

You can add spare parameters using the Edit Parameter Interface option in the FileCache node settings (the little gear icon). Please note that it will only be available in your current scene file. If you want it available across all scenes, then you need to save it as a permanent default.

Hope it helps :)






Link to comment
Share on other sites

It can be done but you're probably better making an HDA

The code it something like

node = hou.node('/obj/geo1/FILE')
new_button = hou.ButtonParmTemplate("new_button", "New Button")

You need to set the proper scripts in the button for it to replicate the actual button logic

Link to comment
Share on other sites

Ofcourse you meant Python. How did I miss that ? Here you go :)

# Get the file cache node 
cacheNode = hou.node("/obj/geo1/filecache1")

# Get the param template group for the file cache node
parmTempGrp = cacheNode.parmTemplateGroup()

# create a button param template 
myButton = hou.ButtonParmTemplate('myrender', 'Render')

# Insert my button param template after the Save to Disk -(execute) parameter
parmTempGrp.insertAfter('execute', myButton)

# Set the updated param template group to the cache node 




Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...