I want the Capture Length of a Bend SOP to be always the size of the incoming geometry. getbbox_size(0).x and $BBX are not working, however I'm mostly just interessted in the VEX expression and not so much in HScript solution.
What am I doing wrong?
And before you suggest alternative solutions, my actual geometry is a little more complex than the simple Grid here, so it has to be the bounding box instead of just getting the width of the Grid with a ch() function.
How to get bounding box with a VEX expression
20589 3 3- blackbeard
- Member
- 10 posts
- Joined: Nov. 2018
- Offline
- neil_math_comp
- Member
- 1743 posts
- Joined: March 2012
- Offline
Parameters only support HScript (the default language) or Python (if you set the parameter's language to Python), not VEX.
If you really want to use VEX, you can use an Attribute Wrangle with Run Over set to Detail to write the bounding box size to a detail attribute like
Hopefully one of those is what you were looking for.
bbox(0,D_XSIZE)
seems to work.If you really want to use VEX, you can use an Attribute Wrangle with Run Over set to Detail to write the bounding box size to a detail attribute like
@length = getbbox_size(0).x;
, then read the detail attribute from the parameter like detail(0,"length",0)
, or something similar.Hopefully one of those is what you were looking for.
Writing code for fun and profit since... 2005? Wow, I'm getting old.
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
https://www.youtube.com/channel/UC_HFmdvpe9U2G3OMNViKMEQ [www.youtube.com]
- blackbeard
- Member
- 10 posts
- Joined: Nov. 2018
- Offline
- Alexandre Dizeux
- Member
- 17 posts
- Joined: Feb. 2017
- Offline
-
- Quick Links