[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42361] branches/bmesh/blender/source/ blender/bmesh: some formatting edits & #if 0 files which are not used.

Campbell Barton ideasman42 at gmail.com
Fri Dec 2 23:35:09 CET 2011


Revision: 42361
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42361
Author:   campbellbarton
Date:     2011-12-02 22:35:05 +0000 (Fri, 02 Dec 2011)
Log Message:
-----------
some formatting edits & #if 0 files which are not used.

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/bmesh/bmesh.h
    branches/bmesh/blender/source/blender/bmesh/editmesh_tools.c
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_eulers.c
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_polygon.c
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_private.h
    branches/bmesh/blender/source/blender/bmesh/intern/bmesh_structure.c
    branches/bmesh/blender/source/blender/bmesh/intern/editmesh_to_bmesh.c
    branches/bmesh/blender/source/blender/bmesh/intern/in-progress/BME_conversions.c
    branches/bmesh/blender/source/blender/bmesh/operators/subdivideop.c
    branches/bmesh/blender/source/blender/bmesh/tools/BME_bevel.c
    branches/bmesh/blender/source/blender/bmesh/tools/BME_dupe_ops.c
    branches/bmesh/blender/source/blender/bmesh/tools/BME_duplicate.c
    branches/bmesh/blender/source/blender/bmesh/tools/BME_extrude.c
    branches/bmesh/blender/source/blender/bmesh/tools/BME_weld.c

Modified: branches/bmesh/blender/source/blender/bmesh/bmesh.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/bmesh.h	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/bmesh.h	2011-12-02 22:35:05 UTC (rev 42361)
@@ -254,7 +254,7 @@
   the face bounds.  Note that this uses a best-axis projection
   test, instead of projecting co directly into f's orientation
   space, so there might be accuracy issues.*/
-int BM_Point_In_Face(BMesh *bm, BMFace *f, float co[3]);
+int BM_Point_In_Face(BMesh *bm, BMFace *f, const float co[3]);
 
 /*Interpolation*/
 

Modified: branches/bmesh/blender/source/blender/bmesh/editmesh_tools.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/editmesh_tools.c	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/editmesh_tools.c	2011-12-02 22:35:05 UTC (rev 42361)
@@ -1,3 +1,5 @@
+#if 0
+
 /*
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
@@ -7203,3 +7205,5 @@
 		BIF_undo_push("Mirror Color face");
 	}
 }
+
+#endif

Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_eulers.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_eulers.c	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_eulers.c	2011-12-02 22:35:05 UTC (rev 42361)
@@ -131,7 +131,8 @@
  *	A BMEdge pointer.
  */
 
