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:
authorJeroen Bakker <jeroen@blender.org>2022-03-11 15:51:50 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-03-24 12:45:43 +0300
commitb6039cd82fd0ac04fba604694f8694b1e95afe09 (patch)
treec73a46abad65075e0276e348ae1d8a315474faf3
parentc3fed26f3764937c0e6b14b1507645d17120b9c3 (diff)
Fix T96243: Workbench Curvature not rendering in background.
When rendering using the command line the curvature wasn't rendered. The reason was that the ui_scale wasn't initialized and therefore the same pixels where sampled to detect the curvature. This is fixed by setting the ui_scale to 1 for any image render.
-rw-r--r--source/blender/draw/engines/workbench/workbench_data.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_data.c b/source/blender/draw/engines/workbench/workbench_data.c
index b84ddec4973..a59507a0812 100644
--- a/source/blender/draw/engines/workbench/workbench_data.c
+++ b/source/blender/draw/engines/workbench/workbench_data.c
@@ -290,7 +290,7 @@ void workbench_update_world_ubo(WORKBENCH_PrivateData *wpd)
copy_v2_v2(wd.viewport_size_inv, DRW_viewport_invert_size_get());
copy_v3_v3(wd.object_outline_color, wpd->shading.object_outline_color);
wd.object_outline_color[3] = 1.0f;
- wd.ui_scale = G_draw.block.sizePixel;
+ wd.ui_scale = DRW_state_is_image_render() ? 1.0f : G_draw.block.sizePixel;
wd.matcap_orientation = (wpd->shading.flag & V3D_SHADING_MATCAP_FLIP_X) != 0;
workbench_studiolight_data_update(wpd, &wd);