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:
Diffstat (limited to 'source/blender/compositor/operations/COM_TextureOperation.cc')
-rw-r--r--source/blender/compositor/operations/COM_TextureOperation.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/compositor/operations/COM_TextureOperation.cc b/source/blender/compositor/operations/COM_TextureOperation.cc
index 8b27c3aded4..c1c8db2ae3f 100644
--- a/source/blender/compositor/operations/COM_TextureOperation.cc
+++ b/source/blender/compositor/operations/COM_TextureOperation.cc
@@ -6,6 +6,7 @@
#include "BKE_image.h"
#include "BKE_node.h"
+#include "BKE_scene.h"
#include "NOD_texture.h"
@@ -59,8 +60,8 @@ void TextureBaseOperation::determine_canvas(const rcti &preferred_area, rcti &r_
{
r_area = preferred_area;
if (BLI_rcti_is_empty(&preferred_area)) {
- int width = rd_->xsch * rd_->size / 100;
- int height = rd_->ysch * rd_->size / 100;
+ int width, height;
+ BKE_render_resolution(rd_, false, &width, &height);
r_area.xmax = preferred_area.xmin + width;
r_area.ymax = preferred_area.ymin + height;
}