gemini Posted February 19, 2019 Share Posted February 19, 2019 Hi, Can I register a shortcut, I mean a keyboard event for a specified node in Houdini Python ? Thanks, G Quote Link to comment Share on other sites More sharing options...
Outlawed Posted September 10, 2019 Share Posted September 10, 2019 Here's something I wrote a while ago, should be what you're looking for ####################################################################### ## Create a node and connect it to the selected node ## ####################################################################### ''' "xform" is the node().type().name() "transform" is what I want to call the name. ''' if(hou.selectedNodes()): sopnode = hou.selectedNodes()[0] # print sopnode parentpath = sopnode.parent().path() myxform = hou.node(parentpath).createNode('xform','transform') next_input = sopnode.outputs() orig_pos = sopnode.position() new_pos = (orig_pos[0]-1, orig_pos[1]-1) # print next_input for i in next_input: file_node = i.inputs() for p in file_node: myxform.setFirstInput(sopnode) myxform.setPosition(new_pos) #xform.moveToGoodPosition() ####################################################################### Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.