Jump to content

[HOM] Write geometry attribute in Python Dop


ClausKleber

Recommended Posts

Hi,

 

is there a way to write a point attribute in a Python Dop? I know that the usual way like objects.geometry() returns a read-only reference and only in a Python Sop you get it writable.

But i want to change the attributes during the simulation.

 

Thanks!

Link to comment
Share on other sites

I've found a way. It's pretty easy.

 

You can get an editable geometry in the Python Dop:

objects = hou.pwd().objectsToProcess()

with objects[0].editableGeometry() as geo:
    for point in geo.points():
        point.setAttribValue("life", 0.5)
Edited by ClausKleber
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...