Can't figure out how "For" VOP works.

   4165   1   1
User Avatar
Member
858 posts
Joined: Oct. 2008
Offline
This has been driving me mad for a long time. I simply can't figure out how the For VOP works. Sometimes it seems to work, but doesn't really do what I expect.

Say I wanted to set an attribute of all the neigbhours of a point p. I'd have thought I could loop through all its neighbors and set it, but it won't work.

I attached a simple 3-node example.

Actually, I'd be grateful for any example anywhere (there's none in the helpcard).

Attachments:
For Vopsop.hipnc (129.7 KB)

--
Jobless
User Avatar
Member
2199 posts
Joined: July 2005
Online
You have to understand how VOPS/Vex works.

It only processes one point at a time, this can never change, you can only set attributes on that 1 single point. You can do calculations using the neighbours but you can't set them to anything. Even if you could at some point the point you had set would then get processed itself and get re-set.

Think of VOPs as already being inside a giant for loop that is doing a for each point.
The trick is finding just the right hammer for every screw
  • Quick Links