Jump to content
hyperforce

Writing attribute values to specific point numbers using attribwrangle

Recommended Posts

I'm trying to write a set of values to a set of of points using the attribWrangle node and VEX.

These points are processed using a for loop that deals with each point number in sequence.

However, when I use the default @foo = value; function it simply overwrites the values of the foo attribute for all the points, not just the one my for loop is processing. This leaves me with all my points containing the attribute values of the last processed iteration.

I know that with a point function you can extract the attribute value of a specific point.Can you also write it, using vex in a attribWrangle sop?

Edited by hyperforce

Share this post


Link to post
Share on other sites

What exactly is it that you are trying to do? Could you post an example? To me it seems that you don't need a for loop because vex automatically deals with each point individually.

Right now it sounds like you are doing the following:

- vex gives you the first point

- for this point you loop through all points and set the value @foo

- this value is set for the first point and not for the point you are iterating over in the for loop

- that means that @foo will always get the last value that gets set in the for loop

This process is repeated for every point which means that all the points will get the same value for @foo.

It's a little tricky to explain, but I hope it makes things a little clearer. Check out my example file.

-dennis

attribwrangle_loop.hip

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

×