diff options
author | Charles Flèche <charlesf> | 2021-01-18 09:43:42 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-01-26 16:39:32 +0300 |
commit | 76ab0381d1e5f8df6b23803b75b2013933484bcd (patch) | |
tree | 2dfab6ceda254a18bae2a222db7385da644bb375 /intern/cycles/render/camera.cpp | |
parent | 532d3a103a874574856d732fffc3a04fee30b337 (diff) |
Fix Cycles standalone compilation following API changes
The changes to the socket API were not applied to the standalone app.
Also modify Camera.compute_auto_viewplane() to use Camera.full_width and Camera.full_height as it is not possible to publicly access Camera.width and Camera.height anymore, so the aspect ratio could be computed with stale data.
Differential Revision: https://developer.blender.org/D9961
Diffstat (limited to 'intern/cycles/render/camera.cpp')
-rw-r--r-- | intern/cycles/render/camera.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/render/camera.cpp b/intern/cycles/render/camera.cpp index 92cf712d32a..3beb3d1d4d3 100644 --- a/intern/cycles/render/camera.cpp +++ b/intern/cycles/render/camera.cpp @@ -212,8 +212,8 @@ void Camera::compute_auto_viewplane() viewplane.top = 1.0f; } else { - float aspect = (float)width / (float)height; - if (width >= height) { + float aspect = (float)full_width / (float)full_height; + if (full_width >= full_height) { viewplane.left = -aspect; viewplane.right = aspect; viewplane.bottom = -1.0f; |