j00ey Posted March 14, 2014 Share Posted March 14, 2014 (edited) 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 March 14, 2014 by j00ey Quote Link to comment Share on other sites More sharing options...
yourdaftpunk Posted March 14, 2014 Share Posted March 14, 2014 Your AttribWrangle is probably set to Run Over Points. Change that to Detail and your code will work. -shawn Quote Link to comment Share on other sites More sharing options...
j00ey Posted March 14, 2014 Author Share Posted March 14, 2014 Brilliant! That fixed it, thanks very much Shawn. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.