[Bf-blender-cvs] [b6039cd82fd] blender-v2.93-release: Fix T96243: Workbench Curvature not rendering in background.

Jeroen Bakker noreply at git.blender.org
Thu Mar 24 10:52:48 CET 2022


Commit: b6039cd82fd0ac04fba604694f8694b1e95afe09
Author: Jeroen Bakker
Date:   Fri Mar 11 13:51:50 2022 +0100
Branches: blender-v2.93-release
https://developer.blender.org/rBb6039cd82fd0ac04fba604694f8694b1e95afe09

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.

===================================================================

M	source/blender/draw/engines/workbench/workbench_data.c

===================================================================

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);



More information about the Bf-blender-cvs mailing list