diff options
author | Patrick Mours <pmours@nvidia.com> | 2022-04-12 19:08:25 +0300 |
---|---|---|
committer | Patrick Mours <pmours@nvidia.com> | 2022-04-13 13:24:21 +0300 |
commit | c31b89e76e0d216fc7b8807aa8ccd815b30ed93d (patch) | |
tree | 29dde38264c83ed9588e02322ff9d6a9c75ee872 /intern/cycles/hydra/camera.h | |
parent | 3a88f151c49f820ebb1589377958b397b1d9b96c (diff) |
Cycles: Add support for "stageMetersPerUnit" Hydra render setting
This can be useful to match transforms to what native Cycles
would see in Blender, as USD typically uses centimeters, but
Blender uses meters. This patch also fixes the hardcoded focal
length multiplicator, which is now using the same units as
everything else. Default of "stageMetersPerUnit" is 0.01 to match
the USD default of centimeters.
Differential Revision: https://developer.blender.org/D14630
Diffstat (limited to 'intern/cycles/hydra/camera.h')
-rw-r--r-- | intern/cycles/hydra/camera.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/intern/cycles/hydra/camera.h b/intern/cycles/hydra/camera.h index 8b7fed5a6bb..d839164317f 100644 --- a/intern/cycles/hydra/camera.h +++ b/intern/cycles/hydra/camera.h @@ -17,12 +17,14 @@ class HdCyclesCamera final : public PXR_NS::HdCamera { HdCyclesCamera(const PXR_NS::SdfPath &sprimId); ~HdCyclesCamera() override; - void ApplyCameraSettings(CCL_NS::Camera *targetCamera) const; + void ApplyCameraSettings(PXR_NS::HdRenderParam *renderParam, CCL_NS::Camera *targetCamera) const; - static void ApplyCameraSettings(const PXR_NS::GfCamera &cameraData, + static void ApplyCameraSettings(PXR_NS::HdRenderParam *renderParam, + const PXR_NS::GfCamera &cameraData, PXR_NS::CameraUtilConformWindowPolicy windowPolicy, CCL_NS::Camera *targetCamera); - static void ApplyCameraSettings(const PXR_NS::GfMatrix4d &worldToViewMatrix, + static void ApplyCameraSettings(PXR_NS::HdRenderParam *renderParam, + const PXR_NS::GfMatrix4d &worldToViewMatrix, const PXR_NS::GfMatrix4d &projectionMatrix, const std::vector<PXR_NS::GfVec4d> &clipPlanes, CCL_NS::Camera *targetCamera); |