Created
March 4, 2020 16:24
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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