Jump to content
j00ey

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

Share this post


Link to post
Share on other sites

Brilliant! That fixed it, thanks very much Shawn.

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

×