From 038345fa5650350f68df690fcd77f1ddc451b07b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 16 Jul 2021 17:47:42 +1000 Subject: Fix T89861: Checking face selection breaks UV stitch operator --- source/blender/editors/uvedit/uvedit_smart_stitch.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/editors/uvedit/uvedit_smart_stitch.c') diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index b40e50851c3..535a0e00347 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1928,6 +1928,11 @@ static StitchState *stitch_init(bContext *C, state->obedit = obedit; state->em = em; + /* Workaround for sync-select & face-select mode which implies all selected faces are detached, + * for stitch this isn't useful behavior, see T86924. */ + const int selectmode_orig = scene->toolsettings->selectmode; + scene->toolsettings->selectmode = SCE_SELECT_VERTEX; + /* in uv synch selection, all uv's are visible */ if (ts->uv_flag & UV_SYNC_SELECTION) { state->element_map = BM_uv_element_map_create(state->em->bm, scene, false, false, true, true); @@ -1935,6 +1940,9 @@ static StitchState *stitch_init(bContext *C, else { state->element_map = BM_uv_element_map_create(state->em->bm, scene, true, false, true, true); } + + scene->toolsettings->selectmode = selectmode_orig; + if (!state->element_map) { state_delete(state); return NULL; -- cgit v1.2.3