diff options
author | Jeroen Bakker <jeroen@blender.org> | 2022-03-11 15:51:50 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2022-03-11 15:52:12 +0300 |
commit | 9097c9776798a56b48d148cf614750ecedfdfe3d (patch) | |
tree | 92e3dff4e15574ea6e1a0e377081f8087e3058d2 /source/blender/draw/engines/workbench | |
parent | 9bee8e46a1dce4d0ae4b930d91690cc9dcf3fca3 (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.
Diffstat (limited to 'source/blender/draw/engines/workbench')
-rw-r--r-- | source/blender/draw/engines/workbench/workbench_data.c | 2 |
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 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); |