Jump to content

Display newly selected node in Parameters view


Aeoll

Recommended Posts

Hi,

I'm writing a few shelf tools with hotkey links to allow quick creation of some common nodes (Null (N), Wrangle (W) etc)

Here is the simple script

if(len(hou.selectedNodes()) > 0):
    node = hou.selectedNodes()[0]
    
    if(node.type().category() == hou.sopNodeTypeCategory()):
        parent = node.parent()
        null = parent.createNode("null")
        null.setNextInput(node)
        null.moveToGoodPosition(True, False, True, True)
        
        null.setSelected(True, True, False)  
        null.setCurrent(True)
        null.setDisplayFlag(True)

 

Although the new Null is selected and display-flagged correctly, the parameter pane remains on the previously selected node. The outline colour of the null is also yellow rather than orange.

Is the a way to fix this?

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