Jump to content
ejr32123

Creating points vex

Recommended Posts

Hello;

I have been creating points in a attribute wrangle set to run over detail. I typed in 

addpoint(0,{0,0,0}); 

which simply adds a point at the origin. 

That's what I have been doing until today when I noticed in the entagma video they type in

int pnt0 = addpoint(0,{0,0,0}); 

What is the benefit of creating a int first vs. the way I have been doing it?

Thanks

Edited by ejr32123

Share this post


Link to post
Share on other sites

its a handle to the new point, so you could ex set an attribute value to it, or add it to a primitive.

vector position = set(0,0,0);
vector color = set(1,0,0);

int newprim = addprim(0,"polyline"); // create a primitive
int newpoint = addpoint(0,position); // create a point
addvertex(0,newprim,newpoint); // connect that point to the primtive

setpointattrib(0,"Cd",newpoint,color,"set"); //set an attribute

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×