Jump to content

point expression doesn't work in parameter?


Recommended Posts

 

 

I have a float attribute called "test" that retuns 0-1

If I want to use that attribute value on the parameter on my wrangle, how do I write the expression?

I tried

point("/obj/test", @ptnum, "test", 0)

This expression doesn't error out, but returns the value of point number '0'.

If I write

point("/obj/test", 3, "test", 0)

then it returns the "test" value of point number 3, but it just that @ptnum doesn't work.

What did I miss?

 

Link to comment
Share on other sites

parameters on wrangle aren't evaluated per point or element

so instead of point() expression on parameter, you need to use point() VEX function in your wrangle code

either as point(1, "test", @ptnum) if the geo is connected to second input for example

or point("op:/obj/testobj/testsop", "test", @ptnum) to reach geometry from any unconnected sop node

(for both examples the sampled geo may possibly have the same pointcount so that @ptnum finds corresponding points, but it's up to you how you want to use it)

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