Johannes Saam Posted March 24, 2011 Share Posted March 24, 2011 Hey , I am trying to create an hda wih python. Lets say i want to generate an otl that contains a grid node and a parameter that creates its divisions. Clicking that together is easy. How do you aproach creating that in python only save the otl somewhere and install it in the current scene? I found hou.HDADefinition but can not get it to work. Does somebody want to share this? http://www.sidefx.com/docs/houdini10.0/hom/hou/HDADefinition Thanks Jo Quote Link to comment Share on other sites More sharing options...
graham Posted March 24, 2011 Share Posted March 24, 2011 You'd need to do something like the following: - Create a grid - Collapse the grid into a subnet with hou.Node.collapseIntoSubnet() - Convert the subnet to a digital asset using hou.Node.createDigitalAsset() - Create a hou.IntParmTemplate to represent your divisions parameter and add it to the digital asset definition using hou.HDADefinition.addParmTuple() - Link the parameters on the grid to the parameter you just added. - Save the asset using hou.HDADefinition.updateFromNode() - Lock the node using hou.Node.matchCurrentDefintion() Quote Link to comment Share on other sites More sharing options...
Johannes Saam Posted March 24, 2011 Author Share Posted March 24, 2011 Thanks so much works like a treat! jo 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.