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>2020-09-11 10:08:11 +0300
committerJeroen Bakker <jeroen@blender.org>2020-09-11 10:12:41 +0300
commitb2fc0678542a2496e834b68f10519310cd79e851 (patch)
tree2dae5b5e8a14989ae96c6d02b6bbea62c852e15f
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.
-rw-r--r--release/scripts/startup/bl_ui/space_image.py3
-rw-r--r--source/blender/draw/engines/overlay/overlay_edit_uv.c5
2 files changed, 5 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index a490208fd5e..0fde128a906 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -1019,7 +1019,8 @@ class IMAGE_PT_view_display_uv_edit_overlays(Panel):
col.prop(uvedit, "show_faces", text="Faces")
col = layout.column()
- col.prop(uvedit, "show_smooth_edges", text="Smooth")
+ if context.preferences.experimental.use_image_editor_legacy_drawing:
+ col.prop(uvedit, "show_smooth_edges", text="Smooth")
col.prop(uvedit, "show_modified_edges", text="Modified")
col.prop(uvedit, "uv_opacity")
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) {