[Bf-blender-cvs] [716ea154798] master: Fix T80770: UV Image Editor: Display Texture Paint UVs Not Working
Jeroen Bakker
noreply at git.blender.org
Mon Sep 14 15:33:12 CEST 2020
Commit: 716ea15479895e56eb9f6d973aca88a5436d7efe
Author: Jeroen Bakker
Date: Mon Sep 14 15:31:26 2020 +0200
Branches: master
https://developer.blender.org/rB716ea15479895e56eb9f6d973aca88a5436d7efe
Fix T80770: UV Image Editor: Display Texture Paint UVs Not Working
When developing the image draw engine I wasn't aware of this option. But
now it is back.
===================================================================
M source/blender/draw/engines/overlay/overlay_edit_uv.c
===================================================================
diff --git a/source/blender/draw/engines/overlay/overlay_edit_uv.c b/source/blender/draw/engines/overlay/overlay_edit_uv.c
index 109db6433e0..adbf7168394 100644
--- a/source/blender/draw/engines/overlay/overlay_edit_uv.c
+++ b/source/blender/draw/engines/overlay/overlay_edit_uv.c
@@ -96,16 +96,19 @@ void OVERLAY_edit_uv_init(OVERLAY_Data *vedata)
(ts->uv_selectmode == UV_SELECT_FACE);
const bool do_uvstretching_overlay = is_image_type && is_uv_editor && is_edit_mode &&
((sima->flag & SI_DRAW_STRETCH) != 0);
+ const bool do_tex_paint_shadows = (sima->flag & SI_NO_DRAW_TEXPAINT) == 0;
+
pd->edit_uv.do_faces = do_faces && !do_uvstretching_overlay;
pd->edit_uv.do_face_dots = do_faces && do_face_dots;
pd->edit_uv.do_uv_overlay = do_uv_overlay;
- pd->edit_uv.do_uv_shadow_overlay =
- is_image_type &&
- ((is_paint_mode &&
- ((draw_ctx->object_mode & (OB_MODE_TEXTURE_PAINT | OB_MODE_EDIT)) != 0)) ||
- (is_view_mode && ((draw_ctx->object_mode & (OB_MODE_TEXTURE_PAINT)) != 0)) ||
- (do_uv_overlay && (show_modified_uvs)));
+ pd->edit_uv.do_uv_shadow_overlay = is_image_type &&
+ ((is_paint_mode && do_tex_paint_shadows &&
+ ((draw_ctx->object_mode &
+ (OB_MODE_TEXTURE_PAINT | OB_MODE_EDIT)) != 0)) ||
+ (is_view_mode && do_tex_paint_shadows &&
+ ((draw_ctx->object_mode & (OB_MODE_TEXTURE_PAINT)) != 0)) ||
+ (do_uv_overlay && (show_modified_uvs)));
pd->edit_uv.do_uv_stretching_overlay = do_uvstretching_overlay;
pd->edit_uv.uv_opacity = sima->uv_opacity;
pd->edit_uv.do_tiled_image_overlay = is_image_type && is_tiled_image;
More information about the Bf-blender-cvs
mailing list