Jump to content
Sign in to follow this  

changing attributes of points in point cloud

Recommended Posts

I'm trying to change the value of an attribute of a point when iterating through a point cloud in an attribute wrangle.

I know i can get the point number that is currently iterated with pcimport, but how do I change an attribute of that point?

I can get its position (or any other attribute) with the point() function but since that is not a pointer/reference I don't know how to change the actual attribute value.


Share this post

Link to post
Share on other sites

If you have the @ptnum, or the current point index, you can use the setpointattrib function to assign a new value. Check it out in the docs there a few variations.

setpointattrib(geoself(), "sf_enemy_location", @ptnum, set(0,0,0), "set");


geoself() can also be represented with the value zero as well.

setpointattrib(0, "P", point_index, set(0,0,0), "set");

Edited by Atom

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