[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44508] trunk/blender/source/blender: code cleanup:

Campbell Barton ideasman42 at gmail.com
Tue Feb 28 10:48:05 CET 2012


Revision: 44508
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44508
Author:   campbellbarton
Date:     2012-02-28 09:48:00 +0000 (Tue, 28 Feb 2012)
Log Message:
-----------
code cleanup:

use bmo_* prefix for operator defs, was confusing with bmesh_* api functions.

Modified Paths:
--------------
    trunk/blender/source/blender/bmesh/intern/bmesh_mesh.c
    trunk/blender/source/blender/bmesh/intern/bmesh_opdefines.c
    trunk/blender/source/blender/bmesh/intern/bmesh_operators_private.h
    trunk/blender/source/blender/bmesh/operators/bmo_bevel.c
    trunk/blender/source/blender/bmesh/operators/bmo_connect.c
    trunk/blender/source/blender/bmesh/operators/bmo_create.c
    trunk/blender/source/blender/bmesh/operators/bmo_dissolve.c
    trunk/blender/source/blender/bmesh/operators/bmo_dupe.c
    trunk/blender/source/blender/bmesh/operators/bmo_edgesplit.c
    trunk/blender/source/blender/bmesh/operators/bmo_extrude.c
    trunk/blender/source/blender/bmesh/operators/bmo_join_triangles.c
    trunk/blender/source/blender/bmesh/operators/bmo_mesh_conv.c
    trunk/blender/source/blender/bmesh/operators/bmo_mirror.c
    trunk/blender/source/blender/bmesh/operators/bmo_primitive.c
    trunk/blender/source/blender/bmesh/operators/bmo_removedoubles.c
    trunk/blender/source/blender/bmesh/operators/bmo_subdivide.c
    trunk/blender/source/blender/bmesh/operators/bmo_triangulate.c
    trunk/blender/source/blender/bmesh/operators/bmo_utils.c
    trunk/blender/source/blender/editors/mesh/bmesh_tools.c

Modified: trunk/blender/source/blender/bmesh/intern/bmesh_mesh.c
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_mesh.c	2012-02-28 08:17:53 UTC (rev 44507)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_mesh.c	2012-02-28 09:48:00 UTC (rev 44508)
@@ -341,7 +341,7 @@
 	BMO_op_initf(bm, &bmop, "righthandfaces faces=%af do_flip=%b", FALSE);
 	
 	BMO_push(bm, &bmop);
-	bmesh_righthandfaces_exec(bm, &bmop);
+	bmo_righthandfaces_exec(bm, &bmop);
 	
 	BM_ITER(f, &iter, bm, BM_FACES_OF_MESH, NULL) {
 		BM_elem_flag_set(f, BM_ELEM_TAG, BMO_elem_flag_test(bm, f, FACE_FLIP));

Modified: trunk/blender/source/blender/bmesh/intern/bmesh_opdefines.c
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_opdefines.c	2012-02-28 08:17:53 UTC (rev 44507)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_opdefines.c	2012-02-28 09:48:00 UTC (rev 44508)
@@ -95,7 +95,7 @@
  *
  * Smoothes vertices by using a basic vertex averaging scheme.
  */
-static BMOpDefine def_vertexsmooth = {
+static BMOpDefine bmo_vertexsmooth_def = {
 	"vertexsmooth",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
 	 {BMO_OP_SLOT_BOOL, "mirror_clip_x"}, //set vertices close to the x axis before the operation to 0
@@ -104,7 +104,7 @@
 	 {BMO_OP_SLOT_FLT, "clipdist"}, //clipping threshod for the above three slots
 	{0} /* null-terminating sentine */,
 	},
-	bmesh_vertexsmooth_exec,
+	bmo_vertexsmooth_exec,
 	0
 };
 
@@ -114,13 +114,13 @@
  * Computes an "outside" normal for the specified input faces.
  */
 
-static BMOpDefine def_righthandfaces = {
+static BMOpDefine bmo_righthandfaces_def = {
 	"righthandfaces",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "faces"},
 	 {BMO_OP_SLOT_BOOL, "do_flip"}, //internal flag, used by bmesh_rationalize_normals
 	 {0} /* null-terminating sentine */,
 	},
-	bmesh_righthandfaces_exec,
+	bmo_righthandfaces_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES,
 };
 
@@ -134,7 +134,7 @@
  * if usefaces is 0 then geomout spits out verts and edges,
  * otherwise it spits out faces.
  */
