[Bf-blender-cvs] [9097c977679] master: Fix T96243: Workbench Curvature not rendering in background.

Jeroen Bakker noreply at git.blender.org
Fri Mar 11 13:53:47 CET 2022


Commit: 9097c9776798a56b48d148cf614750ecedfdfe3d
Author: Jeroen Bakker
Date:   Fri Mar 11 13:51:50 2022 +0100
Branches: master
https://developer.blender.org/rB9097c9776798a56b48d148cf614750ecedfdfe3d

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 bf197986687..010f424b9da 100644
--- a/source/blender/draw/engines/workbench/workbench_data.c
+++ b/source/blender/draw/engines/workbench/workbench_data.c
@@ -275,7 +275,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