Getting the bbox of a merged prim in Vex

   1009   2   0
User Avatar
Member
22 posts
Joined: 11月 2016
Offline
1) I have 2 prims, a box and a sphere. I add each to their own groups called grp_box and grp_sphere. The sphere is half the scale of the box, but it could be any size.

2) I merge them before feeding them into a wrangle.

3) In the wrangle I want to getbbox of just the sphere. Since getbbox relies on a primnum, but these are merged into one prim how do I essentially extract the sphere in Vex as its own prim and get its bbox?

thanks in advance!
User Avatar
Member
8587 posts
Joined: 7月 2007
Offline
traden1976
In the wrangle I want to getbbox of just the sphere. Since getbbox relies on a primnum, but these are merged into one prim how do I essentially extract the sphere in Vex as its own prim and get its bbox?
getbbox() doesn't rely on primnum, also box and sphere are not a single prim
you probably meant it relies on input or geo and now they are both part of a single geo

you can still use group to get bbox of the group
so something like
vector bbmin, bbmax; 
getbbox(0, "grp_sphere", bbmin, bbmax);
Edited by tamte - 2020年2月4日 14:15:59
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
22 posts
Joined: 11月 2016
Offline
I totally missed that in the docs. Thanks @tamte
  • Quick Links