Alain2131 Posted October 1, 2018 Share Posted October 1, 2018 Hey there ! The situation is that I have a Python code (in a HDA, but in the test a simple python sop will do the trick) in which I tried to modify a certain geometry's attribute. The thing is - I can't have that geometry connected to the python sop (since the final result would be to integrate it all in an HDA). So ! I know we get a "GeometryPermissionError: Geometry is read-only." error when trying to do so with the Python node not connected to the geometry. But ! It is possible to manually modify a node's geometry attributes by locking the node (setHardLocked in python), and manually inputting the values we want in the geometry spreadsheet. The question is - can we do the same in Python ? Can we lock the geometry, and then "auto-manually" change the attributes in Python on that specific locked node ? Thanks ! Quote Link to comment Share on other sites More sharing options...
ikoon Posted October 1, 2018 Share Posted October 1, 2018 The Stash SOP should help you? Quote: You can modify or overwrite the cached geometry with hou.Geometry objects through scripting. You can link the geometry parameter to a parameter on a parent asset. This allows assets to inject geometry into a network without making the contents editable. http://www.sidefx.com/docs/houdini/nodes/sop/stash.html Quote Link to comment Share on other sites More sharing options...
anim Posted October 2, 2018 Share Posted October 2, 2018 you can also do it directly by creating Data or Geometry Data parameter on your asset and then store or read hou.Geometry() instance by parm.set() or parm.eval() Stash SOP is just an example of such asset 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.