Jump to content

Vex problem - addpoint


Recommended Posts

Hi

 

I'm having a problem using the addpoint function in an attribwrangle SOP...

 

I'm making an OTL and I have a couple of optional inputs on it. If one of them doesn't get any geometry at all the asset won't work so I want to just check if there are any points there and if not, add one at the origin.

 

This is the VEX I have now, it doesn't throw an error but neither does it add a point. Can anyone tell me what I'm doing wrong?

Thanks very much

 

--------------------------------------------

 

vector origin = {0,0,0};
int numpoints = npoints(0);
 
if (numpoints == 0){
    addpoint(0,origin);
}
Edited by j00ey
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...