Jump to content

Modify a node's locked geometry by Python


Recommended Posts

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 !

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...