diff options
author | Jeroen Bakker <jeroen@blender.org> | 2020-09-14 16:31:26 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2020-09-14 16:32:31 +0300 |
commit | 716ea15479895e56eb9f6d973aca88a5436d7efe (patch) | |
tree | 8e60d2751dd13e21e3d744fde6e291c0edc83868 /source/blender | |
parent | 6aeafacf8611af27de9dae122bc31aa4a7d613aa (diff) |
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.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/overlay/overlay_edit_uv.c | 15 |
1 files changed, 9 insertions, 6 deletions
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; |