[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36153] branches/bmesh/blender/source/ blender: =bmesh= fixed a few bugs in the uv editor

Joseph Eagar joeedh at gmail.com
Thu Apr 14 00:30:25 CEST 2011


Revision: 36153
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36153
Author:   joeedh
Date:     2011-04-13 22:30:25 +0000 (Wed, 13 Apr 2011)
Log Message:
-----------
=bmesh= fixed a few bugs in the uv editor

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h
    branches/bmesh/blender/source/blender/bmesh/bmesh_operators.h
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_operators.c
    branches/bmesh/blender/source/blender/bmesh/operators/subdivideop.c
    branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
    branches/bmesh/blender/source/blender/editors/mesh/loopcut.c
    branches/bmesh/blender/source/blender/editors/space_image/image_buttons.c
    branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c
    branches/bmesh/blender/source/blender/editors/transform/transform.c
    branches/bmesh/blender/source/blender/editors/transform/transform_conversions.c
    branches/bmesh/blender/source/blender/editors/uvedit/uvedit_ops.c
    branches/bmesh/blender/source/blender/editors/uvedit/uvedit_unwrap_ops.c

Modified: branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h	2011-04-13 21:48:16 UTC (rev 36152)
+++ branches/bmesh/blender/source/blender/bmesh/bmesh_operator_api.h	2011-04-13 22:30:25 UTC (rev 36153)
@@ -97,6 +97,7 @@
 	int type;
 	int slottype;
 	int needflag;
+	int flag;
 	struct BMOpSlot slots[BMOP_MAX_SLOTS];
 	void (*exec)(struct BMesh *bm, struct BMOperator *op);
 	MemArena *arena;
@@ -117,8 +118,9 @@
 } BMOpDefine;
 
 /*BMOpDefine->flag*/
-#define BMOP_UNTAN_MULTIRES 1 /*switch from multires tangent space to absolute coordinates*/
+#define BMOP_UNTAN_MULTIRES		1 /*switch from multires tangent space to absolute coordinates*/
 
+
 /*ensures consistent normals before operator execution,
   restoring the original ones windings/normals afterwards.
   keep in mind, this won't work if the input mesh isn't
@@ -228,6 +230,9 @@
 void BM_remove_tagged_edges(struct BMesh *bm, int flag);
 void BM_remove_tagged_verts(struct BMesh *bm, int flag);
 
+void BMO_Set_OpFlag(struct BMesh *bm, struct BMOperator *op, int flag);
+void BMO_Clear_OpFlag(struct BMesh *bm, struct BMOperator *op, int flag);
+
 void BMO_Set_Float(struct BMOperator *op, const char *slotname, float f);
 float BMO_Get_Float(BMOperator *op, const char *slotname);
 void BMO_Set_Int(struct BMOperator *op, const char *slotname, int i);

Modified: branches/bmesh/blender/source/blender/bmesh/bmesh_operators.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/bmesh_operators.h	2011-04-13 21:48:16 UTC (rev 36152)
+++ branches/bmesh/blender/source/blender/bmesh/bmesh_operators.h	2011-04-13 22:30:25 UTC (rev 36153)
@@ -80,8 +80,8 @@
 
 void BMOP_DupeFromFlag(struct BMesh *bm, int etypeflag, int flag);
 void BM_esubdivideflag(struct Object *obedit, BMesh *bm, int flag, float smooth, 
-		       float fractal, int beauty, int numcuts, int seltype,
-		       int cornertype, int singleedge, int gridfill, int seed);
+               float fractal, int beauty, int numcuts, int seltype,
+               int cornertype, int singleedge, int gridfill, int seed);
 void BM_extrudefaceflag(BMesh *bm, int flag);
 
 /*this next one return 1 if they did anything, or zero otherwise.

Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_operators.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_operators.c	2011-04-13 21:48:16 UTC (rev 36152)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_operators.c	2011-04-13 22:30:25 UTC (rev 36153)
@@ -48,6 +48,16 @@
 	sizeof(element_mapping)
 };
 
+void BMO_Set_OpFlag(BMesh *bm, BMOperator *op, int flag)
+{
+	op->flag |= flag;
+}
+
+void BMO_Clear_OpFlag(BMesh *UNUSED(bm), BMOperator *op, int flag)
+{
+	op->flag &= ~flag;
+}
+
 /*
  * BMESH OPSTACK PUSH
  *
@@ -99,6 +109,7 @@
 
 	memset(op, 0, sizeof(BMOperator));
 	op->type = opcode;
+	op->flag = opdefines[opcode]->flag;
 	
 	/*initialize the operator slot types*/
 	for(i = 0; opdefines[opcode]->slottypes[i].type; i++) {
@@ -131,11 +142,11 @@
 	BMO_push(bm, op);
 
 	if(bm->stackdepth == 2)
-		bmesh_begin_edit(bm, opdefines[op->type]->flag);
+		bmesh_begin_edit(bm, op->flag);
 	op->exec(bm, op);
 	
 	if(bm->stackdepth == 2)
-		bmesh_end_edit(bm, opdefines[op->type]->flag);
+		bmesh_end_edit(bm, op->flag);
 	
 	BMO_pop(bm);	
 }

