Skip to content
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

HYDRA-1325 : Fix when no extent attribute is provided in a prim in th… #231

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/flowViewport/sceneIndex/fvpBBoxSceneIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ namespace
///
class _BoundsPointsPrimvarValueDataSource final : public HdVec3fArrayDataSource
{
inline static const GfVec3f _floatMaxVec3f {FLT_MAX};
public:
HD_DECLARE_DATASOURCE(_BoundsPointsPrimvarValueDataSource);

Expand All @@ -170,16 +171,18 @@ namespace
HdExtentSchema extentSchema =
HdExtentSchema::GetFromParent(_primSource);

// Note: If the scene description doesn't provide the extents, Storm uses
// the default constructed GfRange3d which is [FLT_MAX, -FLT_MAX],
GfVec3f exts[2] = { GfVec3f(0.0f), GfVec3f(0.0f) };
bool extentMinFound = false;
if (HdVec3dDataSourceHandle src = extentSchema.GetMin()) {
exts[0] = GfVec3f(src->GetTypedValue(shutterOffset));
extentMinFound = true;
extentMinFound = (exts[0] != _floatMaxVec3f);
}
bool extentMaxFound = false;
if (HdVec3dDataSourceHandle src = extentSchema.GetMax()) {
exts[1] = GfVec3f(src->GetTypedValue(shutterOffset));
extentMaxFound = true;
extentMaxFound = (exts[1] != -_floatMaxVec3f);
}

if (!extentMinFound || !extentMaxFound) {
Expand Down