diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-02-28 13:48:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-02-28 13:48:00 +0400 |
commit | b0a09bfab34e0340a1c0762355043c8b41cf573e (patch) | |
tree | 0b150cc33f3949960a02ca7c3a253c2de1542df9 | |
parent | e828b10251c5f93f8c4a78762433869f0365a85b (diff) |
code cleanup:
use bmo_* prefix for operator defs, was confusing with bmesh_* api functions.
19 files changed, 358 insertions, 361 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index 5267483af00..c4a00fe1464 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -341,7 +341,7 @@ static void bmesh_rationalize_normals(BMesh *bm, int undo) 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)); diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c index 2114c7a1da7..e69d04fdf65 100644 --- a/source/blender/bmesh/intern/bmesh_opdefines.c +++ b/source/blender/bmesh/intern/bmesh_opdefines.c @@ -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 @@ static BMOpDefine def_vertexsmooth = { {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 @@ static BMOpDefine def_vertexsmooth = { * 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 @@ static BMOpDefine def_righthandfaces = { * 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 @@ static BMOpDefine def_regionextend = { {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 @@ static BMOpDefine def_regionextend = { * 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 @@ static BMOpDefine def_edgerotate = { * 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 @@ static BMOpDefine def_reversefaces = { * 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 @@ static BMOpDefine def_edgebisect = { * 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 @@ static BMOpDefine def_mirror = { {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 @@ static BMOpDefine def_mirror = { * 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 @@ static BMOpDefine def_finddoubles = { * 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 @@ static BMOpDefine def_removedoubles = { * 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 @@ static BMOpDefine def_automerge = { * * 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 @@ static BMOpDefine def_collapse = { * * 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 @@ static BMOpDefine def_pointmerge_facedata = { * 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 @@ static BMOpDefine def_vert_average_facedata = { * * 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 @@ static BMOpDefine def_pointmerge = { * * 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 @@ static BMOpDefine def_collapse_uvs = { * 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 @@ static BMOpDefine def_weldverts = { * 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 @@ static BMOpDefine def_makevert = { * 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 @@ static BMOpDefine def_join_triangles = { {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 @@ static BMOpDefine def_join_triangles = { * 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 */ {BMO_OP_SLOT_MAPPING, "restrict"}, /* restricts edges to groups. maps edges to integer */ @@ -427,7 +427,7 @@ static BMOpDefine def_edgenet_fill = { {BMO_OP_SLOT_MAPPING, "faceout_groupmap"}, /* maps new faces to the group numbers they came fro */ {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* new face */ {0, /* null-terminating sentine */}}, - bmesh_edgenet_fill_exec, + bmo_edgenet_fill_exec, 0, }; @@ -441,12 +441,12 @@ static BMOpDefine def_edgenet_fill = { * - Two loops; two edges are added to connect the endpoints (based on the * shortest distance between each endpont). */ -static BMOpDefine def_edgenet_prepare = { +static BMOpDefine bmo_edgenet_prepare_def = { "edgenet_prepare", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input edges {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, //new edges {0, /* null-terminating sentine */}}, - bmesh_edgenet_prepare, + bmo_edgenet_prepare, 0, }; @@ -456,13 +456,13 @@ static BMOpDefine def_edgenet_prepare = { * Rotate vertices around a center, using a 3x3 rotation * matrix. Equivilent of the old rotateflag function. */ -static BMOpDefine def_rotate = { +static BMOpDefine bmo_rotate_def = { "rotate", {{BMO_OP_SLOT_VEC, "cent"}, //center of rotation {BMO_OP_SLOT_MAT, "mat"}, //matrix defining rotation {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices {0, /* null-terminating sentine */}}, - bmesh_rotate_exec, + bmo_rotate_exec, 0, }; @@ -472,12 +472,12 @@ static BMOpDefine def_rotate = { * Translate vertices by an offset. Equivelent of the * old translateflag function. */ -static BMOpDefine def_translate = { +static BMOpDefine bmo_translate_def = { "translate", {{BMO_OP_SLOT_VEC, "vec"}, //translation offset {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices {0, /* null-terminating sentine */}}, - bmesh_translate_exec, + bmo_translate_exec, 0, }; @@ -486,12 +486,12 @@ static BMOpDefine def_translate = { * * Scales vertices by an offset. */ -static BMOpDefine def_scale = { +static BMOpDefine bmo_scale_def = { "scale", {{BMO_OP_SLOT_VEC, "vec"}, //scale factor {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices {0, /* null-terminating sentine */}}, - bmesh_scale_exec, + bmo_scale_exec, 0, }; @@ -502,12 +502,12 @@ static BMOpDefine def_scale = { * Transforms a set of vertices by a matrix. Multiplies * the vertex coordinates with the matrix. */ -static BMOpDefine def_transform = { +static BMOpDefine bmo_transform_def = { "transform", {{BMO_OP_SLOT_MAT, "mat"}, //transform matrix {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices {0, /* null-terminating sentine */}}, - bmesh_transform_exec, + bmo_transform_exec, 0, }; @@ -517,12 +517,12 @@ static BMOpDefine def_transform = { * Loads a bmesh into an object/mesh. This is a "private" * bmop. */ -static BMOpDefine def_object_load_bmesh = { +static BMOpDefine bmo_object_load_bmesh_def = { "object_load_bmesh", {{BMO_OP_SLOT_PNT, "scene"}, {BMO_OP_SLOT_PNT, "object"}, {0, /* null-terminating sentine */}}, - object_load_bmesh_exec, + bmo_object_load_bmesh_exec, 0, }; @@ -532,13 +532,13 @@ static BMOpDefine def_object_load_bmesh = { * * Converts a bmesh to a Mesh. This is reserved for exiting editmode. */ -static BMOpDefine def_bmesh_to_mesh = { +static BMOpDefine bmo_bmesh_to_mesh_def = { "bmesh_to_mesh", {{BMO_OP_SLOT_PNT, "mesh"}, //pointer to a mesh structure to fill in {BMO_OP_SLOT_PNT, "object"}, //pointer to an object structure {BMO_OP_SLOT_BOOL, "notesselation"}, //don't calculate mfaces {0, /* null-terminating sentine */}}, - bmesh_to_mesh_exec, + bmo_bmesh_to_mesh_exec, 0, }; @@ -548,13 +548,13 @@ static BMOpDefine def_bmesh_to_mesh = { * Load the contents of a mesh into the bmesh. this bmop is private, it's * reserved exclusively for entering editmode. */ -static BMOpDefine def_mesh_to_bmesh = { +static BMOpDefine bmo_mesh_to_bmesh_def = { "mesh_to_bmesh", {{BMO_OP_SLOT_PNT, "mesh"}, //pointer to a Mesh structure {BMO_OP_SLOT_PNT, "object"}, //pointer to an Object structure {BMO_OP_SLOT_BOOL, "set_shapekey"}, //load active shapekey coordinates into verts {0, /* null-terminating sentine */}}, - mesh_to_bmesh_exec, + bmo_mesh_to_bmesh_exec, 0 }; @@ -563,13 +563,13 @@ static BMOpDefine def_mesh_to_bmesh = { * * Extrudes faces individually. */ -static BMOpDefine def_extrude_indivface = { +static BMOpDefine bmo_extrude_indivface_def = { "extrude_face_indiv", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, //input faces {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, //output faces {BMO_OP_SLOT_ELEMENT_BUF, "skirtout"}, //output skirt geometry, faces and edges {0} /* null-terminating sentine */}, - bmesh_extrude_face_indiv_exec, + bmo_extrude_face_indiv_exec, 0 }; @@ -579,12 +579,12 @@ static BMOpDefine def_extrude_indivface = { * Extrudes Edges into faces, note that this is very simple, there's no fancy * winged extrusion. */ -static BMOpDefine def_extrude_onlyedge = { +static BMOpDefine bmo_extrude_edge_only_def = { "extrude_edge_only", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, //input vertices {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, //output geometry {0} /* null-terminating sentine */}, - bmesh_extrude_onlyedge_exec, + bmo_extrude_edge_only_exec, 0 }; @@ -593,95 +593,95 @@ static BMOpDefine def_extrude_onlyedge = { * * Extrudes wire edges from vertices. */ -static BMOpDefine def_extrudeverts_indiv = { +static BMOpDefine bmo_extrude_vert_indiv_def = { "extrude_vert_indiv", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, //output wire edges {BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output vertices {0} /* null-terminating sentine */}, - extrude_vert_indiv_exec, + bmo_extrude_vert_indiv_exec, 0 }; -static BMOpDefine def_connectverts = { +static BMOpDefine bmo_connectverts_def = { "connectverts", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, {0} /* null-terminating sentine */}, - connectverts_exec, + bmo_connectverts_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; -static BMOpDefine def_extrudefaceregion = { - "extrudefaceregion", +static BMOpDefine bmo_extrude_face_region_def = { + "extrude_face_region", {{BMO_OP_SLOT_ELEMENT_BUF, "edgefacein"}, {BMO_OP_SLOT_MAPPING, "exclude"}, {BMO_OP_SLOT_BOOL, "alwayskeeporig"}, {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, {0} /* null-terminating sentine */}, - extrude_edge_context_exec, + bmo_extrude_face_region_exec, 0 }; -static BMOpDefine def_dissolvevertsop = { - "dissolveverts", +static BMOpDefine bmo_dissolve_verts_def = { + "dissolve_verts", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, {0} /* null-terminating sentine */}, - dissolveverts_exec, + bmo_dissolve_verts_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; -static BMOpDefine def_dissolveedgessop = { - "dissolveedges", +static BMOpDefine bmo_dissolve_edges_def = { + "dissolve_edges", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, {BMO_OP_SLOT_ELEMENT_BUF, "regionout"}, {BMO_OP_SLOT_BOOL, "use_verts"}, // dissolve verts left between only 2 edges. {0} /* null-terminating sentine */}, - dissolveedges_exec, + bmo_dissolve_edges_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; -static BMOpDefine def_dissolveedgeloopsop = { - "dissolveedgeloop", +static BMOpDefine bmo_dissolve_edge_loop_def = { + "dissolve_edge_loop", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, {BMO_OP_SLOT_ELEMENT_BUF, "regionout"}, {0} /* null-terminating sentine */}, - dissolve_edgeloop_exec, + bmo_dissolve_edgeloop_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; -static BMOpDefine def_dissolvefacesop = { - "dissolvefaces", +static BMOpDefine bmo_dissolve_faces_def = { + "dissolve_faces", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, {BMO_OP_SLOT_ELEMENT_BUF, "regionout"}, {BMO_OP_SLOT_BOOL, "use_verts"}, // dissolve verts left between only 2 edges. {0} /* null-terminating sentine */}, - dissolvefaces_exec, + bmo_dissolve_faces_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; -static BMOpDefine def_dissolvelimitop = { - "dissolvelimit", +static BMOpDefine bmo_dissolve_limit_def = { + "dissolve_limit", {{BMO_OP_SLOT_FLT, "angle_limit"}, /* total rotation angle (degrees) */ {BMO_OP_SLOT_ELEMENT_BUF, "verts"}, {BMO_OP_SLOT_ELEMENT_BUF, "edges"}, {0} /* null-terminating sentine */}, - dissolvelimit_exec, + bmo_dissolve_limit_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; -static BMOpDefine def_triangop = { +static BMOpDefine bmo_triangulate_def = { "triangulate", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, {BMO_OP_SLOT_MAPPING, "facemap"}, {0} /* null-terminating sentine */}, - triangulate_exec, + bmo_triangulate_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; -static BMOpDefine def_subdop = { +static BMOpDefine bmo_esubd_def = { "esubd", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, {BMO_OP_SLOT_INT, "numcuts"}, @@ -703,20 +703,20 @@ static BMOpDefine def_subdop = { {0} /* null-terminating sentine */, }, - esubdivide_exec, + bmo_esubd_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; -static BMOpDefine def_delop = { +static BMOpDefine bmo_del_def = { "del", {{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, {BMO_OP_SLOT_INT, "context"}, {0} /* null-terminating sentine */}, - delop_exec, + bmo_del_exec, 0 }; -static BMOpDefine def_dupeop = { +static BMOpDefine bmo_dupe_def = { "dupe", {{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, {BMO_OP_SLOT_ELEMENT_BUF, "origout"}, @@ -728,11 +728,11 @@ static BMOpDefine def_dupeop = { {BMO_OP_SLOT_MAPPING, "isovertmap"}, {BMO_OP_SLOT_PNT, "dest"}, /* destination bmesh, if NULL will use current on */ {0} /* null-terminating sentine */}, - dupeop_exec, + bmo_dupe_exec, 0 }; -static BMOpDefine def_splitop = { +static BMOpDefine bmo_split_def = { "split", {{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, @@ -741,7 +741,7 @@ static BMOpDefine def_splitop = { {BMO_OP_SLOT_PNT, "dest"}, /* destination bmesh, if NULL will use current on */ {BMO_OP_SLOT_BOOL, "use_only_faces"}, /* when enabled. dont duplicate loose verts/edges */ {0} /* null-terminating sentine */}, - splitop_exec, + bmo_split_exec, 0 }; @@ -751,7 +751,7 @@ static BMOpDefine def_splitop = { * Extrude or duplicate geometry a number of times, * rotating and possibly translating after each step */ -static BMOpDefine def_spinop = { +static BMOpDefine bmo_spin_def = { "spin", {{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, {BMO_OP_SLOT_ELEMENT_BUF, "lastout"}, /* result of last step */ @@ -762,7 +762,7 @@ static BMOpDefine def_spinop = { {BMO_OP_SLOT_INT, "steps"}, /* number of steps */ {BMO_OP_SLOT_BOOL, "do_dupli"}, /* duplicate or extrude? */ {0} /* null-terminating sentine */}, - spinop_exec, + bmo_spin_exec, 0 }; @@ -772,14 +772,14 @@ static BMOpDefine def_spinop = { * * Find similar faces (area/material/perimeter, ...). */ -static BMOpDefine def_similarfaces = { +static BMOpDefine bmo_similarfaces_def = { "similarfaces", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ {BMO_OP_SLOT_ELEMENT_BUF, "faceout"}, /* output faces */ {BMO_OP_SLOT_INT, "type"}, /* type of selection */ {BMO_OP_SLOT_FLT, "thresh"}, /* threshold of selection */ {0} /* null-terminating sentine */}, - bmesh_similarfaces_exec, + bmo_similarfaces_exec, 0 }; @@ -788,14 +788,14 @@ static BMOpDefine def_similarfaces = { * * Find similar edges (length, direction, edge, seam, ...). */ -static BMOpDefine def_similaredges = { +static BMOpDefine bmo_similaredges_def = { "similaredges", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */ {BMO_OP_SLOT_ELEMENT_BUF, "edgeout"}, /* output edges */ {BMO_OP_SLOT_INT, "type"}, /* type of selection */ {BMO_OP_SLOT_FLT, "thresh"}, /* threshold of selection */ {0} /* null-terminating sentine */}, - bmesh_similaredges_exec, + bmo_similaredges_exec, 0 }; @@ -804,14 +804,14 @@ static BMOpDefine def_similaredges = { * * Find similar vertices (normal, face, vertex group, ...). */ -static BMOpDefine def_similarverts = { +static BMOpDefine bmo_similarverts_def = { "similarverts", {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, /* input vertices */ {BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, /* output vertices */ {BMO_OP_SLOT_INT, "type"}, /* type of selection */ {BMO_OP_SLOT_FLT, "thresh"}, /* threshold of selection */ {0} /* null-terminating sentine */}, - bmesh_similarverts_exec, + bmo_similarverts_exec, 0 }; @@ -819,12 +819,12 @@ static BMOpDefine def_similarverts = { * uv rotation * cycle the uvs */ -static BMOpDefine def_meshrotateuvs = { - "meshrotateuvs", +static BMOpDefine bmo_face_rotateuvs_def = { + "face_rotateuvs", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ {BMO_OP_SLOT_INT, "dir"}, /* direction */ {0} /* null-terminating sentine */}, - bmesh_rotateuvs_exec, + bmo_face_rotateuvs_exec, 0 }; @@ -832,11 +832,11 @@ static BMOpDefine def_meshrotateuvs = { * uv reverse * reverse the uvs */ -static BMOpDefine def_meshreverseuvs = { - "meshreverseuvs", +static BMOpDefine bmo_face_reverseuvs_def = { + "face_reverseuvs", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ {0} /* null-terminating sentine */}, - bmesh_reverseuvs_exec, + bmo_face_reverseuvs_exec, 0 }; @@ -844,12 +844,12 @@ static BMOpDefine def_meshreverseuvs = { * color rotation * cycle the colors */ -static BMOpDefine def_meshrotatecolors = { - "meshrotatecolors", +static BMOpDefine bmo_face_rotatecolors_def = { + "face_rotatecolors", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ {BMO_OP_SLOT_INT, "dir"}, /* direction */ {0} /* null-terminating sentine */}, - bmesh_rotatecolors_exec, + bmo_rotatecolors_exec, 0 }; @@ -857,11 +857,11 @@ static BMOpDefine def_meshrotatecolors = { * color reverse * reverse the colors */ -static BMOpDefine def_meshreversecolors = { - "meshreversecolors", +static BMOpDefine bmo_face_reversecolors_def = { + "face_reversecolors", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ {0} /* null-terminating sentine */}, - bmesh_reversecolors_exec, + bmo_face_reversecolors_exec, 0 }; @@ -870,14 +870,14 @@ static BMOpDefine def_meshreversecolors = { * * Find similar vertices (normal, face, vertex group, ...). */ -static BMOpDefine def_vertexshortestpath = { +static BMOpDefine bmo_vertexshortestpath_def = { "vertexshortestpath", {{BMO_OP_SLOT_ELEMENT_BUF, "startv"}, /* start vertex */ {BMO_OP_SLOT_ELEMENT_BUF, "endv"}, /* end vertex */ {BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, /* output vertices */ {BMO_OP_SLOT_INT, "type"}, /* type of selection */ {0} /* null-terminating sentine */}, - bmesh_vertexshortestpath_exec, + bmo_vertexshortestpath_exec, 0 }; @@ -886,13 +886,13 @@ static BMOpDefine def_vertexshortestpath = { * * Disconnects faces along input edges. */ -static BMOpDefine def_edgesplit = { +static BMOpDefine bmo_edgesplit_def = { "edgesplit", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */ {BMO_OP_SLOT_ELEMENT_BUF, "edgeout1"}, /* old output disconnected edges */ {BMO_OP_SLOT_ELEMENT_BUF, "edgeout2"}, /* new output disconnected edges */ {0} /* null-terminating sentine */}, - bmesh_edgesplitop_exec, + bmo_edgesplit_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -901,7 +901,7 @@ static BMOpDefine def_edgesplit = { * * Creates a grid with a variable number of subdivisions */ -static BMOpDefine def_create_grid = { +static BMOpDefine bmo_create_grid_def = { "create_grid", {{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts {BMO_OP_SLOT_INT, "xsegments"}, //number of x segments @@ -909,7 +909,7 @@ static BMOpDefine def_create_grid = { {BMO_OP_SLOT_FLT, "size"}, //size of the grid {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with {0, /* null-terminating sentine */}}, - bmesh_create_grid_exec, + bmo_create_grid_exec, 0, }; @@ -918,7 +918,7 @@ static BMOpDefine def_create_grid = { * * Creates a grid with a variable number of subdivisions */ -static BMOpDefine def_create_uvsphere = { +static BMOpDefine bmo_create_uvsphere_def = { "create_uvsphere", {{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts {BMO_OP_SLOT_INT, "segments"}, //number of u segments @@ -926,7 +926,7 @@ static BMOpDefine def_create_uvsphere = { {BMO_OP_SLOT_FLT, "diameter"}, //diameter {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with-- {0, /* null-terminating sentine */}}, - bmesh_create_uvsphere_exec, + bmo_create_uvsphere_exec, 0, }; @@ -935,14 +935,14 @@ static BMOpDefine def_create_uvsphere = { * * Creates a grid with a variable number of subdivisions */ -static BMOpDefine def_create_icosphere = { +static BMOpDefine bmo_create_icosphere_def = { "create_icosphere", {{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts {BMO_OP_SLOT_INT, "subdivisions"}, //how many times to recursively subdivide the sphere {BMO_OP_SLOT_FLT, "diameter"}, //diameter {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with {0, /* null-terminating sentine */}}, - bmesh_create_icosphere_exec, + bmo_create_icosphere_exec, 0, }; @@ -951,12 +951,12 @@ static BMOpDefine def_create_icosphere = { * * Creates a monkey. Be wary. */ -static BMOpDefine def_create_monkey = { +static BMOpDefine bmo_create_monkey_def = { "create_monkey", {{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with-- {0, /* null-terminating sentine */}}, - bmesh_create_monkey_exec, + bmo_create_monkey_exec, 0, }; @@ -965,7 +965,7 @@ static BMOpDefine def_create_monkey = { * * Creates a cone with variable depth at both ends */ -static BMOpDefine def_create_cone = { +static BMOpDefine bmo_create_cone_def = { "create_cone", {{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts {BMO_OP_SLOT_BOOL, "cap_ends"}, //wheter or not to fill in the ends with faces @@ -976,14 +976,14 @@ static BMOpDefine def_create_cone = { {BMO_OP_SLOT_FLT, "depth"}, //distance between ends {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with-- {0, /* null-terminating sentine */}}, - bmesh_create_cone_exec, + bmo_create_cone_exec, 0, }; /* * Creates a circle */ -static BMOpDefine def_create_circle = { +static BMOpDefine bmo_create_circle_def = { "create_circle", {{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts {BMO_OP_SLOT_BOOL, "cap_ends"}, //wheter or not to fill in the ends with faces @@ -992,7 +992,7 @@ static BMOpDefine def_create_circle = { {BMO_OP_SLOT_FLT, "diameter"}, //diameter of one end {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with-- {0, /* null-terminating sentine */}}, - bmesh_create_circle_exec, + bmo_create_circle_exec, 0, }; @@ -1001,13 +1001,13 @@ static BMOpDefine def_create_circle = { * * Creates a cone with variable depth at both ends */ -static BMOpDefine def_create_cube = { +static BMOpDefine bmo_create_cube_def = { "create_cube", {{BMO_OP_SLOT_ELEMENT_BUF, "vertout"}, //output verts {BMO_OP_SLOT_FLT, "size"}, //size of the cube {BMO_OP_SLOT_MAT, "mat"}, //matrix to multiply the new geometry with-- {0, /* null-terminating sentine */}}, - bmesh_create_cube_exec, + bmo_create_cube_exec, 0, }; @@ -1016,7 +1016,7 @@ static BMOpDefine def_create_cube = { * * Bevels edges and vertices */ -static BMOpDefine def_bevel = { +static BMOpDefine bmo_bevel_def = { "bevel", {{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, /* input edges and vertices */ {BMO_OP_SLOT_ELEMENT_BUF, "face_spans"}, /* new geometry */ @@ -1028,7 +1028,7 @@ static BMOpDefine def_bevel = { {BMO_OP_SLOT_INT, "lengthlayer"}, /* which PROP_FLT layer to us */ {BMO_OP_SLOT_FLT, "percent"}, /* percentage to expand bevelled edge */ {0} /* null-terminating sentine */}, - bmesh_bevel_exec, + bmo_bevel_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -1037,13 +1037,13 @@ static BMOpDefine def_bevel = { * * Makes triangle a bit nicer */ -static BMOpDefine def_beautify_fill = { -"beautify_fill", +static BMOpDefine bmo_beautify_fill_def = { + "beautify_fill", {{BMO_OP_SLOT_ELEMENT_BUF, "faces"}, /* input faces */ {BMO_OP_SLOT_ELEMENT_BUF, "constrain_edges"}, /* edges that can't be flipped */ {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, /* new flipped faces and edges */ {0} /* null-terminating sentine */}, - bmesh_beautify_fill_exec, + bmo_beautify_fill_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -1052,12 +1052,12 @@ static BMOpDefine def_beautify_fill = { * * Fill edges with triangles */ -static BMOpDefine def_triangle_fill = { +static BMOpDefine bmo_triangle_fill_def = { "triangle_fill", {{BMO_OP_SLOT_ELEMENT_BUF, "edges"}, /* input edges */ {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, /* new faces and edges */ {0} /* null-terminating sentine */}, - bmesh_triangle_fill_exec, + bmo_triangle_fill_exec, BMO_OP_FLAG_UNTAN_MULTIRES }; @@ -1066,83 +1066,82 @@ static BMOpDefine def_triangle_fill = { * * Turns a mesh into a shell with thickness */ -static BMOpDefine def_solidify = { +static BMOpDefine bmo_solidify_def = { "solidify", {{BMO_OP_SLOT_ELEMENT_BUF, "geom"}, {BMO_OP_SLOT_FLT, "thickness"}, {BMO_OP_SLOT_ELEMENT_BUF, "geomout"}, {0}}, - bmesh_solidify_face_region_exec, + bmo_solidify_face_region_exec, 0 }; BMOpDefine *opdefines[] = { - &def_splitop, - &def_spinop, - &def_dupeop, - &def_delop, - &def_subdop, - &def_triangop, - &def_dissolvefacesop, - &def_dissolveedgessop, - &def_dissolveedgeloopsop, - &def_dissolvevertsop, - &def_dissolvelimitop, - &def_extrudefaceregion, - &def_connectverts, - //&def_makeprim, - &def_extrudeverts_indiv, - &def_mesh_to_bmesh, - &def_object_load_bmesh, - &def_transform, - &def_translate, - &def_rotate, - &def_edgenet_fill, - &def_contextual_create, - &def_makevert, - &def_weldverts, - &def_removedoubles, - &def_finddoubles, - &def_mirror, - &def_edgebisect, - &def_reversefaces, - &def_edgerotate, - &def_regionextend, - &def_righthandfaces, - &def_vertexsmooth, - &def_extrude_onlyedge, - &def_extrude_indivface, - &def_collapse_uvs, - &def_pointmerge, - &def_collapse, - &def_similarfaces, - &def_similaredges, - &def_similarverts, - &def_pointmerge_facedata, - &def_vert_average_facedata, - &def_meshrotateuvs, - &def_bmesh_to_mesh, - &def_meshreverseuvs, - &def_edgenet_prepare, - &def_meshrotatecolors, - &def_meshreversecolors, - &def_vertexshortestpath, - &def_scale, - &def_edgesplit, - &def_automerge, - &def_create_uvsphere, - &def_create_grid, - &def_create_icosphere, - &def_create_monkey, - &def_create_cube, - &def_create_circle, - &def_create_cone, - &def_join_triangles, - &def_bevel, - &def_beautify_fill, - &def_triangle_fill, - &def_bridge_loops, - &def_solidify, + &bmo_split_def, + &bmo_spin_def, + &bmo_dupe_def, + &bmo_del_def, + &bmo_esubd_def, + &bmo_triangulate_def, + &bmo_dissolve_faces_def, + &bmo_dissolve_edges_def, + &bmo_dissolve_edge_loop_def, + &bmo_dissolve_verts_def, + &bmo_dissolve_limit_def, + &bmo_extrude_face_region_def, + &bmo_connectverts_def, + &bmo_extrude_vert_indiv_def, + &bmo_mesh_to_bmesh_def, + &bmo_object_load_bmesh_def, + &bmo_transform_def, + &bmo_translate_def, + &bmo_rotate_def, + &bmo_edgenet_fill_def, + &bmo_contextual_create_def, + &bmo_makevert_def, + &bmo_weldverts_def, + &bmo_removedoubles_def, + &bmo_finddoubles_def, + &bmo_mirror_def, + &bmo_edgebisect_def, + &bmo_reversefaces_def, + &bmo_edgerotate_def, + &bmo_regionextend_def, + &bmo_righthandfaces_def, + &bmo_vertexsmooth_def, + &bmo_extrude_edge_only_def, + &bmo_extrude_indivface_def, + &bmo_collapse_uvs_def, + &bmo_pointmerge_def, + &bmo_collapse_def, + &bmo_similarfaces_def, + &bmo_similaredges_def, + &bmo_similarverts_def, + &bmo_pointmerge_facedata_def, + &bmo_vert_average_facedata_def, + &bmo_face_rotateuvs_def, + &bmo_bmesh_to_mesh_def, + &bmo_face_reverseuvs_def, + &bmo_edgenet_prepare_def, + &bmo_face_rotatecolors_def, + &bmo_face_reversecolors_def, + &bmo_vertexshortestpath_def, + &bmo_scale_def, + &bmo_edgesplit_def, + &bmo_automerge_def, + &bmo_create_uvsphere_def, + &bmo_create_grid_def, + &bmo_create_icosphere_def, + &bmo_create_monkey_def, + &bmo_create_cube_def, + &bmo_create_circle_def, + &bmo_create_cone_def, + &bmo_join_triangles_def, + &bmo_bevel_def, + &bmo_beautify_fill_def, + &bmo_triangle_fill_def, + &bmo_bridge_loops_def, + &bmo_solidify_def, }; int bmesh_total_ops = (sizeof(opdefines) / sizeof(void *)); diff --git a/source/blender/bmesh/intern/bmesh_operators_private.h b/source/blender/bmesh/intern/bmesh_operators_private.h index 4cc338bfdd0..76ecd845853 100644 --- a/source/blender/bmesh/intern/bmesh_operators_private.h +++ b/source/blender/bmesh/intern/bmesh_operators_private.h @@ -33,74 +33,72 @@ struct BMOperator; void BMO_push(BMesh *bm, BMOperator *op); void BMO_pop(BMesh *bm); -void splitop_exec(BMesh *bm, BMOperator *op); -void spinop_exec(BMesh *bm, BMOperator *op); -void dupeop_exec(BMesh *bm, BMOperator *op); -void delop_exec(BMesh *bm, BMOperator *op); -void esubdivide_exec(BMesh *bmesh, BMOperator *op); -void edit2bmesh_exec(BMesh *bmesh, BMOperator *op); -void bmesh2edit_exec(BMesh *bmesh, BMOperator *op); -void triangulate_exec(BMesh *bmesh, BMOperator *op); -void dissolvefaces_exec(BMesh *bmesh, BMOperator *op); -void dissolveverts_exec(BMesh *bmesh, BMOperator *op); -void dissolvelimit_exec(BMesh *bmesh, BMOperator *op); -void bmesh_make_fgons_exec(BMesh *bmesh, BMOperator *op); -void extrude_edge_context_exec(BMesh *bm, BMOperator *op); -void connectverts_exec(BMesh *bm, BMOperator *op); -void makeprim_exec(BMesh *bm, BMOperator *op); -void extrude_vert_indiv_exec(BMesh *bm, BMOperator *op); -void mesh_to_bmesh_exec(BMesh *bm, BMOperator *op); -void bmesh_to_mesh_exec(BMesh *bm, BMOperator *op); -void bmesh_translate_exec(BMesh *bm, BMOperator *op); -void bmesh_transform_exec(BMesh *bm, BMOperator *op); -void bmesh_contextual_create_exec(BMesh *bm, BMOperator *op); -void bmesh_edgenet_fill_exec(BMesh *bm, BMOperator *op); -void bmesh_rotate_exec(BMesh *bm, BMOperator *op); -void bmesh_makevert_exec(BMesh *bm, BMOperator *op); -void dissolveedges_exec(BMesh *bm, BMOperator *op); -void dissolve_edgeloop_exec(BMesh *bm, BMOperator *op); -void bmesh_weldverts_exec(BMesh *bm, BMOperator *op); -void bmesh_removedoubles_exec(BMesh *bm, BMOperator *op); -void bmesh_finddoubles_exec(BMesh *bm, BMOperator *op); -void bmesh_mirror_exec(BMesh *bm, BMOperator *op); -void esplit_exec(BMesh *bm, BMOperator *op); -void bmesh_reversefaces_exec(BMesh *bm, BMOperator *op); -void bmesh_edgerotate_exec(BMesh *bm, BMOperator *op); -void bmesh_regionextend_exec(BMesh *bm, BMOperator *op); -void bmesh_righthandfaces_exec(BMesh *bm, BMOperator *op); -void bmesh_vertexsmooth_exec(BMesh *bm, BMOperator *op); -void bmesh_extrude_onlyedge_exec(BMesh *bm, BMOperator *op); -void bmesh_extrude_face_indiv_exec(BMesh *bm, BMOperator *op); -void bmesh_collapsecon_exec(BMesh *bm, BMOperator *op); -void bmesh_pointmerge_exec(BMesh *bm, BMOperator *op); -void bmesh_collapse_exec(BMesh *bm, BMOperator *op); -void bmesh_similarfaces_exec(BMesh *bm, BMOperator *op); -void bmesh_similaredges_exec(BMesh *bm, BMOperator *op); -void bmesh_similarverts_exec(BMesh *bm, BMOperator *op); -void bmesh_pointmerge_facedata_exec(BMesh *bm, BMOperator *op); -void bmesh_vert_average_facedata_exec(BMesh *bm, BMOperator *op); -void bmesh_rotateuvs_exec(BMesh *bm, BMOperator *op); -void object_load_bmesh_exec(BMesh *bm, BMOperator *op); -void bmesh_reverseuvs_exec(BMesh *bm, BMOperator *op); -void bmesh_edgenet_prepare(BMesh *bm, BMOperator *op); -void bmesh_rotatecolors_exec(BMesh *bm, BMOperator *op); -void bmesh_reversecolors_exec(BMesh *bm, BMOperator *op); -void bmesh_vertexshortestpath_exec(BMesh *bm, BMOperator *op); -void bmesh_scale_exec(BMesh *bm, BMOperator *op); -void bmesh_edgesplitop_exec(BMesh *bm, BMOperator *op); -void bmesh_automerge_exec(BMesh *bm, BMOperator *op); -void bmesh_create_cone_exec(BMesh *bm, BMOperator *op); -void bmesh_create_monkey_exec(BMesh *bm, BMOperator *op); -void bmesh_create_icosphere_exec(BMesh *bm, BMOperator *op); -void bmesh_create_uvsphere_exec(BMesh *bm, BMOperator *op); -void bmesh_create_grid_exec(BMesh *bm, BMOperator *op); -void bmesh_create_cube_exec(BMesh *bm, BMOperator *op); -void bmesh_jointriangles_exec(BMesh *bm, BMOperator *op); -void bmesh_bevel_exec(BMesh *bm, BMOperator *op); -void bmesh_beautify_fill_exec(BMesh *bm, BMOperator *op); -void bmesh_triangle_fill_exec(BMesh *bm, BMOperator *op); -void bmesh_create_circle_exec(BMesh *bm, BMOperator *op); -void bmesh_bridge_loops_exec(BMesh *bm, BMOperator *op); -void bmesh_solidify_face_region_exec(BMesh *bm, BMOperator *op); +void bmo_split_exec(BMesh *bm, BMOperator *op); +void bmo_spin_exec(BMesh *bm, BMOperator *op); +void bmo_dupe_exec(BMesh *bm, BMOperator *op); +void bmo_del_exec(BMesh *bm, BMOperator *op); +void bmo_esubd_exec(BMesh *bmesh, BMOperator *op); +void bmo_triangulate_exec(BMesh *bmesh, BMOperator *op); +void bmo_dissolve_faces_exec(BMesh *bmesh, BMOperator *op); +void bmo_dissolve_verts_exec(BMesh *bmesh, BMOperator *op); +void bmo_dissolve_limit_exec(BMesh *bmesh, BMOperator *op); +void bmo_make_fgons_exec(BMesh *bmesh, BMOperator *op); +void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op); +void bmo_connectverts_exec(BMesh *bm, BMOperator *op); +void bmo_makeprim_exec(BMesh *bm, BMOperator *op); +void bmo_extrude_vert_indiv_exec(BMesh *bm, BMOperator *op); +void bmo_mesh_to_bmesh_exec(BMesh *bm, BMOperator *op); +void bmo_bmesh_to_mesh_exec(BMesh *bm, BMOperator *op); +void bmo_translate_exec(BMesh *bm, BMOperator *op); +void bmo_transform_exec(BMesh *bm, BMOperator *op); +void bmo_contextual_create_exec(BMesh *bm, BMOperator *op); +void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op); +void bmo_rotate_exec(BMesh *bm, BMOperator *op); +void bmo_makevert_exec(BMesh *bm, BMOperator *op); +void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op); +void bmo_dissolve_edgeloop_exec(BMesh *bm, BMOperator *op); +void bmo_weldverts_exec(BMesh *bm, BMOperator *op); +void bmo_removedoubles_exec(BMesh *bm, BMOperator *op); +void bmo_finddoubles_exec(BMesh *bm, BMOperator *op); +void bmo_mirror_exec(BMesh *bm, BMOperator *op); +void bmo_edgebisect_exec(BMesh *bm, BMOperator *op); +void bmo_reversefaces_exec(BMesh *bm, BMOperator *op); +void bmo_edgerotate_exec(BMesh *bm, BMOperator *op); +void bmo_regionextend_exec(BMesh *bm, BMOperator *op); +void bmo_righthandfaces_exec(BMesh *bm, BMOperator *op); +void bmo_vertexsmooth_exec(BMesh *bm, BMOperator *op); +void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op); +void bmo_extrude_face_indiv_exec(BMesh *bm, BMOperator *op); +void bmo_collapse_uvs_exec(BMesh *bm, BMOperator *op); +void bmo_pointmerge_exec(BMesh *bm, BMOperator *op); +void bmo_collapse_exec(BMesh *bm, BMOperator *op); +void bmo_similarfaces_exec(BMesh *bm, BMOperator *op); +void bmo_similaredges_exec(BMesh *bm, BMOperator *op); +void bmo_similarverts_exec(BMesh *bm, BMOperator *op); +void bmo_pointmerge_facedata_exec(BMesh *bm, BMOperator *op); +void bmo_vert_average_facedata_exec(BMesh *bm, BMOperator *op); +void bmo_face_rotateuvs_exec(BMesh *bm, BMOperator *op); +void bmo_object_load_bmesh_exec(BMesh *bm, BMOperator *op); +void bmo_face_reverseuvs_exec(BMesh *bm, BMOperator *op); +void bmo_edgenet_prepare(BMesh *bm, BMOperator *op); +void bmo_rotatecolors_exec(BMesh *bm, BMOperator *op); +void bmo_face_reversecolors_exec(BMesh *bm, BMOperator *op); +void bmo_vertexshortestpath_exec(BMesh *bm, BMOperator *op); +void bmo_scale_exec(BMesh *bm, BMOperator *op); +void bmo_edgesplit_exec(BMesh *bm, BMOperator *op); +void bmo_automerge_exec(BMesh *bm, BMOperator *op); +void bmo_create_cone_exec(BMesh *bm, BMOperator *op); +void bmo_create_monkey_exec(BMesh *bm, BMOperator *op); +void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op); +void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op); +void bmo_create_grid_exec(BMesh *bm, BMOperator *op); +void bmo_create_cube_exec(BMesh *bm, BMOperator *op); +void bmo_join_triangles_exec(BMesh *bm, BMOperator *op); +void bmo_bevel_exec(BMesh *bm, BMOperator *op); +void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op); +void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op); +void bmo_create_circle_exec(BMesh *bm, BMOperator *op); +void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op); +void bmo_solidify_face_region_exec(BMesh *bm, BMOperator *op); #endif /* __BMESH_OPERATORS_PRIVATE_H__ */ diff --git a/source/blender/bmesh/operators/bmo_bevel.c b/source/blender/bmesh/operators/bmo_bevel.c index aab8d7d40dd..6cdea3657f6 100644 --- a/source/blender/bmesh/operators/bmo_bevel.c +++ b/source/blender/bmesh/operators/bmo_bevel.c @@ -172,7 +172,7 @@ static void calc_corner_co(BMesh *bm, BMLoop *l, const float fac, float r_co[3], (etags[BM_elem_index_get((e))].newv2) \ ) -void bmesh_bevel_exec(BMesh *bm, BMOperator *op) +void bmo_bevel_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMIter iter; diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c index ad15b703041..d2d4eaf8129 100644 --- a/source/blender/bmesh/operators/bmo_connect.c +++ b/source/blender/bmesh/operators/bmo_connect.c @@ -34,7 +34,7 @@ #define EDGE_MARK 4 #define EDGE_DONE 8 -void connectverts_exec(BMesh *bm, BMOperator *op) +void bmo_connectverts_exec(BMesh *bm, BMOperator *op) { BMIter iter, liter; BMFace *f, *nf; @@ -189,7 +189,7 @@ static void bm_vert_loop_pair(BMesh *bm, BMVert *v1, BMVert *v2, BMLoop **l1, BM *l2 = BM_iter_at_index(bm, BM_LOOPS_OF_VERT, v2, 0); } -void bmesh_bridge_loops_exec(BMesh *bm, BMOperator *op) +void bmo_bridge_loops_exec(BMesh *bm, BMOperator *op) { BMEdge **ee1 = NULL, **ee2 = NULL; BMVert **vv1 = NULL, **vv2 = NULL; diff --git a/source/blender/bmesh/operators/bmo_create.c b/source/blender/bmesh/operators/bmo_create.c index 9136eccb6a7..5e9178c0a01 100644 --- a/source/blender/bmesh/operators/bmo_create.c +++ b/source/blender/bmesh/operators/bmo_create.c @@ -857,7 +857,7 @@ static int count_edge_faces(BMesh *bm, BMEdge *e) return i; } -void bmesh_edgenet_fill_exec(BMesh *bm, BMOperator *op) +void bmo_edgenet_fill_exec(BMesh *bm, BMOperator *op) { BMIter iter; BMOIter siter; @@ -1062,7 +1062,7 @@ static BMEdge *edge_next(BMesh *bm, BMEdge *e) return NULL; } -void bmesh_edgenet_prepare(BMesh *bm, BMOperator *op) +void bmo_edgenet_prepare(BMesh *bm, BMOperator *op) { BMOIter siter; BMEdge *e; @@ -1242,7 +1242,7 @@ void bmesh_edgenet_prepare(BMesh *bm, BMOperator *op) } /* this is essentially new fke */ -void bmesh_contextual_create_exec(BMesh *bm, BMOperator *op) +void bmo_contextual_create_exec(BMesh *bm, BMOperator *op) { BMOperator op2; BMOIter oiter; @@ -1356,7 +1356,7 @@ void bmesh_contextual_create_exec(BMesh *bm, BMOperator *op) BMO_op_finish(bm, &op2); /* now call dissolve face */ - BMO_op_initf(bm, &op2, "dissolvefaces faces=%ff", ELE_NEW); + BMO_op_initf(bm, &op2, "dissolve_faces faces=%ff", ELE_NEW); BMO_op_exec(bm, &op2); /* if we dissolved anything, then return */ diff --git a/source/blender/bmesh/operators/bmo_dissolve.c b/source/blender/bmesh/operators/bmo_dissolve.c index 601399b9b96..4542b3fd917 100644 --- a/source/blender/bmesh/operators/bmo_dissolve.c +++ b/source/blender/bmesh/operators/bmo_dissolve.c @@ -68,7 +68,7 @@ static int UNUSED_FUNCTION(check_hole_in_region)(BMesh *bm, BMFace *f) return TRUE; } -void dissolvefaces_exec(BMesh *bm, BMOperator *op) +void bmo_dissolve_faces_exec(BMesh *bm, BMOperator *op) { BMOIter oiter; BMFace *f, *f2 /* , *nf = NULL */; @@ -185,7 +185,7 @@ cleanup: } /* almost identical to dissolve edge, except it cleans up vertice */ -void dissolve_edgeloop_exec(BMesh *bm, BMOperator *op) +void bmo_dissolve_edgeloop_exec(BMesh *bm, BMOperator *op) { /* BMOperator fop; */ BMOIter oiter; @@ -222,7 +222,7 @@ void dissolve_edgeloop_exec(BMesh *bm, BMOperator *op) BLI_array_free(verts); - //BMO_op_initf(bm, &fop, "dissolvefaces faces=%ff", FACE_MARK); + //BMO_op_initf(bm, &fop, "dissolve_faces faces=%ff", FACE_MARK); //BMO_op_exec(bm, &fop); //BMO_slot_copy(op, &fop, "regionout", "regionout"); @@ -231,7 +231,7 @@ void dissolve_edgeloop_exec(BMesh *bm, BMOperator *op) } -void dissolveedges_exec(BMesh *bm, BMOperator *op) +void bmo_dissolve_edges_exec(BMesh *bm, BMOperator *op) { /* might want to make this an option or mode - campbell */ @@ -317,7 +317,7 @@ static int test_extra_verts(BMesh *bm, BMVert *v) return TRUE; } -void dissolveverts_exec(BMesh *bm, BMOperator *op) +void bmo_dissolve_verts_exec(BMesh *bm, BMOperator *op) { BMOpSlot *vinput; BMIter iter, fiter; @@ -371,7 +371,7 @@ void dissolveverts_exec(BMesh *bm, BMOperator *op) } } - BMO_op_callf(bm, "dissolvefaces faces=%ff", FACE_MARK); + BMO_op_callf(bm, "dissolve_faces faces=%ff", FACE_MARK); if (BMO_error_occurred(bm)) { const char *msg; @@ -477,7 +477,7 @@ static int dissolve_elem_cmp(const void *a1, const void *a2) return 0; } -void dissolvelimit_exec(BMesh *bm, BMOperator *op) +void bmo_dissolve_limit_exec(BMesh *bm, BMOperator *op) { BMOpSlot *einput = BMO_slot_get(op, "edges"); BMOpSlot *vinput = BMO_slot_get(op, "verts"); diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c index 09b0e2042f4..20f1920c07f 100644 --- a/source/blender/bmesh/operators/bmo_dupe.c +++ b/source/blender/bmesh/operators/bmo_dupe.c @@ -316,7 +316,7 @@ static void copy_mesh(BMOperator *op, BMesh *source, BMesh *target) * */ -void dupeop_exec(BMesh *bm, BMOperator *op) +void bmo_dupe_exec(BMesh *bm, BMOperator *op) { BMOperator *dupeop = op; BMesh *bm2 = BMO_slot_ptr_get(op, "dest"); @@ -374,7 +374,7 @@ void BMO_dupe_from_flag(BMesh *bm, int etypeflag, const char hflag) */ #define SPLIT_INPUT 1 -void splitop_exec(BMesh *bm, BMOperator *op) +void bmo_split_exec(BMesh *bm, BMOperator *op) { BMOperator *splitop = op; BMOperator dupeop; @@ -446,7 +446,7 @@ void splitop_exec(BMesh *bm, BMOperator *op) } -void delop_exec(BMesh *bm, BMOperator *op) +void bmo_del_exec(BMesh *bm, BMOperator *op) { #define DEL_INPUT 1 @@ -467,7 +467,7 @@ void delop_exec(BMesh *bm, BMOperator *op) * rotating and possibly translating after each step */ -void spinop_exec(BMesh *bm, BMOperator *op) +void bmo_spin_exec(BMesh *bm, BMOperator *op) { BMOperator dupop, extop; float cent[3], dvec[3]; @@ -504,7 +504,7 @@ void spinop_exec(BMesh *bm, BMOperator *op) BMO_op_finish(bm, &dupop); } else { - BMO_op_initf(bm, &extop, "extrudefaceregion edgefacein=%s", + BMO_op_initf(bm, &extop, "extrude_face_region edgefacein=%s", op, "lastout"); BMO_op_exec(bm, &extop); BMO_op_callf(bm, "rotate cent=%v mat=%m3 verts=%s", diff --git a/source/blender/bmesh/operators/bmo_edgesplit.c b/source/blender/bmesh/operators/bmo_edgesplit.c index f8c41d71558..59d0c1f1e1b 100644 --- a/source/blender/bmesh/operators/bmo_edgesplit.c +++ b/source/blender/bmesh/operators/bmo_edgesplit.c @@ -195,7 +195,7 @@ static void tag_out_edges(BMesh *bm, EdgeTag *etags, BMOperator *UNUSED(op)) } } -void bmesh_edgesplitop_exec(BMesh *bm, BMOperator *op) +void bmo_edgesplit_exec(BMesh *bm, BMOperator *op) { EdgeTag *etags, *et; BMIter iter, liter; diff --git a/source/blender/bmesh/operators/bmo_extrude.c b/source/blender/bmesh/operators/bmo_extrude.c index b194428deba..7425d20bd88 100644 --- a/source/blender/bmesh/operators/bmo_extrude.c +++ b/source/blender/bmesh/operators/bmo_extrude.c @@ -39,7 +39,7 @@ #define VERT_NONMAN 2 #define EDGE_NONMAN 2 -void bmesh_extrude_face_indiv_exec(BMesh *bm, BMOperator *op) +void bmo_extrude_face_indiv_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMIter liter, liter2; @@ -111,7 +111,7 @@ void bmesh_extrude_face_indiv_exec(BMesh *bm, BMOperator *op) BMO_slot_from_flag(bm, op, "faceout", EXT_KEEP, BM_FACE); } -void bmesh_extrude_onlyedge_exec(BMesh *bm, BMOperator *op) +void bmo_extrude_edge_only_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMOperator dupeop; @@ -163,7 +163,7 @@ void bmesh_extrude_onlyedge_exec(BMesh *bm, BMOperator *op) BMO_slot_from_flag(bm, op, "geomout", EXT_KEEP, BM_ALL); } -void extrude_vert_indiv_exec(BMesh *bm, BMOperator *op) +void bmo_extrude_vert_indiv_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMVert *v, *dupev; @@ -183,7 +183,7 @@ void extrude_vert_indiv_exec(BMesh *bm, BMOperator *op) BMO_slot_from_flag(bm, op, "edgeout", EXT_KEEP, BM_EDGE); } -void extrude_edge_context_exec(BMesh *bm, BMOperator *op) +void bmo_extrude_face_region_exec(BMesh *bm, BMOperator *op) { BMOperator dupeop, delop; BMOIter siter; @@ -564,7 +564,7 @@ static void solidify_add_thickness(BMesh *bm, float dist) MEM_freeN(vert_angles); } -void bmesh_solidify_face_region_exec(BMesh *bm, BMOperator *op) +void bmo_solidify_face_region_exec(BMesh *bm, BMOperator *op) { BMOperator extrudeop; BMOperator reverseop; @@ -579,7 +579,7 @@ void bmesh_solidify_face_region_exec(BMesh *bm, BMOperator *op) BMO_op_finish(bm, &reverseop); /* Extrude the region */ - BMO_op_initf(bm, &extrudeop, "extrudefaceregion alwayskeeporig=%b", TRUE); + BMO_op_initf(bm, &extrudeop, "extrude_face_region alwayskeeporig=%b", TRUE); BMO_slot_copy(op, &extrudeop, "geom", "edgefacein"); BMO_op_exec(bm, &extrudeop); diff --git a/source/blender/bmesh/operators/bmo_join_triangles.c b/source/blender/bmesh/operators/bmo_join_triangles.c index 5ece4b60c4e..76e64aee821 100644 --- a/source/blender/bmesh/operators/bmo_join_triangles.c +++ b/source/blender/bmesh/operators/bmo_join_triangles.c @@ -222,7 +222,7 @@ static int fplcmp(const void *v1, const void *v2) return 0; } -void bmesh_jointriangles_exec(BMesh *bm, BMOperator *op) +void bmo_join_triangles_exec(BMesh *bm, BMOperator *op) { BMIter iter, liter; BMOIter siter; diff --git a/source/blender/bmesh/operators/bmo_mesh_conv.c b/source/blender/bmesh/operators/bmo_mesh_conv.c index b41a6f823b0..93ddee602c9 100644 --- a/source/blender/bmesh/operators/bmo_mesh_conv.c +++ b/source/blender/bmesh/operators/bmo_mesh_conv.c @@ -52,7 +52,7 @@ * */ -void mesh_to_bmesh_exec(BMesh *bm, BMOperator *op) +void bmo_mesh_to_bmesh_exec(BMesh *bm, BMOperator *op) { Object *ob = BMO_slot_ptr_get(op, "object"); Mesh *me = BMO_slot_ptr_get(op, "mesh"); @@ -364,7 +364,7 @@ void mesh_to_bmesh_exec(BMesh *bm, BMOperator *op) MEM_freeN(et); } -void object_load_bmesh_exec(BMesh *bm, BMOperator *op) +void bmo_object_load_bmesh_exec(BMesh *bm, BMOperator *op) { Object *ob = BMO_slot_ptr_get(op, "object"); /* Scene *scene = BMO_slot_ptr_get(op, "scene"); */ @@ -433,7 +433,7 @@ BM_INLINE void bmesh_quick_edgedraw_flag(MEdge *med, BMEdge *e) } -void bmesh_to_mesh_exec(BMesh *bm, BMOperator *op) +void bmo_bmesh_to_mesh_exec(BMesh *bm, BMOperator *op) { Mesh *me = BMO_slot_ptr_get(op, "mesh"); /* Object *ob = BMO_slot_ptr_get(op, "object"); */ diff --git a/source/blender/bmesh/operators/bmo_mirror.c b/source/blender/bmesh/operators/bmo_mirror.c index 128b64b08de..7990e991431 100644 --- a/source/blender/bmesh/operators/bmo_mirror.c +++ b/source/blender/bmesh/operators/bmo_mirror.c @@ -34,7 +34,7 @@ #define ELE_NEW 1 -void bmesh_mirror_exec(BMesh *bm, BMOperator *op) +void bmo_mirror_exec(BMesh *bm, BMOperator *op) { BMOperator dupeop, weldop; BMOIter siter; diff --git a/source/blender/bmesh/operators/bmo_primitive.c b/source/blender/bmesh/operators/bmo_primitive.c index a050f04078e..09f815f50d5 100644 --- a/source/blender/bmesh/operators/bmo_primitive.c +++ b/source/blender/bmesh/operators/bmo_primitive.c @@ -223,7 +223,7 @@ static signed char monkeyf[250][4] = { #define FACE_MARK 1 #define FACE_NEW 2 -void bmesh_create_grid_exec(BMesh *bm, BMOperator *op) +void bmo_create_grid_exec(BMesh *bm, BMOperator *op) { BMOperator bmop, prevop; BMVert *eve, *preveve; @@ -286,7 +286,7 @@ void bmesh_create_grid_exec(BMesh *bm, BMOperator *op) BMO_slot_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT); } -void bmesh_create_uvsphere_exec(BMesh *bm, BMOperator *op) +void bmo_create_uvsphere_exec(BMesh *bm, BMOperator *op) { BMOperator bmop, prevop; BMVert *eve, *preveve; @@ -375,7 +375,7 @@ void bmesh_create_uvsphere_exec(BMesh *bm, BMOperator *op) BMO_slot_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT); } -void bmesh_create_icosphere_exec(BMesh *bm, BMOperator *op) +void bmo_create_icosphere_exec(BMesh *bm, BMOperator *op) { BMVert *eva[12]; BMVert *v; @@ -442,7 +442,7 @@ void bmesh_create_icosphere_exec(BMesh *bm, BMOperator *op) BMO_slot_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT); } -void bmesh_create_monkey_exec(BMesh *bm, BMOperator *op) +void bmo_create_monkey_exec(BMesh *bm, BMOperator *op) { BMVert *eve; BMVert **tv = MEM_mallocN(sizeof(*tv)*monkeynv * 2, "tv"); @@ -490,7 +490,7 @@ void bmesh_create_monkey_exec(BMesh *bm, BMOperator *op) } -void bmesh_create_circle_exec(BMesh *bm, BMOperator *op) +void bmo_create_circle_exec(BMesh *bm, BMOperator *op) { BMVert *v1, *lastv1 = NULL, *cent1, *firstv1 = NULL; float vec[3], mat[4][4], phi, phid; @@ -555,13 +555,13 @@ void bmesh_create_circle_exec(BMesh *bm, BMOperator *op) } if (!cap_tris) { - BMO_op_callf(bm, "dissolvefaces faces=%ff", FACE_NEW); + BMO_op_callf(bm, "dissolve_faces faces=%ff", FACE_NEW); } BMO_slot_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT); } -void bmesh_create_cone_exec(BMesh *bm, BMOperator *op) +void bmo_create_cone_exec(BMesh *bm, BMOperator *op) { BMVert *v1, *v2, *lastv1 = NULL, *lastv2 = NULL, *cent1, *cent2, *firstv1, *firstv2; float vec[3], mat[4][4], phi, phid; @@ -648,7 +648,7 @@ void bmesh_create_cone_exec(BMesh *bm, BMOperator *op) } if (!cap_tris) { - BMO_op_callf(bm, "dissolvefaces faces=%ff", FACE_NEW); + BMO_op_callf(bm, "dissolve_faces faces=%ff", FACE_NEW); } BM_face_create_quad_tri(bm, v1, v2, firstv2, firstv1, NULL, FALSE); @@ -657,7 +657,7 @@ void bmesh_create_cone_exec(BMesh *bm, BMOperator *op) BMO_slot_from_flag(bm, op, "vertout", VERT_MARK, BM_VERT); } -void bmesh_create_cube_exec(BMesh *bm, BMOperator *op) +void bmo_create_cube_exec(BMesh *bm, BMOperator *op) { BMVert *v1, *v2, *v3, *v4, *v5, *v6, *v7, *v8; float vec[3], mat[4][4], off = BMO_slot_float_get(op, "size") / 2.0f; diff --git a/source/blender/bmesh/operators/bmo_removedoubles.c b/source/blender/bmesh/operators/bmo_removedoubles.c index 35fc6a1eadf..fbc247abe4f 100644 --- a/source/blender/bmesh/operators/bmo_removedoubles.c +++ b/source/blender/bmesh/operators/bmo_removedoubles.c @@ -92,7 +92,7 @@ int remdoubles_face_overlaps(BMesh *bm, BMVert **varr, } #endif -void bmesh_weldverts_exec(BMesh *bm, BMOperator *op) +void bmo_weldverts_exec(BMesh *bm, BMOperator *op) { BMIter iter, liter; BMVert *v, *v2; @@ -244,7 +244,7 @@ static int vergaverco(const void *e1, const void *e2) #define EDGE_MARK 1 -void bmesh_pointmerge_facedata_exec(BMesh *bm, BMOperator *op) +void bmo_pointmerge_facedata_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMIter iter; @@ -292,7 +292,7 @@ void bmesh_pointmerge_facedata_exec(BMesh *bm, BMOperator *op) } } -void bmesh_vert_average_facedata_exec(BMesh *bm, BMOperator *op) +void bmo_vert_average_facedata_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMIter iter; @@ -329,7 +329,7 @@ void bmesh_vert_average_facedata_exec(BMesh *bm, BMOperator *op) } } -void bmesh_pointmerge_exec(BMesh *bm, BMOperator *op) +void bmo_pointmerge_exec(BMesh *bm, BMOperator *op) { BMOperator weldop; BMOIter siter; @@ -355,7 +355,7 @@ void bmesh_pointmerge_exec(BMesh *bm, BMOperator *op) BMO_op_finish(bm, &weldop); } -void bmesh_collapse_exec(BMesh *bm, BMOperator *op) +void bmo_collapse_exec(BMesh *bm, BMOperator *op) { BMOperator weldop; BMWalker walker; @@ -466,7 +466,7 @@ static void bmesh_collapsecon_do_layer(BMesh *bm, BMOperator *op, int layer) BLI_array_free(blocks); } -void bmesh_collapsecon_exec(BMesh *bm, BMOperator *op) +void bmo_collapse_uvs_exec(BMesh *bm, BMOperator *op) { int i; @@ -544,7 +544,7 @@ void bmesh_finddoubles_common(BMesh *bm, BMOperator *op, BMOperator *optarget, c BLI_array_free(verts); } -void bmesh_removedoubles_exec(BMesh *bm, BMOperator *op) +void bmo_removedoubles_exec(BMesh *bm, BMOperator *op) { BMOperator weldop; @@ -555,12 +555,12 @@ void bmesh_removedoubles_exec(BMesh *bm, BMOperator *op) } -void bmesh_finddoubles_exec(BMesh *bm, BMOperator *op) +void bmo_finddoubles_exec(BMesh *bm, BMOperator *op) { bmesh_finddoubles_common(bm, op, op, "targetmapout"); } -void bmesh_automerge_exec(BMesh *bm, BMOperator *op) +void bmo_automerge_exec(BMesh *bm, BMOperator *op) { BMOperator findop, weldop; BMIter viter; diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index efbb31d9cb3..c5d370b390a 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -665,7 +665,7 @@ typedef struct subd_facedata { BMFace *face; } subd_facedata; -void esubdivide_exec(BMesh *bmesh, BMOperator *op) +void bmo_esubd_exec(BMesh *bmesh, BMOperator *op) { BMOpSlot *einput; SubDPattern *pat; @@ -1078,7 +1078,7 @@ void BM_mesh_esubdivideflag(Object *UNUSED(obedit), BMesh *bm, int flag, float s BMO_op_finish(bm, &op); } -void esplit_exec(BMesh *bm, BMOperator *op) +void bmo_edgebisect_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMEdge *e; diff --git a/source/blender/bmesh/operators/bmo_triangulate.c b/source/blender/bmesh/operators/bmo_triangulate.c index b4ec3d740d4..b3f4fefa36e 100644 --- a/source/blender/bmesh/operators/bmo_triangulate.c +++ b/source/blender/bmesh/operators/bmo_triangulate.c @@ -39,7 +39,7 @@ #define FACE_MARK 2 #define EDGE_MARK 4 -void triangulate_exec(BMesh *bm, BMOperator *op) +void bmo_triangulate_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMFace *face, **newfaces = NULL; @@ -78,7 +78,7 @@ void triangulate_exec(BMesh *bm, BMOperator *op) BLI_array_free(newfaces); } -void bmesh_beautify_fill_exec(BMesh *bm, BMOperator *op) +void bmo_beautify_fill_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMIter iter; @@ -154,7 +154,7 @@ void bmesh_beautify_fill_exec(BMesh *bm, BMOperator *op) BMO_slot_from_flag(bm, op, "geomout", ELE_NEW, BM_EDGE|BM_FACE); } -void bmesh_triangle_fill_exec(BMesh *bm, BMOperator *op) +void bmo_triangle_fill_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMEdge *e; diff --git a/source/blender/bmesh/operators/bmo_utils.c b/source/blender/bmesh/operators/bmo_utils.c index b3102d7fafc..cf950616471 100644 --- a/source/blender/bmesh/operators/bmo_utils.c +++ b/source/blender/bmesh/operators/bmo_utils.c @@ -42,7 +42,7 @@ * */ -void bmesh_makevert_exec(BMesh *bm, BMOperator *op) +void bmo_makevert_exec(BMesh *bm, BMOperator *op) { float vec[3]; @@ -52,7 +52,7 @@ void bmesh_makevert_exec(BMesh *bm, BMOperator *op) BMO_slot_from_flag(bm, op, "newvertout", 1, BM_VERT); } -void bmesh_transform_exec(BMesh *bm, BMOperator *op) +void bmo_transform_exec(BMesh *bm, BMOperator *op) { BMOIter iter; BMVert *v; @@ -65,7 +65,7 @@ void bmesh_transform_exec(BMesh *bm, BMOperator *op) } } -void bmesh_translate_exec(BMesh *bm, BMOperator *op) +void bmo_translate_exec(BMesh *bm, BMOperator *op) { float mat[4][4], vec[3]; @@ -77,7 +77,7 @@ void bmesh_translate_exec(BMesh *bm, BMOperator *op) BMO_op_callf(bm, "transform mat=%m4 verts=%s", mat, op, "verts"); } -void bmesh_scale_exec(BMesh *bm, BMOperator *op) +void bmo_scale_exec(BMesh *bm, BMOperator *op) { float mat[3][3], vec[3]; @@ -91,7 +91,7 @@ void bmesh_scale_exec(BMesh *bm, BMOperator *op) BMO_op_callf(bm, "transform mat=%m3 verts=%s", mat, op, "verts"); } -void bmesh_rotate_exec(BMesh *bm, BMOperator *op) +void bmo_rotate_exec(BMesh *bm, BMOperator *op) { float vec[3]; @@ -109,7 +109,7 @@ void bmesh_rotate_exec(BMesh *bm, BMOperator *op) BMO_op_callf(bm, "translate verts=%s vec=%v", op, "verts", vec); } -void bmesh_reversefaces_exec(BMesh *bm, BMOperator *op) +void bmo_reversefaces_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMFace *f; @@ -119,7 +119,7 @@ void bmesh_reversefaces_exec(BMesh *bm, BMOperator *op) } } -void bmesh_edgerotate_exec(BMesh *bm, BMOperator *op) +void bmo_edgerotate_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMEdge *e, *e2; @@ -221,7 +221,7 @@ static void bmesh_regionextend_constrict(BMesh *bm, BMOperator *op, int usefaces } } -void bmesh_regionextend_exec(BMesh *bm, BMOperator *op) +void bmo_regionextend_exec(BMesh *bm, BMOperator *op) { int use_faces = BMO_slot_bool_get(op, "use_faces"); int constrict = BMO_slot_bool_get(op, "constrict"); @@ -264,7 +264,7 @@ void bmesh_regionextend_exec(BMesh *bm, BMOperator *op) /* NOTE: BM_ELEM_TAG is used on faces to tell if they are flipped. */ -void bmesh_righthandfaces_exec(BMesh *bm, BMOperator *op) +void bmo_righthandfaces_exec(BMesh *bm, BMOperator *op) { BMIter liter, liter2; BMOIter siter; @@ -365,13 +365,13 @@ void bmesh_righthandfaces_exec(BMesh *bm, BMOperator *op) /* check if we have faces yet to do. if so, recurse */ BMO_ITER(f, &siter, bm, op, "faces", BM_FACE) { if (!BMO_elem_flag_test(bm, f, FACE_VIS)) { - bmesh_righthandfaces_exec(bm, op); + bmo_righthandfaces_exec(bm, op); break; } } } -void bmesh_vertexsmooth_exec(BMesh *bm, BMOperator *op) +void bmo_vertexsmooth_exec(BMesh *bm, BMOperator *op) { BMOIter siter; BMIter iter; @@ -509,7 +509,7 @@ typedef struct tmp_face_ext { * Select similar faces, the choices are in the enum in source/blender/bmesh/bmesh_operators.h * We select either similar faces based on material, image, area, perimeter, normal, or the coplanar faces */ -void bmesh_similarfaces_exec(BMesh *bm, BMOperator *op) +void bmo_similarfaces_exec(BMesh *bm, BMOperator *op) { BMIter fm_iter; BMFace *fs, *fm; @@ -702,7 +702,7 @@ typedef struct tmp_edge_ext { * select similar edges: the choices are in the enum in source/blender/bmesh/bmesh_operators.h * choices are length, direction, face, ... */ -void bmesh_similaredges_exec(BMesh *bm, BMOperator *op) +void bmo_similaredges_exec(BMesh *bm, BMOperator *op) { BMOIter es_iter; /* selected edges iterator */ BMIter e_iter; /* mesh edges iterator */ @@ -870,7 +870,7 @@ typedef struct tmp_vert_ext { * select similar vertices: the choices are in the enum in source/blender/bmesh/bmesh_operators.h * choices are normal, face, vertex group... */ -void bmesh_similarverts_exec(BMesh *bm, BMOperator *op) +void bmo_similarverts_exec(BMesh *bm, BMOperator *op) { BMOIter vs_iter; /* selected verts iterator */ BMIter v_iter; /* mesh verts iterator */ @@ -973,7 +973,7 @@ void bmesh_similarverts_exec(BMesh *bm, BMOperator *op) ** Cycle UVs for a face **************************************************************************** */ -void bmesh_rotateuvs_exec(BMesh *bm, BMOperator *op) +void bmo_face_rotateuvs_exec(BMesh *bm, BMOperator *op) { BMOIter fs_iter; /* selected faces iterator */ BMFace *fs; /* current face */ @@ -1040,7 +1040,7 @@ void bmesh_rotateuvs_exec(BMesh *bm, BMOperator *op) ** Reverse UVs for a face **************************************************************************** */ -void bmesh_reverseuvs_exec(BMesh *bm, BMOperator *op) +void bmo_face_reverseuvs_exec(BMesh *bm, BMOperator *op) { BMOIter fs_iter; /* selected faces iterator */ BMFace *fs; /* current face */ @@ -1083,7 +1083,7 @@ void bmesh_reverseuvs_exec(BMesh *bm, BMOperator *op) ** Cycle colors for a face **************************************************************************** */ -void bmesh_rotatecolors_exec(BMesh *bm, BMOperator *op) +void bmo_rotatecolors_exec(BMesh *bm, BMOperator *op) { BMOIter fs_iter; /* selected faces iterator */ BMFace *fs; /* current face */ @@ -1149,7 +1149,7 @@ void bmesh_rotatecolors_exec(BMesh *bm, BMOperator *op) ** Reverse colors for a face **************************************************************************** */ -void bmesh_reversecolors_exec(BMesh *bm, BMOperator *op) +void bmo_face_reversecolors_exec(BMesh *bm, BMOperator *op) { BMOIter fs_iter; /* selected faces iterator */ BMFace *fs; /* current face */ @@ -1198,7 +1198,7 @@ typedef struct element_node { HeapNode *hn; /* heap node */ } element_node; -void bmesh_vertexshortestpath_exec(BMesh *bm, BMOperator *op) +void bmo_vertexshortestpath_exec(BMesh *bm, BMOperator *op) { BMOIter vs_iter /* , vs2_iter */; /* selected verts iterator */ BMIter v_iter; /* mesh verts iterator */ diff --git a/source/blender/editors/mesh/bmesh_tools.c b/source/blender/editors/mesh/bmesh_tools.c index 7ce70f374fb..624a569b3e0 100644 --- a/source/blender/editors/mesh/bmesh_tools.c +++ b/source/blender/editors/mesh/bmesh_tools.c @@ -247,7 +247,7 @@ static short EDBM_Extrude_edge(Object *obedit, BMEditMesh *em, const char hflag, ModifierData *md; BMElem *ele; - BMO_op_init(bm, &extop, "extrudefaceregion"); + BMO_op_init(bm, &extop, "extrude_face_region"); BMO_slot_from_hflag(bm, &extop, "edgefacein", hflag, BM_VERT|BM_EDGE|BM_FACE); @@ -386,7 +386,7 @@ static int extrude_repeat_mesh(bContext *C, wmOperator *op) for (a = 0; a < steps; a++) { EDBM_Extrude_edge(obedit, em, BM_ELEM_SELECT, nor); - //BMO_op_callf(em->bm, "extrudefaceregion edgefacein=%hef", BM_ELEM_SELECT); + //BMO_op_callf(em->bm, "extrude_face_region edgefacein=%hef", BM_ELEM_SELECT); BMO_op_callf(em->bm, "translate vec=%v verts=%hv", (float *)dvec, BM_ELEM_SELECT); //extrudeflag(obedit, em, SELECT, nor); //translateflag(em, SELECT, dvec); @@ -913,22 +913,22 @@ static int delete_mesh(bContext *C, Object *obedit, wmOperator *op, int event, S } else if (event == 11) { //"Edge Loop" - if (!EDBM_CallOpf(bem, op, "dissolveedgeloop edges=%he", BM_ELEM_SELECT)) + if (!EDBM_CallOpf(bem, op, "dissolve_edge_loop edges=%he", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; } else if (event == 7) { int use_verts = RNA_boolean_get(op->ptr, "use_verts"); //"Dissolve" if (bem->selectmode & SCE_SELECT_FACE) { - if (!EDBM_CallOpf(bem, op, "dissolvefaces faces=%hf use_verts=%b", BM_ELEM_SELECT, use_verts)) + if (!EDBM_CallOpf(bem, op, "dissolve_faces faces=%hf use_verts=%b", BM_ELEM_SELECT, use_verts)) return OPERATOR_CANCELLED; } else if (bem->selectmode & SCE_SELECT_EDGE) { - if (!EDBM_CallOpf(bem, op, "dissolveedges edges=%he use_verts=%b", BM_ELEM_SELECT, use_verts)) + if (!EDBM_CallOpf(bem, op, "dissolve_edges edges=%he use_verts=%b", BM_ELEM_SELECT, use_verts)) return OPERATOR_CANCELLED; } else if (bem->selectmode & SCE_SELECT_VERTEX) { - if (!EDBM_CallOpf(bem, op, "dissolveverts verts=%hv", BM_ELEM_SELECT)) + if (!EDBM_CallOpf(bem, op, "dissolve_verts verts=%hv", BM_ELEM_SELECT)) return OPERATOR_CANCELLED; } } @@ -1835,7 +1835,7 @@ static int mesh_rotate_uvs(bContext *C, wmOperator *op) int dir = RNA_enum_get(op->ptr, "direction"); /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "meshrotateuvs faces=%hf dir=%i", BM_ELEM_SELECT, dir); + EDBM_InitOpf(em, &bmop, op, "face_rotateuvs faces=%hf dir=%i", BM_ELEM_SELECT, dir); /* execute the operator */ BMO_op_exec(em->bm, &bmop); @@ -1860,7 +1860,7 @@ static int mesh_reverse_uvs(bContext *C, wmOperator *op) BMOperator bmop; /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "meshreverseuvs faces=%hf", BM_ELEM_SELECT); + EDBM_InitOpf(em, &bmop, op, "face_reverseuvs faces=%hf", BM_ELEM_SELECT); /* execute the operator */ BMO_op_exec(em->bm, &bmop); @@ -1888,7 +1888,7 @@ static int mesh_rotate_colors(bContext *C, wmOperator *op) int dir = RNA_enum_get(op->ptr, "direction"); /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "meshrotatecolors faces=%hf dir=%i", BM_ELEM_SELECT, dir); + EDBM_InitOpf(em, &bmop, op, "face_rotatecolors faces=%hf dir=%i", BM_ELEM_SELECT, dir); /* execute the operator */ BMO_op_exec(em->bm, &bmop); @@ -1916,7 +1916,7 @@ static int mesh_reverse_colors(bContext *C, wmOperator *op) BMOperator bmop; /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */ - EDBM_InitOpf(em, &bmop, op, "meshreversecolors faces=%hf", BM_ELEM_SELECT); + EDBM_InitOpf(em, &bmop, op, "face_reversecolors faces=%hf", BM_ELEM_SELECT); /* execute the operator */ BMO_op_exec(em->bm, &bmop); @@ -3542,7 +3542,7 @@ static int dissolve_limited_exec(bContext *C, wmOperator *op) float angle_limit = RNA_float_get(op->ptr, "angle_limit"); if (!EDBM_CallOpf(em, op, - "dissolvelimit edges=%he verts=%hv angle_limit=%f", + "dissolve_limit edges=%he verts=%hv angle_limit=%f", BM_ELEM_SELECT, BM_ELEM_SELECT, angle_limit)) { return OPERATOR_CANCELLED; |