Modified: branches/bmesh/blender/source/blender/bmesh/operators/subdivideop.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/subdivideop.c	2011-04-13 21:48:16 UTC (rev 36152)
+++ branches/bmesh/blender/source/blender/bmesh/operators/subdivideop.c	2011-04-13 22:30:25 UTC (rev 36153)
@@ -1103,8 +1103,9 @@
 
 /*editmesh-emulating function*/
 void BM_esubdivideflag(Object *UNUSED(obedit), BMesh *bm, int flag, float smooth,
-		       float fractal, int beauty, int numcuts, 
-		       int seltype, int cornertype, int singleedge, int gridfill, int seed)
+               float fractal, int beauty, int numcuts, 
+               int seltype, int cornertype, int singleedge, 
+               int gridfill, int seed)
 {
 	BMOperator op;
 	

Modified: branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c	2011-04-13 21:48:16 UTC (rev 36152)
+++ branches/bmesh/blender/source/blender/editors/mesh/bmesh_tools.c	2011-04-13 22:30:25 UTC (rev 36153)
@@ -1334,7 +1334,7 @@
 	return OPERATOR_FINISHED;
 }
 
-static int mesh_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *event)
+static int mesh_duplicate_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
 	WM_cursor_wait(1);
 	mesh_duplicate_exec(C, op);
@@ -1900,7 +1900,7 @@
 	}
 }
 
-static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *op)
+static int mesh_faces_shade_smooth_exec(bContext *C, wmOperator *UNUSED(op))
 {
 	Object *obedit= CTX_data_edit_object(C);
 	BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh;
@@ -1928,7 +1928,7 @@
 	ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 }
 
-static int mesh_faces_shade_flat_exec(bContext *C, wmOperator *op)
+static int mesh_faces_shade_flat_exec(bContext *C, wmOperator *UNUSED(op))
 {
 	Object *obedit= CTX_data_edit_object(C);
 	BMEditMesh *em= ((Mesh *)obedit->data)->edit_btmesh;
@@ -2317,7 +2317,7 @@
 	{5, "COLLAPSE", 0, "Collapse", ""},
 	{0, NULL, 0, NULL, NULL}};
 
-static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *ptr, int *free)
+static EnumPropertyItem *merge_type_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
 {	
 	Object *obedit;
 	EnumPropertyItem *item= NULL;
@@ -3234,7 +3234,7 @@
 	return OPERATOR_FINISHED;
 }
 
-static EnumPropertyItem *shape_itemf(bContext *C, PointerRNA *ptr, int *free)
+static EnumPropertyItem *shape_itemf(bContext *C, PointerRNA *UNUSED(ptr), int *free)
 {	
 	Object *obedit= CTX_data_edit_object(C);
 	Mesh *me= (obedit) ? obedit->data : NULL;
@@ -3361,7 +3361,7 @@
 	RNA_def_int(ot->srna, "axis", 0, 0, 2, "Axis", "Select the axis to compare each vertex on", 0, 2);
 }
 
