Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-07-14 21:16:34 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-07-15 14:40:04 +0300
commit9ea1b88f0f01a617f452d5eaa44ecbebbaa95c4e (patch)
tree87dd1c363d2e8ea17178559b6df61bf9d54fbe13 /source/blender/compositor/operations/COM_RenderLayersProg.cc
parentb8ffd43bd28ff93c5420d8a50c2cde5a061be118 (diff)
Cleanup: add utlity function to compute render resolution
Instead of duplicating logic many times.
Diffstat (limited to 'source/blender/compositor/operations/COM_RenderLayersProg.cc')
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cc b/source/blender/compositor/operations/COM_RenderLayersProg.cc
index 522086658f8..40f2187b27b 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cc
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cc
@@ -109,8 +109,8 @@ void RenderLayersProg::execute_pixel_sampled(float output[4],
/* see comment in execute_region describing coordinate mapping,
* here it simply goes other way around
*/
- int full_width = rd->xsch * rd->size / 100;
- int full_height = rd->ysch * rd->size / 100;
+ int full_width, full_height;
+ BKE_render_resolution(rd, false, &full_width, &full_height);
dx = rd->border.xmin * full_width - (full_width - this->get_width()) / 2.0f;
dy = rd->border.ymin * full_height - (full_height - this->get_height()) / 2.0f;