Jump to content

vex funtion: XYZ dimentions of a sop


Juzwa

Recommended Posts

Hi, 

I guess this is easy question. I ahve a Bound sop and I want to get its xyz dimentions. What is a vex function for getting sop dimentions? I've been trying to look into help  but Im not getting lucky.

Edited by Juzwa
Link to comment
Share on other sites

3 hours ago, vtrvtr said:

Just as an addendum, the very useful bbox functions work in wrangles. E.g


ysize = `bbox(0, D_YSIZE)`;

Will give you the size of the bound box in the y axis  

 

It's very important to understand why that appears to "work". Your example uses an expression function that's evaluated while evaluating the string parameter for the wrangle's code. This happens before the VEX code is compiled, and means that the VEX code will keep being recompiled whenever the value is dirtied by the upstream SOP's geometry changing. That can have significant overhead, such as when running inside a foreach loop.

  • Like 2
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...