Skip to content

Commit

Permalink
tg/pr/maya_export_camera_shake
Browse files Browse the repository at this point in the history
  • Loading branch information
nxkb committed Jan 17, 2018
1 parent 1937009 commit 4101efe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions third_party/maya/lib/usdMaya/MayaCameraWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ bool MayaCameraWriter::writeCameraAttrs(const UsdTimeCode &usdTime, UsdGeomCamer
const double verticalAperture = PxrUsdMayaUtil::ConvertInchesToMM(
camFn.verticalFilmAperture());

// Film offset and shake (when enabled) have the same effect on film back
const double horizontalApertureOffset = PxrUsdMayaUtil::ConvertInchesToMM(
camFn.horizontalFilmOffset());
(camFn.shakeEnabled() ?
camFn.horizontalFilmOffset() + camFn.horizontalShake() : camFn.horizontalFilmOffset()));
const double verticalApertureOffset = PxrUsdMayaUtil::ConvertInchesToMM(
camFn.verticalFilmOffset());
(camFn.shakeEnabled() ? camFn.verticalFilmOffset() + camFn.verticalShake() : camFn.verticalFilmOffset()));

primSchema.GetHorizontalApertureAttr().Set(
float(horizontalAperture), usdTime);
Expand Down

0 comments on commit 4101efe

Please sign in to comment.