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
path: root/source
diff options
context:
space:
mode:
authorJeroen Bakker <jeroen@blender.org>2020-09-11 10:08:11 +0300
committerJeroen Bakker <jeroen@blender.org>2020-09-11 10:12:41 +0300
commitb2fc0678542a2496e834b68f10519310cd79e851 (patch)
tree2dae5b5e8a14989ae96c6d02b6bbea62c852e15f /source
parent4212b6528afb07d9b2962566ae9c4251282d387f (diff)
Image Editor: Smooth Wire User Preferences
The old image editor has an option to enable the smooth wire drawing. This option was stored per editor and disabled by default. This patch connects the smooth wires in the UV/Image editor to `User Prefereces -> Viewport -> Quality -> Smooth Wire [] Overlay`. The old option is left in place and will be removed when the old image editor drawing code will be removed before BCon 3.
Diffstat (limited to 'source')
-rw-r--r--source/blender/draw/engines/overlay/overlay_edit_uv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.c b/source/blender/draw/engines/overlay/overlay_edit_uv.c
index 1a95bd04c69..109db6433e0 100644
--- a/source/blender/draw/engines/overlay/overlay_edit_uv.c
+++ b/source/blender/draw/engines/overlay/overlay_edit_uv.c
@@ -112,7 +112,7 @@ void OVERLAY_edit_uv_init(OVERLAY_Data *vedata)
pd->edit_uv.dash_length = 4.0f * UI_DPI_FAC;
pd->edit_uv.line_style = edit_uv_line_style_from_space_image(sima);
- pd->edit_uv.do_smooth_wire = (sima->flag & SI_SMOOTH_UV) != 0;
+ pd->edit_uv.do_smooth_wire = ((U.gpu_flag & USER_GPU_FLAG_OVERLAY_SMOOTH_WIRE) > 0);
pd->edit_uv.draw_type = sima->dt_uvstretch;
BLI_listbase_clear(&pd->edit_uv.totals);
@@ -144,7 +144,8 @@ void OVERLAY_edit_uv_cache_init(OVERLAY_Data *vedata)
pd->edit_uv_shadow_edges_grp, "alpha", pd->edit_uv.uv_opacity);
DRW_shgroup_uniform_float(
pd->edit_uv_shadow_edges_grp, "dashLength", &pd->edit_uv.dash_length, 1);
- DRW_shgroup_uniform_bool_copy(pd->edit_uv_shadow_edges_grp, "doSmoothWire", true);
+ DRW_shgroup_uniform_bool(
+ pd->edit_uv_shadow_edges_grp, "doSmoothWire", &pd->edit_uv.do_smooth_wire, 1);
}
if (pd->edit_uv.do_uv_overlay) {