TomRaynor Posted July 2, 2014 Share Posted July 2, 2014 I was wondering if anyone had any nice ways to script the saving of a selection of nodes to a clean (new) hip file? a function like hou.saveSelectionToNewHipFile() would be nice Thanks. Quote Link to comment Share on other sites More sharing options...
graham Posted July 2, 2014 Share Posted July 2, 2014 It really depends on what you mean by a clean/new hip file. You can use hou.copyNodesToClipboard() and hou.pasteNodesFromClipboard() to basically copy your nodes, then create a new hip and paste them into that. If you want to basically extract them directly to a new file while maintaining the current session, that gets a lot more complicated. Quote Link to comment Share on other sites More sharing options...
TomRaynor Posted July 2, 2014 Author Share Posted July 2, 2014 I am aware of the first method. Annoyingly the latter was what I was going for. I started off looking for an "Export selection" option under the main houdini "File" menu and was quite surprised when I didn't see one as both Maya and XSI have one. Quote Link to comment Share on other sites More sharing options...
kleer001 Posted July 2, 2014 Share Posted July 2, 2014 Whoa, cool subtleness there. I would never have thought of that workflow. I'd put in an RFE. Quote Link to comment Share on other sites More sharing options...
pezetko Posted July 2, 2014 Share Posted July 2, 2014 What about using opscript command on nodes to save them into .cmd file and source that file into new houdini session? (There is nice example of this workflow in Ari Danesh GoProcedural - Light Shade and Render lesson 10)There is also asCode() method in python. Quote Link to comment Share on other sites More sharing options...
oslo Posted July 2, 2014 Share Posted July 2, 2014 Recently I am create tool with similar functionality. Tool can import/export selected nodes to the file. I am used for it hython. Quote Link to comment Share on other sites More sharing options...
TomRaynor Posted July 3, 2014 Author Share Posted July 3, 2014 the opscript and opwrite commands I had considered and I will definitely look into using those. Thanks Petr. Vlad, would you care to share your tool or maybe suggest what method you used? Thanks! 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.