-BMEdge *bmesh_me(BMesh *bm, BMVert *v1, BMVert *v2){
+BMEdge *bmesh_me(BMesh *bm, BMVert *v1, BMVert *v2)
+{
 	BMEdge *e=NULL;
 	BMNode *d1=NULL, *d2=NULL;
 	int valance1=0, valance2=0, edok;
@@ -461,7 +462,8 @@
  *
 */
 
-BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **re){
+BMVert *bmesh_semv(BMesh *bm, BMVert *tv, BMEdge *e, BMEdge **re)
+{
 	BMVert *nv, *ov;
 	BMNode *diskbase;
 	BMEdge *ne;
@@ -633,7 +635,8 @@
  *	Returns -
  *  A BMFace pointer
  */
-BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, BMLoop **rl){
+BMFace *bmesh_sfme(BMesh *bm, BMFace *f, BMVert *v1, BMVert *v2, BMLoop **rl)
+{
 
 	BMFace *f2;
 	BMLoop *v1loop = NULL, *v2loop = NULL, *curloop, *f1loop=NULL, *f2loop=NULL;

Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_polygon.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_polygon.c	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_polygon.c	2011-12-02 22:35:05 UTC (rev 42361)
@@ -381,7 +381,7 @@
  *
 */
 
-void poly_rotate_plane(float normal[3], float (*verts)[3], int nverts)
+void poly_rotate_plane(const float normal[3], float (*verts)[3], const int nverts)
 {
 
 	float up[3] = {0.0f,0.0f,1.0f}, axis[3], q[4];
@@ -607,7 +607,7 @@
   test, instead of projecting co directly into f's orientation
   space, so there might be accuracy issues.
 */
-int BM_Point_In_Face(BMesh *bm, BMFace *f, float co[3])
+int BM_Point_In_Face(BMesh *bm, BMFace *f, const float co[3])
 {
 	int xn, yn, zn, ax, ay;
 	float co2[3], cent[3] = {0.0f, 0.0f, 0.0f}, out[3] = {FLT_MAX*0.5f, FLT_MAX*0.5f, 0};

Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_private.h
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_private.h	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_private.h	2011-12-02 22:35:05 UTC (rev 42361)
@@ -86,7 +86,7 @@
 void bmesh_update_face_normal(struct BMesh *bm, struct BMFace *f, 
                               float (*projectverts)[3]);
 void compute_poly_plane(float (*verts)[3], int nverts);
-void poly_rotate_plane(float normal[3], float (*verts)[3], int nverts);
+void poly_rotate_plane(const float normal[3], float (*verts)[3], const int nverts);
 void bmesh_flip_normal(struct BMesh *bm, struct BMFace *f);
 
 BMEdge *bmesh_disk_next(BMEdge *e, BMVert *v);

Modified: branches/bmesh/blender/source/blender/bmesh/intern/bmesh_structure.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/bmesh_structure.c	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/intern/bmesh_structure.c	2011-12-02 22:35:05 UTC (rev 42361)
@@ -697,7 +697,8 @@
  *  Returns -
  *	Pointer to bmesh_CycleNode.
  */
-BMNode *bmesh_disk_getpointer(BMEdge *e, BMVert *v){
+BMNode *bmesh_disk_getpointer(BMEdge *e, BMVert *v)
+{
 	/*returns pointer to the cycle node for the appropriate vertex in this disk*/
 	if(e->v1 == v) return &(e->d1);
 	else if (e->v2 == v) return &(e->d2);
@@ -849,7 +850,8 @@
 	return 0;
 }
 
-BMEdge *bmesh_disk_existedge(BMVert *v1, BMVert *v2){
+BMEdge *bmesh_disk_existedge(BMVert *v1, BMVert *v2)
+{
 	BMNode *diskbase;
 	BMEdge *curedge;
 	int i, len=0;
@@ -867,7 +869,8 @@
 }
 
 /*end disk cycle routines*/
-BMLoop *bmesh_radial_nextloop(BMLoop *l){
+BMLoop *bmesh_radial_nextloop(BMLoop *l)
+{
 	return l->radial_next;
 }
 

Modified: branches/bmesh/blender/source/blender/bmesh/intern/editmesh_to_bmesh.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/editmesh_to_bmesh.c	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/intern/editmesh_to_bmesh.c	2011-12-02 22:35:05 UTC (rev 42361)
@@ -400,7 +400,8 @@
  *
 */
 
-BMesh *editmesh_to_bmesh_intern(EditMesh *em, BMesh *bm, BMOperator *op) {
+BMesh *editmesh_to_bmesh_intern(EditMesh *em, BMesh *bm, BMOperator *op)
+{
 	BMVert *v;
 	EditVert *eve;
 	EditEdge *eed;

Modified: branches/bmesh/blender/source/blender/bmesh/intern/in-progress/BME_conversions.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/intern/in-progress/BME_conversions.c	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/intern/in-progress/BME_conversions.c	2011-12-02 22:35:05 UTC (rev 42361)
@@ -1,3 +1,5 @@
+#if 0
+
 /**
  * BME_conversions.c    August 2008
  *
@@ -71,7 +73,8 @@
  *
 */
 
-static void DMcorners_to_loops(BMMesh *bm, CustomData *facedata, int index, BMFace *f, int numCol, int numTex){
+static void DMcorners_to_loops(BMMesh *bm, CustomData *facedata, int index, BMFace *f, int numCol, int numTex)
+{
 	int i, j;
 	BMLoop *l;
 	MTFace *texface;
@@ -127,7 +130,8 @@
  *
 */
 
-static void loops_to_DMcorners(BMMesh *bm, CustomData *facedata, int index, BMFace *f,int numCol, int numTex){
+static void loops_to_DMcorners(BMMesh *bm, CustomData *facedata, int index, BMFace *f,int numCol, int numTex)
+{
 	int i, j;
 	BMLoop *l;
 	MTFace *texface;
@@ -476,3 +480,5 @@
 	BLI_edgehash_free(edge_hash, NULL);
 	return result;
 }
+
+#endif

Modified: branches/bmesh/blender/source/blender/bmesh/operators/subdivideop.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/operators/subdivideop.c	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/operators/subdivideop.c	2011-12-02 22:35:05 UTC (rev 42361)
@@ -82,57 +82,57 @@
 */
 
 #if 0 //misc. code, maps a parametric coordinate to a fractal line
-float lastrnd[3], vec2[3] = {0.0f, 0.0f, 0.0f};
-int seed = BLI_rand();
-int d, i, j, dp, lvl, wid;
-float df;
+	float lastrnd[3], vec2[3] = {0.0f, 0.0f, 0.0f};
+	int seed = BLI_rand();
+	int d, i, j, dp, lvl, wid;
+	float df;
 
-BLI_srandom(seed);
+	BLI_srandom(seed);
 
-wid = (params->numcuts+2);
-dp = perc*wid;
-wid /= 2;
-d = lvl = 0;
-while (1) {
-	if (d > dp) {
-		d -= wid;
-	} else if (d < dp) {
-		d += wid;
-	} else {
-		break;
+	wid = (params->numcuts+2);
+	dp = perc*wid;
+	wid /= 2;
+	d = lvl = 0;
+	while (1) {
+		if (d > dp) {
+			d -= wid;
+		} else if (d < dp) {
+			d += wid;
+		} else {
+			break;
+		}
+
+
+		wid = MAX2((wid/2), 1);
+		lvl++;
 	}
-	
-	
-	wid = MAX2((wid/2), 1);
-	lvl++;
-}
 
-zero_v3(vec1);
-df = 1.0f;
-for (i=0; i<lvl; i++, df /= 4.0f) {
-	int tot = (1<<i);
-	
-	lastrnd[0] = BLI_drand()-0.5f;
-	lastrnd[1] = BLI_drand()-0.5f;
-	lastrnd[2] = BLI_drand()-0.5f;
-	for (j=0; j<tot; j++) {
-		float a, b, rnd[3], rnd2[3];
-		
-		rnd[0] = BLI_drand()-0.5f;
-		rnd[1] = BLI_drand()-0.5f;
-		rnd[2] = BLI_drand()-0.5f;
-		
-		a = (float)j*(float)((float)params->numcuts/(float)tot);
-		b = (float)(j+1)*(float)((float)params->numcuts/(float)tot);
-		if (d >= a && d <= b) {
-			interp_v3_v3v3(rnd2, lastrnd, rnd, (((float)d)-a)/(b-a));
-			mul_v3_fl(rnd2, df);
-			add_v3_v3(vec1, rnd2);
+	zero_v3(vec1);
+	df = 1.0f;
+	for (i=0; i<lvl; i++, df /= 4.0f) {
+		int tot = (1<<i);
+
+		lastrnd[0] = BLI_drand()-0.5f;
+		lastrnd[1] = BLI_drand()-0.5f;
+		lastrnd[2] = BLI_drand()-0.5f;
+		for (j=0; j<tot; j++) {
+			float a, b, rnd[3], rnd2[3];
+
+			rnd[0] = BLI_drand()-0.5f;
+			rnd[1] = BLI_drand()-0.5f;
+			rnd[2] = BLI_drand()-0.5f;
+
+			a = (float)j*(float)((float)params->numcuts/(float)tot);
+			b = (float)(j+1)*(float)((float)params->numcuts/(float)tot);
+			if (d >= a && d <= b) {
+				interp_v3_v3v3(rnd2, lastrnd, rnd, (((float)d)-a)/(b-a));
+				mul_v3_fl(rnd2, df);
+				add_v3_v3(vec1, rnd2);
+			}
+
+			copy_v3_v3(lastrnd, rnd);
 		}
-		
-		copy_v3_v3(lastrnd, rnd);
 	}
-}
 #endif
 /*connects face with smallest len, which I think should always be correct for
   edge subdivision*/

Modified: branches/bmesh/blender/source/blender/bmesh/tools/BME_bevel.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/tools/BME_bevel.c	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/tools/BME_bevel.c	2011-12-02 22:35:05 UTC (rev 42361)
@@ -1,3 +1,5 @@
+#if 0
+
 /*
  *	Functions for changing the topology of a mesh.
  *
@@ -942,3 +944,5 @@
 	BME_free_transdata(td);
 	return bm;
 }
+
+#endif

Modified: branches/bmesh/blender/source/blender/bmesh/tools/BME_dupe_ops.c
===================================================================
--- branches/bmesh/blender/source/blender/bmesh/tools/BME_dupe_ops.c	2011-12-02 22:14:20 UTC (rev 42360)
+++ branches/bmesh/blender/source/blender/bmesh/tools/BME_dupe_ops.c	2011-12-02 22:35:05 UTC (rev 42361)
@@ -1,3 +1,5 @@
+#if 0
+
 /*
  *  BME_DUPLICATE.C
  *
@@ -315,4 +317,6 @@
 	/*cleanup*/
 	BMO_Finish_Op(&dupeop);
 	BMO_Finish_Op(&delop);
-}
\ No newline at end of file
+}
+
+#endif


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list