-static BMOpDefine def_regionextend = {
+static BMOpDefine bmo_regionextend_def = {
 	"regionextend",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, //input geometry
 	 {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, //output slot, computed boundary geometry.
@@ -142,7 +142,7 @@
 	 {BMO_OP_SLOT_BOOL, "use_faces"}, //extend from faces instead of edges
 	 {0} /* null-terminating sentine */,
 	},
-	bmesh_regionextend_exec,
+	bmo_regionextend_exec,
 	0
 };
 
@@ -152,14 +152,14 @@
  * Rotates edges topologically.  Also known as "spin edge" to some people.
  * Simple example: [/] becomes [|] then [\].
  */
-static BMOpDefine def_edgerotate = {
+static BMOpDefine bmo_edgerotate_def = {
 	"edgerotate",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input edges
 	 {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, //newly spun edges
 	 {BMO_OP_SLOT_BOOL, "ccw"}, //rotate edge counter-clockwise if true, othewise clockwise
 	 {0} /* null-terminating sentine */,
 	},
-	bmesh_edgerotate_exec,
+	bmo_edgerotate_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES
 };
 
@@ -169,12 +169,12 @@
  * Reverses the winding (vertex order) of faces.  This has the effect of
  * flipping the normal.
  */
-static BMOpDefine def_reversefaces = {
+static BMOpDefine bmo_reversefaces_def = {
 	"reversefaces",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, //input faces
 	 {0} /* null-terminating sentine */,
 	},
-	bmesh_reversefaces_exec,
+	bmo_reversefaces_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES,
 };
 
@@ -184,14 +184,14 @@
  * Splits input edges (but doesn't do anything else).
  * This creates a 2-valence vert.
  */
-static BMOpDefine def_edgebisect = {
+static BMOpDefine bmo_edgebisect_def = {
 	"edgebisect",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input edges
 	 {BMO_OP_SLOT_INT, "numcuts"}, //number of cuts
 	 {BMO_OP_SLOT_ELEMENT_BUF, "outsplit"}, //newly created vertices and edges
 	 {0} /* null-terminating sentine */,
 	},
-	esplit_exec,
+	bmo_edgebisect_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES
 };
 
@@ -203,7 +203,7 @@
  * parameter (which defines the minimum distance for welding to happen).
  */
 
-static BMOpDefine def_mirror = {
+static BMOpDefine bmo_mirror_def = {
 	"mirror",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, //input geometry
 	 {BMO_OP_SLOT_MAT, "mat"}, //matrix defining the mirror transformation
@@ -213,7 +213,7 @@
 	 {BMO_OP_SLOT_BOOL,        "mirror_u"}, //mirror UVs across the u axis
 	 {BMO_OP_SLOT_BOOL,        "mirror_v"}, //mirror UVs across the v axis
 	 {0, /* null-terminating sentine */}},
-	bmesh_mirror_exec,
+	bmo_mirror_exec,
 	0,
 };
 
@@ -223,14 +223,14 @@
  * Takes input verts and find vertices they should weld to.  Outputs a
  * mapping slot suitable for use with the weld verts bmop.
  */
-static BMOpDefine def_finddoubles = {
+static BMOpDefine bmo_finddoubles_def = {
 	"finddoubles",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
 	 {BMO_OP_SLOT_ELEMENT_BUF, "keepverts"}, //list of verts to keep
 	 {BMO_OP_SLOT_FLT,         "dist"}, //minimum distance
 	 {BMO_OP_SLOT_MAPPING, "targetmapout"},
 	 {0, /* null-terminating sentine */}},
-	bmesh_finddoubles_exec,
+	bmo_finddoubles_exec,
 	0,
 };
 
@@ -240,12 +240,12 @@
  * Finds groups of vertices closer then dist and merges them together,
  * using the weld verts bmop.
  */
-static BMOpDefine def_removedoubles = {
+static BMOpDefine bmo_removedoubles_def = {
 	"removedoubles",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input verts
 	 {BMO_OP_SLOT_FLT,         "dist"}, //minimum distance
 	 {0, /* null-terminating sentine */}},
-	bmesh_removedoubles_exec,
+	bmo_removedoubles_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES,
 };
 
@@ -256,12 +256,12 @@
  * using the weld verts bmop.  The merges must go from a vert not in
  * verts to one in verts.
  */
-static BMOpDefine def_automerge = {
+static BMOpDefine bmo_automerge_def = {
 	"automerge",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input verts
 	 {BMO_OP_SLOT_FLT,         "dist"}, //minimum distance
 	 {0, /* null-terminating sentine */}},
-	bmesh_automerge_exec,
+	bmo_automerge_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES,
 };
 
@@ -270,11 +270,11 @@
  *
  * Collapses connected vertices
  */
-static BMOpDefine def_collapse = {
+static BMOpDefine bmo_collapse_def = {
 	"collapse",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */
 	 {0, /* null-terminating sentine */}},
-	bmesh_collapse_exec,
+	bmo_collapse_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES,
 };
 
@@ -284,12 +284,12 @@
  *
  * Merge uv/vcols at a specific vertex.
  */
-static BMOpDefine def_pointmerge_facedata = {
+static BMOpDefine bmo_pointmerge_facedata_def = {
 	"pointmerge_facedata",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */
 	 {BMO_OP_SLOT_ELEMENT_BUF, "snapv"}, /* snap verte */
 	 {0, /* null-terminating sentine */}},
-	bmesh_pointmerge_facedata_exec,
+	bmo_pointmerge_facedata_exec,
 	0,
 };
 
@@ -300,11 +300,11 @@
  * the bounding box center. (I know, it's not averaging but
  * the vert_snap_to_bb_center is just too long).
  */
-static BMOpDefine def_vert_average_facedata = {
+static BMOpDefine bmo_vert_average_facedata_def = {
 	"vert_average_facedata",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */
 	 {0, /* null-terminating sentine */}},
-	bmesh_vert_average_facedata_exec,
+	bmo_vert_average_facedata_exec,
 	0,
 };
 
@@ -313,12 +313,12 @@
  *
  * Merge verts together at a point.
  */
-static BMOpDefine def_pointmerge = {
+static BMOpDefine bmo_pointmerge_def = {
 	"pointmerge",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertice */
 	 {BMO_OP_SLOT_VEC,         "mergeco"},
 	 {0, /* null-terminating sentine */}},
-	bmesh_pointmerge_exec,
+	bmo_pointmerge_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES,
 };
 
@@ -327,11 +327,11 @@
  *
  * Collapses connected UV vertices.
  */
-static BMOpDefine def_collapse_uvs = {
+static BMOpDefine bmo_collapse_uvs_def = {
 	"collapse_uvs",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */
 	 {0, /* null-terminating sentine */}},
-	bmesh_collapsecon_exec,
+	bmo_collapse_uvs_exec,
 	0,
 };
 
@@ -342,11 +342,11 @@
  * use or will use this bmop).  You pass in mappings from vertices to the vertices
  * they weld with.
  */
-static BMOpDefine def_weldverts = {
+static BMOpDefine bmo_weldverts_def = {
 	"weldverts",
 	{{BMO_OP_SLOT_MAPPING, "targetmap"}, /* maps welded vertices to verts they should weld to */
 	 {0, /* null-terminating sentine */}},
-	bmesh_weldverts_exec,
+	bmo_weldverts_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES,
 };
 
@@ -356,12 +356,12 @@
  * Creates a single vertex; this bmop was necassary
  * for click-create-vertex.
  */
-static BMOpDefine def_makevert = {
+static BMOpDefine bmo_makevert_def = {
 	"makevert",
 	{{BMO_OP_SLOT_VEC, "co"}, //the coordinate of the new vert
 	 {BMO_OP_SLOT_ELEMENT_BUF, "newvertout"}, //the new vert
 	 {0, /* null-terminating sentine */}},
-	bmesh_makevert_exec,
+	bmo_makevert_exec,
 	0,
 };
 
@@ -371,7 +371,7 @@
  * Tries to intelligently join triangles according
  * to various settings and stuff.
  */
-static BMOpDefine def_join_triangles = {
+static BMOpDefine bmo_join_triangles_def = {
 	"join_triangles",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, //input geometry.
 	 {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, //joined faces
@@ -381,7 +381,7 @@
 	 {BMO_OP_SLOT_BOOL, "cmp_materials"},
 	 {BMO_OP_SLOT_FLT, "limit"},
 	 {0, /* null-terminating sentine */}},
-	bmesh_jointriangles_exec,
+	bmo_join_triangles_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES,
 };
 
@@ -396,28 +396,28 @@
  * Three verts become a triangle, four become a quad.  Two
  * become a wire edge.
  */
-static BMOpDefine def_contextual_create = {
+static BMOpDefine bmo_contextual_create_def = {
 	"contextual_create",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, //input geometry.
 	 {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, //newly-made face(s)
 	 {0, /* null-terminating sentine */}},
-	bmesh_contextual_create_exec,
+	bmo_contextual_create_exec,
 	BMO_OP_FLAG_UNTAN_MULTIRES,
 };
 
 /*
  * Bridge edge loops with faces
  */
-static BMOpDefine def_bridge_loops = {
+static BMOpDefine bmo_bridge_loops_def = {
 	"bridge_loops",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */
 	 {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* new face */
 	 {0, /* null-terminating sentine */}},
-	bmesh_bridge_loops_exec,
+	bmo_bridge_loops_exec,
 	0,
 };
 
-static BMOpDefine def_edgenet_fill = {
+static BMOpDefine bmo_edgenet_fill_def = {
 	"edgenet_fill",
 	{{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edge */

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list