breadbox Posted January 7, 2013 Share Posted January 7, 2013 I'm having trouble getting figuring out the python to duplicate a node. Id like to also incriment a variable within a paramater with each copy. here is what I got so far. import houfor index in range(10): myNode = hou.node("obj/geo") #print myNode myNode_ChipID = myNode.parm("CHIPID") #print myNode_ChipID hou.copyNodesToClipboard(myNode) newCopy = hou.pasteNodesFromClipboard('obj') print index newCopy_ChipID.set(index)[/CODE]templateDuplicate_V1.hipnc Quote Link to comment Share on other sites More sharing options...
anim Posted January 7, 2013 Share Posted January 7, 2013 it looks like this is what you want not sure about range of the loop though myNode = hou.node("obj/geo")for index in range(1,12): newNode = hou.copyNodesTo( (myNode,), myNode.parent() )[0] newNode.parm("CHIPID").set(index)[/CODE] 1 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.