Skip to content

Commit

Permalink
Fix object framing for sub-trees.
Browse files Browse the repository at this point in the history
  • Loading branch information
rzulak committed May 1, 2020
1 parent 4fa17a2 commit c3beb64
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/mayaUsd/ufe/UsdObject3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,9 @@ Ufe::BBox3d UsdObject3d::boundingBox() const
// Would be nice to know if the object extents are animated or not, so
// we can bypass time computation and simply use UsdTimeCode::Default()
// as the time.
TfTokenVector purposes{UsdGeomTokens->default_};
UsdGeomBBoxCache bboxCache(getTime(sceneItem()->path()), purposes);
auto bbox = bboxCache.ComputeLocalBound(fPrim);
auto range = bbox.GetRange();

auto bbox = UsdGeomImageable(fPrim).ComputeUntransformedBound(getTime(sceneItem()->path()), UsdGeomTokens->default_);
auto range = bbox.ComputeAlignedRange();
auto min = range.GetMin();
auto max = range.GetMax();
return Ufe::BBox3d(toVector3d(min), toVector3d(max));
Expand Down

0 comments on commit c3beb64

Please sign in to comment.