Supersaqib Posted January 22, 2014 Share Posted January 22, 2014 Hi, Is there a way to drop one type of node underneath selected nodes. So if i have a bunch of object merges coming in and i want to add the name operator between the object merges and the next connected node, how could i do that. I assume through a script of some sort using hou.selectedNodes and hou.nodetype but i'm not able to put it all together. Help would be much appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
anim Posted January 22, 2014 Share Posted January 22, 2014 it would be something like this def insertNodeAfter(type = "null"): nodes = hou.selectedNodes() for node in nodes: connections = node.outputConnections() insertNode = node.createOutputNode(type) for connection in connections: outNode = connection.outputNode() outInput = connection.inputIndex() outNode.setInput(outInput, insertNode) then you can call it on selected nodes and chose desired type of node being inserted so for Name SOP it would be insertNodeAfter("name") 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.