[Closed] Create a box identicle to the XForm modifer gizmo box
Hey I’m trying to create a box the exact same size, rotation, and position as the XForm modifier gizmo (orange) box is.
I know we can create a simple box same as bbox of the object, but its a little different than the xforms gizmo box.
I have tried this :
fn createBBoxFromXForm theNode theMod =
(
BBox = box width:theMod.gizmo.width length:theMod.gizmo.length height:theMod.gizmo.height
BBox.transform = theMod.gizmo.transform * theNode.transform
BBox.name = theNode.name + "_BBox"
)
createBBoxFromXForm $ $.modifiers[#XForm]
but apparently the gizmo has no width height or length properties. anyone know what I’m missing here?
thanks, but could you explain a little more how i can use this, I looked it up returns local min and max. still unsure what to do with it for what I want.
It returns the maximum and minimum values of your box.
If you create your new box with these dimensions your bounding box should be the same.
So copy the values from your output into your new box and you should be happy.
Thanks but thats still getting me the same result as the old method I was using, so if say we have a bone rotated via xform, I’m still getting the same bbox bigger than the bone and not rotated same as bone, but its fine just forget about it, I found another way to do what I was looking to do without it.