bobbybob Posted February 14, 2018 Share Posted February 14, 2018 (edited) As I can understand from the Houdini documentation, the "@opinputn_name" will access attributes from the secondary inputs. I am trying to access the "numpt" by "int numLastPoint = i@opinput1_numpt;" but this does not work. Im I missing something? Edited February 14, 2018 by bobbybob Quote Link to comment Share on other sites More sharing options...
Sepu Posted February 14, 2018 Share Posted February 14, 2018 you do not need to add @opinput if you gonna grab something from input 1 just do @numpt; Quote Link to comment Share on other sites More sharing options...
bobbybob Posted February 14, 2018 Author Share Posted February 14, 2018 (edited) Sorry, I want the numpt of input 2.. I am use to programming where everything starts at 0 Edited February 14, 2018 by bobbybob Quote Link to comment Share on other sites More sharing options...
Sean-R Posted February 14, 2018 Share Posted February 14, 2018 You can use the npoints vex expression, so: npoints(1) 1 Quote Link to comment Share on other sites More sharing options...
bobbybob Posted February 14, 2018 Author Share Posted February 14, 2018 Sean-R, thank you so much. Just out of curiosity. Is this a bug, that "i@opinput1_numpt" is not working, or do I use it wrong? Quote Link to comment Share on other sites More sharing options...
Sean-R Posted February 14, 2018 Share Posted February 14, 2018 Hmm, not sure. Maybe because it's a different type of attribute and opinput can only access what's visible in the Geometry Spreadsheet? Quote Link to comment Share on other sites More sharing options...
toadstorm Posted February 14, 2018 Share Posted February 14, 2018 There's a bit of a misunderstanding here... @numpt isn't a real attribute, it's a pseudo-attribute for convenience inside the wrangle. It's always relative to input0. If you want to get the number of points from input1, use the `npoints` function: `int npts = npoints(1)`. 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.