Referencing a group in VEX

   4947   2   2
User Avatar
Member
41 posts
Joined:
オフライン
I can't find any information on how to actually reference an incoming group in VEX. I then want to manipulate points in that group.

I have a group of points going into the input of a VEX SOP. Any ideas?

If the point group was an array, in another language, I would access it like this:
group1.x
~adam
User Avatar
Member
320 posts
Joined: 8月 2007
オフライン
Possibly not the best, but I can think of one way.

Drop an attribCreate and point to your group. Class - Point / Type Vector. Put $TX $TY $TZ in as data.

In your VOP SOP import the attribute (import attribute VOP) as a vector and it will work.
www.alan-warren.com
User Avatar
Member
1390 posts
Joined: 7月 2005
オフライン
ingroup() does the job

if (ingroup(my_group, ptnum)) printf(“%s”, ptnum);

Also copying group membership into an attribute is common trick. You can deal this way with prims attribs as well.

does it help?
  • Quick Links