Jump to content

set and get persistant attibute


charly

Recommended Posts

Hi,

I'm trying to increment a point attibute value over time in vex.

A basic exemple would be to animate a group node to increment a counter each time it select points.

Then, emitt particles if the points have been selected 3 times, or be able to know if a point has already been selected before.

 

So I tryed to do a setpointattrib to a node that is not time dependent, but it doesn't seem to work.

Is there a way to do it in vex ?

 

Thanks,

Charles

 

 

set_get_persistant_value.jpg

Link to comment
Share on other sites

You don't need to use setpointattrib inside a point wrangle. Just assign your value directly to the attribute. The attribute wrangle acts as an implied for/loop which loops over all the points automatically.

f@my_float = 1.0;
i@my_int = 1;
s@my_string = "Hello World";
f@my_frame = @Frame;
f@mytime = @Time;

 

Link to comment
Share on other sites

I find out how to increment the value the way I want using the sop solver.

But I'm still interested in a clener way to do it, like using an array for the selected points.

Because the Wrangle get generate each frame, the best solution to keep an array seems to be with Python.

 

Charles

 

 

increment_value.jpg

increment_value_new_selection.hiplc

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