Jump to content

Proper Way of Replacing a Node's Interface


gemini

Recommended Posts

Hi,

I need to replace the interface of the houdini rop network with my own panel. I use it for sending renders to farm etc. I use the 'oppresetload' to load my property page to the node itself. The issues come when i want to change a few thing on the interface by a python script ( parameter labels and script callback of buttons -> see script bellow ).  The issues are: folder conditional strings are cleared, some parameter type changes ( button strip ).

My question is:

What is the proper way of replacing a node's interface without Digital Asset ?

THX!

G

 

Label change:

                ptg = parm_obj.parmTemplateGroup()
                parmname = 'active'
                pt = ptg.find( parmname)
                if is_sim == '1':
                    rop.parm('issimtoggle').set(1)
                    # pt.setLabel('Active / [ SIM ]  /  '+self.version)
                elif is_sim == '0':
                    rop.parm('issimtoggle').set(0)
                    # pt.setLabel('Active / [ RENDER ]  /  '+self.version)
                ptg.replace( parmname, pt)
                parm_obj.setParmTemplateGroup(ptg)

button Callback change Script :

 

        parm_obj = rop
        ptg = parm_obj.parmTemplateGroup()
        pt = ptg.find( parm)
        pt.setScriptCallback( script)
        pt.setScriptCallbackLanguage(hou.scriptLanguage.Python)
        ptg.replace( parm, pt)
        parm_obj.setParmTemplateGroup(ptg)
 

 

Edited by gemini
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.

Guest
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...