[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12075] trunk/blender/source/blender/src: unwrapper wasnt working properly when UVSyncSelection was NOT enabled.

Campbell Barton cbarton at metavr.com
Tue Sep 18 04:59:57 CEST 2007


Revision: 12075
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12075
Author:   campbellbarton
Date:     2007-09-18 04:59:57 +0200 (Tue, 18 Sep 2007)

Log Message:
-----------
unwrapper wasnt working properly when UVSyncSelection was NOT enabled.
unwrapper and UV mapping menu items were not selecting UV's when initializing a new UV layer
selecting with the brush (BB) in the UV window did not update in the 3D view realtime, use the lock settings to make this work.

Modified Paths:
--------------
    trunk/blender/source/blender/src/editface.c
    trunk/blender/source/blender/src/editsima.c
    trunk/blender/source/blender/src/unwrapper.c

Modified: trunk/blender/source/blender/src/editface.c
===================================================================
--- trunk/blender/source/blender/src/editface.c	2007-09-17 21:03:45 UTC (rev 12074)
+++ trunk/blender/source/blender/src/editface.c	2007-09-18 02:59:57 UTC (rev 12075)
@@ -365,6 +365,14 @@
 		
 		if (!EM_texFaceCheck())
 			return;
+		
+		/* select new UV's */
+		if ((G.sima->flag & SI_SYNC_UVSEL)==0) {
+			for(efa=em->faces.first; efa; efa=efa->next) {
+				MTFace *tf= (MTFace *)CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
+				SIMA_FACESEL_SET(efa, tf);
+			}
+		}
 	}
 	
 	ob=OBACT;

Modified: trunk/blender/source/blender/src/editsima.c
===================================================================
--- trunk/blender/source/blender/src/editsima.c	2007-09-17 21:03:45 UTC (rev 12074)
+++ trunk/blender/source/blender/src/editsima.c	2007-09-18 02:59:57 UTC (rev 12075)
@@ -964,7 +964,6 @@
 	EditFace *efa;
 	float offset[2];
 	MTFace *tface;
-
 	float ellipse[2]; // we need to deal with ellipses, as
 	                  // non square textures require for circle
 					  // selection. this ellipse is normalized; r = 1.0
@@ -995,11 +994,14 @@
 			bglFlush();
 			glDrawBuffer(GL_BACK);
 		}
+		
+		
+		if (selecting == LEFTMOUSE)	EM_select_flush();
+		else						EM_deselect_flush();
+		
+		if (G.sima->lock && (G.sima->flag & SI_SYNC_UVSEL))
+			force_draw_plus(SPACE_VIEW3D, 0);
 	}
-	
-	if (selecting == LEFTMOUSE)	EM_select_flush();
-	else						EM_deselect_flush();
-	allqueue(REDRAWVIEW3D, 0);
 }
 
 

Modified: trunk/blender/source/blender/src/unwrapper.c
===================================================================
--- trunk/blender/source/blender/src/unwrapper.c	2007-09-17 21:03:45 UTC (rev 12074)
+++ trunk/blender/source/blender/src/unwrapper.c	2007-09-18 02:59:57 UTC (rev 12075)
@@ -215,14 +215,11 @@
 		float *uv[4];
 		int nverts;
 		
-		if (efa->h)
+		if ((efa->h) || (sel && (efa->f & SELECT)==0)) 
 			continue;
 
 		tf= (MTFace *)CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
 		
-		if (sel && !SIMA_FACESEL_CHECK(efa, tf))
-			continue;
-
 		if (implicit &&
 			!(	SIMA_UVSEL_CHECK(efa, tf, 0) ||
 				SIMA_UVSEL_CHECK(efa, tf, 1) ||
@@ -284,7 +281,7 @@
 }
 
 
-extern int EM_texFaceCheck();
+extern int EM_texFaceCheck(void);
 
 void unwrap_lscm(short seamcut)
 {
@@ -300,6 +297,16 @@
 		
 		if (!EM_texFaceCheck())
 			return;
+		
+		/* select new UV's */
+		if ((G.sima->flag & SI_SYNC_UVSEL)==0) {
+			EditFace *efa;
+			MTFace *tf;
+			for(efa=em->faces.first; efa; efa=efa->next) {
+				tf= (MTFace *)CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
+				SIMA_FACESEL_SET(efa, tf);
+			}
+		}
 	}
 
 	handle = construct_param_handle(em, 0, fillholes, seamcut == 0);





More information about the Bf-blender-cvs mailing list