[Bf-blender-cvs] [90271e7] master: Fix T48082: Unwrap overwrites face selection

Campbell Barton noreply at git.blender.org
Mon Apr 11 12:25:14 CEST 2016


Commit: 90271e7ff185b3714c40182db953923567933bae
Author: Campbell Barton
Date:   Mon Apr 11 20:24:46 2016 +1000
Branches: master
https://developer.blender.org/rB90271e7ff185b3714c40182db953923567933bae

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.

===================================================================

M	source/blender/editors/uvedit/uvedit_unwrap_ops.c

===================================================================

diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index 9f2b0f1..768624b 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -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;




More information about the Bf-blender-cvs mailing list