Iterating through point/primitives groups/lists

   5627   2   2
User Avatar
Member
55 posts
Joined: March 2015
Offline

How can I loop through a group (or the entire geo) of points/primitives so I can later enter the relative attributes?

To read the attributes I can just use the attr or the getattrib function, but what about the looping?

I mean in a vex wrangle I guess I have to write something like:

int attr;
for (int index,...,...)
{
 attr = getattr(index....blabla);
}


Thanks
Edited by SteN - Sept. 1, 2016 18:58:06
https://vimeo.com/user43100796 [vimeo.com]
User Avatar
Member
471 posts
Joined: Nov. 2013
Offline
Greetings.
The iteration depends on what you are going to choose.
If you select Points or Primitives, iteration respectively goes on each point or primitive and you not need to use loop explicitly unless you choose Detail in this case you have to use loop explicitly.
For group simply you can specify it on group area of each wrangle node.
User Avatar
Member
55 posts
Joined: March 2015
Offline
Yea I forgot you could specify the group directly on the wrangle node.

So basically I figured out what I wanted to do(see screenshot, write code to compute lenght of a curve).


My problem with this kind of stuff is that I came up with new “how can I do this” ideas when its midnight, and since I cant focus at that time I just asked here on the forum instead of focus on in the next day xD

Many thanks.
Edited by SteN - Sept. 2, 2016 17:07:50

Attachments:
dist_wrangle.jpg (82.5 KB)

https://vimeo.com/user43100796 [vimeo.com]
  • Quick Links