Skip to content

Commit

Permalink
Animated camera parameters were not being correctly pull by the rende…
Browse files Browse the repository at this point in the history
…r delegate.

(Internal change: 2012318)
  • Loading branch information
poljere authored and pixar-oss committed Oct 14, 2019
1 parent 288614f commit 1d08054
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions pxr/usdImaging/lib/usdImaging/delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2923,23 +2923,21 @@ UsdImagingDelegate::GetCameraParamValue(SdfPath const &id,

SdfPath cachePath = ConvertIndexPathToCachePath(id);
VtValue value;
HdDirtyBits dirtyBit = HdCamera::Clean;
if (paramName == HdCameraTokens->worldToViewMatrix) {
dirtyBit = HdCamera::DirtyViewMatrix;
} else if (paramName == HdCameraTokens->projectionMatrix) {
dirtyBit = HdCamera::DirtyProjMatrix;
} else if (paramName == HdCameraTokens->clipPlanes) {
dirtyBit = HdCamera::DirtyClipPlanes;
} else {
dirtyBit = HdCamera::DirtyParams;
}

_UpdateSingleValue(cachePath, dirtyBit);
if (!_valueCache.FindCameraParam(cachePath, paramName, &value)) {
HdDirtyBits dirtyBit = HdCamera::Clean;
if (paramName == HdCameraTokens->worldToViewMatrix) {
dirtyBit = HdCamera::DirtyViewMatrix;
} else if (paramName == HdCameraTokens->projectionMatrix) {
dirtyBit = HdCamera::DirtyProjMatrix;
} else if (paramName == HdCameraTokens->clipPlanes) {
dirtyBit = HdCamera::DirtyClipPlanes;
} else {
dirtyBit = HdCamera::DirtyParams;
}

_UpdateSingleValue(cachePath, dirtyBit);
if (!_valueCache.FindCameraParam(cachePath, paramName, &value)) {
// Fallback to USD attributes.
value = _GetUsdPrimAttribute(cachePath, paramName);
}
// Fallback to USD attributes.
value = _GetUsdPrimAttribute(cachePath, paramName);
}
return value;
}
Expand Down

0 comments on commit 1d08054

Please sign in to comment.