-static int solidify_exec(bContext *C, wmOperator *op)
+static int solidify_exec(bContext *UNUSED(C), wmOperator *UNUSED(op))
 {
 #if 0
 	Object *obedit= CTX_data_edit_object(C);

Modified: branches/bmesh/blender/source/blender/editors/mesh/loopcut.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/mesh/loopcut.c	2011-04-13 21:48:16 UTC (rev 36152)
+++ branches/bmesh/blender/source/blender/editors/mesh/loopcut.c	2011-04-13 22:30:25 UTC (rev 36153)
@@ -296,6 +296,7 @@
 			BM_esubdivideflag(lcd->ob, em->bm, BM_SELECT, 0.0f, 
 			                  0.0f, 0, cuts, SUBDIV_SELECT_LOOPCUT, 
 			                  SUBD_PATH, 0, 0, 0);
+			
 			/* force edge slide to edge select mode in in face select mode */
 			if (em->selectmode & SCE_SELECT_FACE) {
 				if (em->selectmode == SCE_SELECT_FACE)

Modified: branches/bmesh/blender/source/blender/editors/space_image/image_buttons.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/space_image/image_buttons.c	2011-04-13 21:48:16 UTC (rev 36152)
+++ branches/bmesh/blender/source/blender/editors/space_image/image_buttons.c	2011-04-13 22:30:25 UTC (rev 36153)
@@ -208,7 +208,7 @@
 	MTexPoly *tf;
 	BMLoop *l;
 	MLoopUV *luv;
-	BMIter iter, liter;
+	BMIter iter;
 	static float ocent[2];
 	float cent[2]= {0.0, 0.0};
 	int imx= 256, imy= 256;

Modified: branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c	2011-04-13 21:48:16 UTC (rev 36152)
+++ branches/bmesh/blender/source/blender/editors/space_view3d/drawobject.c	2011-04-13 22:30:25 UTC (rev 36153)
@@ -1737,7 +1737,6 @@
 static void draw_dm_face_centers__mapFunc(void *userData, int index, float *cent, float *UNUSED(no))
 {
 	BMFace *efa = EDBM_get_face_for_index(((void **)userData)[0], index);
-	BMEditMesh *em = ((void **)userData)[0];
 	int sel = *(((int **)userData)[1]);
 
 	if (!BM_TestHFlag(efa, BM_HIDDEN) && BM_TestHFlag(efa, BM_SELECT)==sel) {
@@ -1798,7 +1797,8 @@
 	return 0;
 }
 
-static void draw_dm_vert_pins__mapFunc(void *userData, int index, float *co)
+static void draw_dm_vert_pins__mapFunc(void *userData, int index, 
+                                       float *co, float *no_f, short *no_s)
 {
 	struct {BMEditMesh *em; Mesh *me;} *data = userData;
 	BMVert *eve = EDBM_get_vert_for_index(data->em, index);
@@ -1955,7 +1955,7 @@
 
 static void draw_dm_edges_sel_interp(BMEditMesh *em, DerivedMesh *dm, unsigned char *baseCol, unsigned char *selCol)
 {
-	unsigned char *cols[3] = {em, baseCol, selCol};
+	void *cols[3] = {em, baseCol, selCol};
 
 	dm->drawMappedEdgesInterp(dm, draw_dm_edges_sel_interp__setDrawOptions, draw_dm_edges_sel_interp__setDrawInterpOptions, cols);
 }
@@ -2044,9 +2044,7 @@
 	struct { unsigned char *cols[3]; BMEditMesh *em; BMFace *efa_act; Mesh *me;} *data = userData;
 	BMFace *efa = EDBM_get_face_for_index(data->em, index);
 	unsigned char *col;
-	BMIter vfiter;
-	BMVert *v;
-	int vcount, pin=0;
+	int pin=0;
 	int opac = UI_GetThemeValue(TH_PIN_OPAC);
 	
 	if (!efa)

Modified: branches/bmesh/blender/source/blender/editors/transform/transform.c
===================================================================
--- branches/bmesh/blender/source/blender/editors/transform/transform.c	2011-04-13 21:48:16 UTC (rev 36152)
+++ branches/bmesh/blender/source/blender/editors/transform/transform.c	2011-04-13 22:30:25 UTC (rev 36153)
@@ -4662,10 +4662,10 @@
 		BMFace *f;
 		
 		BM_ITER(f, &fiter, em->bm, BM_FACES_OF_VERT, tempsv->v) {
-			BMIter liter2, fiter2;
-			BMFace *f2, *copyf, *copyf2;
+			BMIter liter2;
+			BMFace *copyf, *copyf2;
 			BMLoop *l2;
-			int sel, ok, do_vdata;
+			int sel, do_vdata;
 			
 			if (BLI_smallhash_haskey(&visit, (uintptr_t)f))
 				continue;

Modified: branches/bmesh/blender/source/blender/editors/transform/transform_conversions.c
===================================================================

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list