Fix T48082: Unwrap overwrites face selection
Sync selection option made adding a new UV layer select all edit-mesh faces. Now just select the UV's, ignoring sync-select option.
This commit is contained in:
parent
45a089c138
commit
90271e7ff1
Notes:
blender-bot
2023-02-14 08:00:44 +01:00
Referenced by issue #48082, Edit mode selection lost during new partial unwrap if UV Selection Sync enabled
|
@ -145,9 +145,15 @@ static bool ED_uvedit_ensure_uvs(bContext *C, Scene *scene, Object *obedit)
|
|||
if (ima)
|
||||
ED_uvedit_assign_image(bmain, scene, obedit, ima, NULL);
|
||||
|
||||
/* select new UV's */
|
||||
/* select new UV's (ignore UV_SYNC_SELECTION in this case) */
|
||||
BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) {
|
||||
uvedit_face_select_enable(scene, em, efa, false, cd_loop_uv_offset);
|
||||
BMIter liter;
|
||||
BMLoop *l;
|
||||
|
||||
BM_ITER_ELEM (l, &liter, efa, BM_LOOPS_OF_FACE) {
|
||||
MLoopUV *luv = BM_ELEM_CD_GET_VOID_P(l, cd_loop_uv_offset);
|
||||
luv->flag |= MLOOPUV_VERTSEL;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
Loading…
Reference in New Issue