Jump to content
bobbybob

Access numpt at input 2 of wrangle

Recommended Posts

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 by bobbybob

Share this post


Link to post
Share on other sites

you do not need to add @opinput if you gonna grab something from input 1 just do @numpt; 

Share this post


Link to post
Share on other sites

Sorry, I want the numpt of input 2.. I am use to programming where everything starts at 0 :)

Edited by bobbybob

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Hmm, not sure. Maybe because it's a different type of attribute and opinput can only access what's visible in the Geometry Spreadsheet?

Share this post


Link to post
Share on other sites

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)`.

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

×