Skip to content

Instantly share code, notes, and snippets.

@csprance
Created March 4, 2020 16:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csprance/13c10380a7273390336c8d4524937dac to your computer and use it in GitHub Desktop.
Save csprance/13c10380a7273390336c8d4524937dac to your computer and use it in GitHub Desktop.
Given a selected node create a merge node that references that node under the mouse curor.
(node,) = hou.selectedNodes()
node.setColor(hou.Color(.302, .525, .114))
parent = node.parent()
merge = parent.createNode('object_merge', '%s_MERGE' % node.name().upper())
merge.setPosition(hou.ui.paneTabOfType(hou.paneTabType.NetworkEditor).cursorPosition())
merge.parm('objpath1').set(merge.relativePathTo(node))
merge.setColor(hou.Color(.475,.812,.204))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment