-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix bbox computation for purposes, add test. #1170
Conversation
lib/mayaUsd/ufe/UsdObject3d.cpp
Outdated
@@ -75,7 +75,9 @@ Ufe::BBox3d UsdObject3d::boundingBox() const | |||
// as the time. | |||
|
|||
auto bbox = UsdGeomImageable(fPrim).ComputeUntransformedBound( | |||
getTime(sceneItem()->path()), UsdGeomTokens->default_); | |||
getTime(sceneItem()->path()), UsdGeomTokens->default_, | |||
UsdGeomTokens->guide, UsdGeomTokens->proxy, UsdGeomTokens->render |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the proxy shape, we have toggles that control what will be rendered. I wonder if we shouldn't be respecting it here because purpose helps you manage complexity and including everything when computing bounding box may be simply too expensive.
@@ -333,6 +334,54 @@ UsdTimeCode getTime(const Ufe::Path& path) | |||
return proxyShape->getTime(); | |||
} | |||
|
|||
TfTokenVector getProxyShapePurposes(const Ufe::Path& path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copy-pasted and adapted from getTime(). Arguably, getTime() itself has duplication from the stage map, and all calls to nameToDagPath() in the existing code base should be examined for performance and centralized. This is out of scope for the current branch.
@@ -30,6 +30,10 @@ def assertVectorAlmostEqual(testCase, a, b, places=7): | |||
for va, vb in zip(a, b): | |||
testCase.assertAlmostEqual(va, vb, places) | |||
|
|||
def assertVectorNotAlmostEqual(testCase, a, b, places=7): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought I would need this, ended up not using it, but left it in, as it's useful.
No description provided.