Jump to content

Creating points vex


evanrudefx

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
Link to comment
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
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...