Jump to content

Writing attribute values to specific point numbers using attribwrangle


hyperforce

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

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...