steven Posted March 3, 2010 Share Posted March 3, 2010 I'm restoring a bunch of old subnets that have 400 dangling transform sops and none of them are merged. I'd like to connect all the xform sops into one merge sop that I can display from. Is there a merge all technique for this? I've exhausted my useless bag of tricks--never needed to do a merge all until now. Any tips before I look at hou.Node and travel down that path? Quote Link to comment Share on other sites More sharing options...
graham Posted March 3, 2010 Share Posted March 3, 2010 There's a couple ways you could do it I suppose. One way would be to have a general tool that merged all your selected nodes together automatically for you, the other a more one off scripting approach. For the scripting approach you could do something like this: def mergeXforms(container): xform_nodes = [child for child in container.children() if child.type() == hou.nodeType(hou.sopNodeTypeCategory(), "xform")] merge = container.createNode("merge") for xform in xform_nodes: if len(xform.outputs()) is 0: merge.setNextInput(xform) merge.setRenderFlag(True) merge.setDisplayFlag(True) merge.moveToGoodPosition() I've also attached a tool I wrote a while ago that handles easy merging of selected nodes in all contexts except OBJ and VOPs. Just select some nodes and run the tool. It should merge them together. net_automerge.shelf Quote Link to comment Share on other sites More sharing options...
SpencerL Posted March 3, 2010 Share Posted March 3, 2010 you can just select all the xform sops, either manually or by network editor's "Find Node..." button to search/select the xform nodes. Once selected, wire the output of 1 of the selected nodes into a merge sop. That will wire all the selected nodes into your merge. Quote Link to comment Share on other sites More sharing options...
steven Posted March 3, 2010 Author Share Posted March 3, 2010 Thanks Spencer! Graham, I'm going to be using this script with some small mods next week, I think. Just saw another 50 subnets that this will be of great help. Huge, huge thanks guys! 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.