Jump to content
Sign in to follow this  
ClausKleber

[HOM] Write geometry attribute in Python Dop

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!

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×