Jump to content

how to get bounding box without old functions ?


eF_eX

Recommended Posts

Hi

Houdini documentation http://www.sidefx.com/docs/houdini/expressions/bbox.html tells me that the bbox function is replaced by other stuff.

So ok bbox still works but the new functions don't. I can't figure out what to do to get the bounding box of an object with expressions.

I provided a simple file, the very left transform uses the old way which works fine the middle i try with vex the right one i try with python.

 

bbox.hip

Link to comment
Share on other sites

you can't use VEX as parameter expression language, all tools with parms that accept VEX are referenced by Snippet VOP as a part of VOPnet where it gets evaluated, in other words it's treated as pure text until compiled by VOPnet, so it's very specific case, and can't be generalized for all parameters

for python the usage would be 

hou.node("../box1").geometry().boundingBox().sizevec()[1]

OR

hou.pwd().inputs()[0].geometry().boundingBox().sizevec()[1]

 

also for the confusing meaning of "replaced by" you can read this https://www.sidefx.com/forum/topic/57809/#post-258876

  • Thanks 1
Link to comment
Share on other sites

Thanks that clears things up.

The only thing i don't quite get now is functions like bbox will not become legacy, is that how i can understand this?

Because this was the only reason why i did even look into the other stuff.

 

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