style/name cleanup: have EDBM_* functions match our style guide and also match BM_...
authorCampbell Barton <ideasman42@gmail.com>
Tue, 27 Mar 2012 04:46:52 +0000 (04:46 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 27 Mar 2012 04:46:52 +0000 (04:46 +0000)
45 files changed:
source/blender/blenkernel/BKE_customdata.h
source/blender/blenkernel/BKE_tessmesh.h
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/pointcache.c
source/blender/bmesh/intern/bmesh_operator_api.h
source/blender/editors/include/ED_mesh.h
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh_add.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/editors/mesh/editmesh_loopcut.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/editors/mesh/editmesh_utils.c
source/blender/editors/mesh/mesh_data.c
source/blender/editors/mesh/mesh_intern.h
source/blender/editors/mesh/mesh_navmesh.c
source/blender/editors/mesh/meshtools.c
source/blender/editors/object/object_edit.c
source/blender/editors/object/object_hook.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_transform.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/editors/sculpt_paint/sculpt_uv.c
source/blender/editors/space_image/space_image.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_snap.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_manipulator.c
source/blender/editors/transform/transform_orientations.c
source/blender/editors/transform/transform_snap.c
source/blender/editors/util/ed_util.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/editors/uvedit/uvedit_intern.h
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_smart_stitch.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/makesrna/intern/rna_object.c
source/blenderplayer/bad_level_call_stubs/stubs.c

index a22182a52f5fecbf9d18765057e42b50585ec90e..9797aa1201f29a13c8ebedaccfaa840922991a39 100644 (file)
@@ -125,7 +125,7 @@ void CustomData_free_temporary(struct CustomData *data, int totelem);
  * backed by an external data array. the different allocation types are
  * defined above. returns the data of the layer.
  *
- * in editmode, use EM_add_data_layer instead of this function
+ * in editmode, use EDBM_data_layer_add instead of this function
  */
 void *CustomData_add_layer(struct CustomData *data, int type, int alloctype,
                                                   void *layer, int totelem);
@@ -136,14 +136,14 @@ void *CustomData_add_layer_named(struct CustomData *data, int type, int alloctyp
 /* frees the active or first data layer with the give type.
  * returns 1 on succes, 0 if no layer with the given type is found
  *
- * in editmode, use EM_free_data_layer instead of this function
+ * in editmode, use EDBM_data_layer_free instead of this function
  */
 int CustomData_free_layer(struct CustomData *data, int type, int totelem, int index);
 
 /* frees the layer index with the give type.
  * returns 1 on succes, 0 if no layer with the given type is found
  *
- * in editmode, use EM_free_data_layer instead of this function
+ * in editmode, use EDBM_data_layer_free instead of this function
  */
 int CustomData_free_layer_active(struct CustomData *data, int type, int totelem);
 
index 407b96320a444fd74250adb06d2d51da18477982..d9d2c21e2b3907c08d77fde3eb0fb6f1f5ecac85 100644 (file)
@@ -61,7 +61,7 @@ typedef struct BMEditMesh {
        int lastDataMask;
 
        /* index tables, to map indices to elements via
-        * EDBM_init_index_arrays and associated functions.  don't
+        * EDBM_index_arrays_init and associated functions.  don't
         * touch this or read it directly.*/
        struct BMVert **vert_index;
        struct BMEdge **edge_index;
index 693a155c23d80b14faae31247981b85b40d2fd68..7cc37da4b1deecc90a1503bf67af83b4f33e5b30 100644 (file)
@@ -1314,7 +1314,7 @@ static void emDM_getVert(DerivedMesh *dm, int index, MVert *vert_r)
                return;
        }
 
-       // ev = EDBM_get_vert_for_index(bmdm->tc, index);
+       // ev = EDBM_vert_at_index(bmdm->tc, index);
        ev = BM_vert_at_index(bmdm->tc->bm, index); /* warning, does list loop, _not_ ideal */
 
        bmvert_to_mvert(bmdm->tc->bm, ev, vert_r);
@@ -1331,7 +1331,7 @@ static void emDM_getEdge(DerivedMesh *dm, int index, MEdge *edge_r)
                return;
        }
 
-       // e = EDBM_get_edge_for_index(bmdm->tc, index);
+       // e = EDBM_edge_at_index(bmdm->tc, index);
        e = BM_edge_at_index(bmdm->tc->bm, index); /* warning, does list loop, _not_ ideal */
 
        if (CustomData_has_layer(&bm->edata, CD_BWEIGHT)) {
index 3c4a469a1a6c55f8546cd006962692514e5aeef1..b14805a5e463da72d3b44caee1b5dc9b0bf03a33 100644 (file)
@@ -2097,7 +2097,7 @@ float (*mesh_getVertexCos(Mesh *me, int *numVerts_r))[3]
 }
 
 
-/* ngon version wip, based on EDBM_make_uv_vert_map */
+/* ngon version wip, based on EDBM_uv_vert_map_create */
 /* this replaces the non bmesh function (in trunk) which takes MTFace's, if we ever need it back we could
  * but for now this replaces it because its unused. */
 
index f24e2deb6508b4d5513e68ce6da85f146522c0a8..76195c29fb3a172f900ffade3b861345c1263109 100644 (file)
 /* needed for directory lookup */
 /* untitled blend's need getpid for a unique name */
 #ifndef WIN32
-  #include <dirent.h>
-#include <unistd.h>
+#  include <dirent.h>
+#  include <unistd.h>
 #else
-#include <process.h>
-  #include "BLI_winstuff.h"
+#  include <process.h>
+#  include "BLI_winstuff.h"
 #endif
 
 #define PTCACHE_DATA_FROM(data, type, from)            if (data[type]) { memcpy(data[type], from, ptcache_data_size[type]); }
index 1b4e119ad924e9cd7f83ec56966176758d277a0a..e840026b5401de6d8b12118f6d9d54d5c1b3964f 100644 (file)
@@ -234,7 +234,7 @@ int BMO_op_callf(BMesh *bm, const char *fmt, ...);
 int BMO_op_initf(BMesh *bm, BMOperator *op, const char *fmt, ...);
 
 /* va_list version, used to implement the above two functions,
- * plus EDBM_CallOpf in bmeshutils.c. */
+ * plus EDBM_op_callf in bmeshutils.c. */
 int BMO_op_vinitf(BMesh *bm, BMOperator *op, const char *fmt, va_list vlist);
 
 /* test whether a named slot exists */
index 69376a9bde332934e3356085a798efdf2b3f2acd..71bce196ddf469c0378295cc313b9a45c5c4c1a9 100644 (file)
@@ -71,74 +71,52 @@ struct Material;
 struct Object;
 struct rcti;
 
-#define EM_FGON_DRAW   1 // face flag
-#define EM_FGON                        2 // edge and face flag both
+#define EM_FGON_DRAW    1 // face flag
+#define EM_FGON         2 // edge and face flag both
 
 /* editbutflag */
-#define B_CLOCKWISE                    1
-#define B_KEEPORIG                     2
-#define B_BEAUTY                       4
-#define B_SMOOTH                       8
-#define B_BEAUTY_SHORT         0x10
-#define B_AUTOFGON                     0x20
-#define B_KNIFE                                0x80
-#define B_PERCENTSUBD          0x40
+#define B_CLOCKWISE         1
+#define B_KEEPORIG          2
+#define B_BEAUTY            4
+#define B_SMOOTH            8
+#define B_BEAUTY_SHORT      0x10
+#define B_AUTOFGON          0x20
+#define B_KNIFE             0x80
+#define B_PERCENTSUBD       0x40
 //#define B_MESH_X_MIRROR              0x100 // deprecated, use mesh
-#define B_JOINTRIA_UV          0x200
-#define B_JOINTRIA_VCOL                0X400
-#define B_JOINTRIA_SHARP       0X800
-#define B_JOINTRIA_MAT         0X1000
-#define B_FRACTAL                      0x2000
-#define B_SPHERE                       0x4000
+#define B_JOINTRIA_UV       0x200
+#define B_JOINTRIA_VCOL     0X400
+#define B_JOINTRIA_SHARP    0X800
+#define B_JOINTRIA_MAT      0X1000
+#define B_FRACTAL           0x2000
+#define B_SPHERE            0x4000
 
 intptr_t    mesh_octree_table(struct Object *ob, struct BMEditMesh *em, float *co, char mode);
 int         mesh_mirrtopo_table(struct Object *ob, char mode);
 
 /* bmeshutils.c */
 
-/**
- * [note: I've decided to use ideasman's code for non-editmode stuff, but since
- *  it has a big "not for editmode!" disclaimer, I'm going to keep what I have here
- *  - joeedh]
- *  
- * x-mirror editing api.  usage:
- *  
- *  EDBM_CacheMirrorVerts(em);
- *  ...
- *  ...
- *  BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
- *     mirrorv = EDBM_GetMirrorVert(em, v);
- *  }
- *  ...
- *  ...
- *  EDBM_EndMirrorCache(em);
- *
- * \note why do we only allow x axis mirror editing?
- */
-void EDBM_CacheMirrorVerts(struct BMEditMesh *em, const short use_select); /* note, replaces EM_cache_x_mirror_vert in trunk */
 
 /* retrieves mirrored cache vert, or NULL if there isn't one.
  * note: calling this without ensuring the mirror cache state
  * is bad.*/
-struct BMVert *EDBM_GetMirrorVert(struct BMEditMesh *em, struct BMVert *v);
-void           EDBM_ClearMirrorVert(struct BMEditMesh *em, struct BMVert *v);
-void EDBM_EndMirrorCache(struct BMEditMesh *em);
-void EDBM_ApplyMirrorCache(struct BMEditMesh *em, const int sel_from, const int sel_to);
+void           EDBM_verts_mirror_cache_begin(struct BMEditMesh *em, const short use_select); /* note, replaces EM_cache_x_mirror_vert in trunk */
+void           EDBM_verts_mirror_apply(struct BMEditMesh *em, const int sel_from, const int sel_to);
+struct BMVert *EDBM_verts_mirror_get(struct BMEditMesh *em, struct BMVert *v);
+void           EDBM_verts_mirror_cache_clear(struct BMEditMesh *em, struct BMVert *v);
+void           EDBM_verts_mirror_cache_end(struct BMEditMesh *em);
 
-void EDBM_RecalcNormals(struct BMEditMesh *em);
+void EDBM_mesh_normals_update(struct BMEditMesh *em);
 
-void EDBM_MakeEditBMesh(struct ToolSettings *ts, struct Scene *scene, struct Object *ob);
-void EDBM_FreeEditBMesh(struct BMEditMesh *tm);
-void EDBM_LoadEditBMesh(struct Scene *scene, struct Object *ob);
+void EDBM_mesh_make(struct ToolSettings *ts, struct Scene *scene, struct Object *ob);
+void EDBM_mesh_free(struct BMEditMesh *tm);
+void EDBM_mesh_load(struct Scene *scene, struct Object *ob);
 
-void EDBM_init_index_arrays(struct BMEditMesh *em, int forvert, int foredge, int forface);
-void EDBM_free_index_arrays(struct BMEditMesh *em);
-struct BMVert *EDBM_get_vert_for_index(struct BMEditMesh *em, int index);
-struct BMEdge *EDBM_get_edge_for_index(struct BMEditMesh *em, int index);
-struct BMFace *EDBM_get_face_for_index(struct BMEditMesh *em, int index);
-
-int EDBM_CallAndSelectOpf(struct BMEditMesh *em, struct wmOperator *op, 
-                                                 const char *selectslot, const char *fmt, ...);
+void           EDBM_index_arrays_init(struct BMEditMesh *em, int forvert, int foredge, int forface);
+void           EDBM_index_arrays_free(struct BMEditMesh *em);
+struct BMVert *EDBM_vert_at_index(struct BMEditMesh *em, int index);
+struct BMEdge *EDBM_edge_at_index(struct BMEditMesh *em, int index);
+struct BMFace *EDBM_face_at_index(struct BMEditMesh *em, int index);
 
 /* flushes based on the current select mode.  if in vertex select mode,
  * verts select/deselect edges and faces, if in edge select mode,
@@ -147,8 +125,6 @@ int EDBM_CallAndSelectOpf(struct BMEditMesh *em, struct wmOperator *op,
 void EDBM_select_more(struct BMEditMesh *em);
 void EDBM_select_less(struct BMEditMesh *em);
 
-int EDBM_get_actSelection(struct BMEditMesh *em, struct BMEditSelection *ese);
-
 void EDBM_selectmode_flush_ex(struct BMEditMesh *em, int selectmode);
 void EDBM_selectmode_flush(struct BMEditMesh *em);
 
@@ -156,45 +132,47 @@ void EDBM_deselect_flush(struct BMEditMesh *em);
 void EDBM_select_flush(struct BMEditMesh *em);
 
 void EDBM_selectmode_set(struct BMEditMesh *em);
-void EDBM_convertsel(struct BMEditMesh *em, short oldmode, short selectmode);
-void           undo_push_mesh(struct bContext *C, const char *name);
+void EDBM_selectmode_convert(struct BMEditMesh *em, short oldmode, short selectmode);
+void undo_push_mesh(struct bContext *C, const char *name);
 
+int  EDBM_editselection_active_get(struct BMEditMesh *em, struct BMEditSelection *ese);
 void EDBM_editselection_center(struct BMEditMesh *em, float *center, struct BMEditSelection *ese);
 void EDBM_editselection_plane(struct BMEditMesh *em, float *plane, struct BMEditSelection *ese);
 void EDBM_editselection_normal(float *normal, struct BMEditSelection *ese);
-int EDBM_vertColorCheck(struct BMEditMesh *em);
-void EDBM_validate_selections(struct BMEditMesh *em);
+int  EDBM_vert_color_check(struct BMEditMesh *em);
+void EDBM_editselection_validate(struct BMEditMesh *em);
 
-void EDBM_hide_mesh(struct BMEditMesh *em, int swap);
-void EDBM_reveal_mesh(struct BMEditMesh *em);
+void EDBM_mesh_hide(struct BMEditMesh *em, int swap);
+void EDBM_mesh_reveal(struct BMEditMesh *em);
 
 void EDBM_update_generic(struct bContext *C, struct BMEditMesh *em, const short do_tessface);
 
-int                    EDBM_check_backbuf(unsigned int index);
-int                    EDBM_mask_init_backbuf_border(struct ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax);
-void           EDBM_free_backbuf(void);
-int                    EDBM_init_backbuf_border(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax);
-int                    EDBM_init_backbuf_circle(struct ViewContext *vc, short xs, short ys, short rads);
+int  EDBM_backbuf_check(unsigned int index);
+int EDBM_backbuf_border_mask_init(struct ViewContext *vc, int mcords[][2], short tot,
+                                  short xmin, short ymin, short xmax, short ymax);
+void EDBM_backbuf_free(void);
+int  EDBM_backbuf_border_init(struct ViewContext *vc, short xmin, short ymin, short xmax, short ymax);
+int  EDBM_backbuf_circle_init(struct ViewContext *vc, short xs, short ys, short rads);
 
 void EDBM_deselect_by_material(struct BMEditMesh *em, const short index, const short select);
 
-int EDBM_select_interior_faces(struct BMEditMesh *em);
+struct UvElementMap *EDBM_uv_element_map_create(struct BMEditMesh *em, int selected, int doIslands);
+void                 EDBM_uv_element_map_free(struct UvElementMap *vmap);
 
-struct UvElementMap *EDBM_make_uv_element_map(struct BMEditMesh *em, int selected, int doIslands);
-void           EDBM_free_uv_element_map(struct UvElementMap *vmap);
+int              EDBM_mtexpoly_check(struct BMEditMesh *em);
+struct MTexPoly *EDBM_mtexpoly_active_get(struct BMEditMesh *em, struct BMFace **r_act_efa, int sloppy);
 
-void EDBM_select_swap(struct BMEditMesh *em); /* exported for UV */
-
-int EDBM_texFaceCheck(struct BMEditMesh *em);
-struct MTexPoly *EDBM_get_active_mtexpoly(struct BMEditMesh *em, struct BMFace **r_act_efa, int sloppy);
+void              EDBM_uv_vert_map_free(struct UvVertMap *vmap);
+struct UvMapVert *EDBM_uv_vert_map_at_index(struct UvVertMap *vmap, unsigned int v);
+struct UvVertMap *EDBM_uv_vert_map_create(struct BMEditMesh *em, int selected, int do_face_idx_array, float *limit);
 
-void EDBM_free_uv_vert_map(struct UvVertMap *vmap);
-struct UvMapVert *EDBM_get_uv_map_vert(struct UvVertMap *vmap, unsigned int v);
-struct UvVertMap *EDBM_make_uv_vert_map(struct BMEditMesh *em, int selected, int do_face_idx_array, float *limit);
-void           EM_add_data_layer(struct BMEditMesh *em, struct CustomData *data, int type, const char *name);
-void           EM_free_data_layer(struct BMEditMesh *em, struct CustomData *data, int type);
+void EDBM_data_layer_add(struct BMEditMesh *em, struct CustomData *data, int type, const char *name);
+void EDBM_data_layer_free(struct BMEditMesh *em, struct CustomData *data, int type);
 
 void EDBM_select_toggle_all(struct BMEditMesh *em);
+void EDBM_select_swap(struct BMEditMesh *em); /* exported for UV */
+int  EDBM_select_interior_faces(struct BMEditMesh *em);
+
 void EDBM_flag_enable_all(struct BMEditMesh *em, const char hflag);
 void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag);
 void EDBM_select_mirrored(struct Object *obedit, struct BMEditMesh *em, int extend);
@@ -203,25 +181,25 @@ void EDBM_automerge(struct Scene *scene, struct Object *ob, int update);
 /* editmesh_mods.c */
 extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs;
 
-int                    mouse_mesh(struct bContext *C, const int mval[2], short extend);
+int         mouse_mesh(struct bContext *C, const int mval[2], short extend);
 
-struct BMVert   *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, float *co, int index);
-int                    mesh_get_x_mirror_vert(struct Object *ob, int index);
-int                    *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em);
+struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, float *co, int index);
+int            mesh_get_x_mirror_vert(struct Object *ob, int index);
+int           *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em);
 
-int                    join_mesh_exec(struct bContext *C, struct wmOperator *op);
-int                    join_mesh_shapes_exec(struct bContext *C, struct wmOperator *op);
+int         join_mesh_exec(struct bContext *C, struct wmOperator *op);
+int         join_mesh_shapes_exec(struct bContext *C, struct wmOperator *op);
 
 /* mesh_ops.c */
-void           ED_operatortypes_mesh(void);
-void           ED_operatormacros_mesh(void);
-void           ED_keymap_mesh(struct wmKeyConfig *keyconf);
+void        ED_operatortypes_mesh(void);
+void        ED_operatormacros_mesh(void);
+void        ED_keymap_mesh(struct wmKeyConfig *keyconf);
 
 
 /* editmesh.c */
 
-void           ED_spacetypes_init(void);
-void           ED_keymap_mesh(struct wmKeyConfig *keyconf);
+void        ED_spacetypes_init(void);
+void        ED_keymap_mesh(struct wmKeyConfig *keyconf);
 
 /* bmesh_mods.c */
 extern unsigned int bm_vertoffs, bm_solidoffs, bm_wireoffs;
@@ -241,7 +219,7 @@ void paintface_hide(struct Object *ob, const int unselected);
 void paintface_reveal(struct Object *ob);
 
 void paintvert_deselect_all_visible(struct Object *ob, int action, short flush_flags);
-void           paintvert_flush_flags(struct Object *ob);
+void        paintvert_flush_flags(struct Object *ob);
 
 /* object_vgroup.c */
 
@@ -249,25 +227,25 @@ void              paintvert_flush_flags(struct Object *ob);
 #define WEIGHT_ADD 2
 #define WEIGHT_SUBTRACT 3
 
-struct bDeformGroup            *ED_vgroup_add(struct Object *ob);
-struct bDeformGroup            *ED_vgroup_add_name(struct Object *ob, const char *name);
-void                                   ED_vgroup_delete(struct Object *ob, struct bDeformGroup *defgroup);
-void                                   ED_vgroup_clear(struct Object *ob);
-void                                   ED_vgroup_select_by_name(struct Object *ob, const char *name);
-int                                            ED_vgroup_data_create(struct ID *id);
-int                                            ED_vgroup_give_array(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot);
-int                                            ED_vgroup_copy_array(struct Object *ob, struct Object *ob_from);
-void                                   ED_vgroup_mirror(struct Object *ob, const short mirror_weights, const short flip_vgroups, const short all_vgroups);
+struct bDeformGroup *ED_vgroup_add(struct Object *ob);
+struct bDeformGroup *ED_vgroup_add_name(struct Object *ob, const char *name);
+void                 ED_vgroup_delete(struct Object *ob, struct bDeformGroup *defgroup);
+void                 ED_vgroup_clear(struct Object *ob);
+void                 ED_vgroup_select_by_name(struct Object *ob, const char *name);
+int                  ED_vgroup_data_create(struct ID *id);
+int                  ED_vgroup_give_array(struct ID *id, struct MDeformVert **dvert_arr, int *dvert_tot);
+int                  ED_vgroup_copy_array(struct Object *ob, struct Object *ob_from);
+void                 ED_vgroup_mirror(struct Object *ob, const short mirror_weights, const short flip_vgroups, const short all_vgroups);
 
-int                                            ED_vgroup_object_is_edit_mode(struct Object *ob);
+int                  ED_vgroup_object_is_edit_mode(struct Object *ob);
 
-void           ED_vgroup_vert_add(struct Object *ob, struct bDeformGroup *dg, int vertnum,  float weight, int assignmode);
-void           ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertnum);
-float          ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vertnum);
+void                 ED_vgroup_vert_add(struct Object *ob, struct bDeformGroup *dg, int vertnum,  float weight, int assignmode);
+void                 ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertnum);
+float                ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vertnum);
 
-struct BMVert *EDBM_findnearestvert(struct ViewContext *vc, int *dist, short sel, short strict);
-struct BMEdge *EDBM_findnearestedge(struct ViewContext *vc, int *dist);
-struct BMFace *EDBM_findnearestface(struct ViewContext *vc, int *dist);
+struct BMVert *EDBM_vert_find_nearest(struct ViewContext *vc, int *dist, short sel, short strict);
+struct BMEdge *EDBM_edge_find_nearest(struct ViewContext *vc, int *dist);
+struct BMFace *EDBM_face_find_nearest(struct ViewContext *vc, int *dist);
 
 /* mesh_data.c */
 // void ED_mesh_geometry_add(struct Mesh *mesh, struct ReportList *reports, int verts, int edges, int faces);
@@ -295,7 +273,7 @@ int ED_mesh_color_remove(struct bContext *C, struct Object *ob, struct Mesh *me)
 int ED_mesh_color_remove_named(struct bContext *C, struct Object *ob, struct Mesh *me, const char *name);
 
 void EDBM_selectmode_to_scene(struct bContext *C);
-void EDBM_ClearMesh(struct BMEditMesh *em);
+void EDBM_mesh_clear(struct BMEditMesh *em);
 
 #include "../mesh/editmesh_bvh.h"
 
@@ -303,9 +281,9 @@ void EDBM_ClearMesh(struct BMEditMesh *em);
 /* mirrtopo */
 typedef struct MirrTopoStore_t {
        intptr_t *index_lookup;
-       int       prev_vert_tot;
-       int       prev_edge_tot;
-       int       prev_ob_mode;
+       int prev_vert_tot;
+       int prev_edge_tot;
+       int prev_ob_mode;
 } MirrTopoStore_t;
 
 int  ED_mesh_mirrtopo_recalc_check(struct Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_topo_store);
@@ -319,9 +297,9 @@ void ED_mesh_mirrtopo_free(MirrTopoStore_t *mesh_topo_store);
 #define SUBDIV_SELECT_LOOPCUT   3
 
 /* edge subdivide corner cut types */
-#define SUBDIV_CORNER_PATH             0
-#define SUBDIV_CORNER_INNERVERT        1
-#define SUBDIV_CORNER_FAN              2
+#define SUBDIV_CORNER_PATH      0
+#define SUBDIV_CORNER_INNERVERT 1
+#define SUBDIV_CORNER_FAN       2
 
 #ifdef __cplusplus
 }
index 3fad6f6a2cb975a09badbbf62ef2009fa7c345f4..d2446d1ad0ef9477d7cfe94990df74eb2bc44f32 100644 (file)
@@ -879,7 +879,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
 
        if (em) {
                if (skip_em_vert_array_init == FALSE) {
-                       EDBM_init_index_arrays(em, 1, 0, 0);
+                       EDBM_index_arrays_init(em, 1, 0, 0);
                }
        }
 
@@ -904,8 +904,8 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
                if ((a == totvert) || (topo_pairs[a - 1].hash != topo_pairs[a].hash)) {
                        if (a - last == 2) {
                                if (em) {
-                                       index_lookup[topo_pairs[a - 1].v_index] = (intptr_t)EDBM_get_vert_for_index(em, topo_pairs[a - 2].v_index);
-                                       index_lookup[topo_pairs[a - 2].v_index] = (intptr_t)EDBM_get_vert_for_index(em, topo_pairs[a - 1].v_index);
+                                       index_lookup[topo_pairs[a - 1].v_index] = (intptr_t)EDBM_vert_at_index(em, topo_pairs[a - 2].v_index);
+                                       index_lookup[topo_pairs[a - 2].v_index] = (intptr_t)EDBM_vert_at_index(em, topo_pairs[a - 1].v_index);
                                }
                                else {
                                        index_lookup[topo_pairs[a - 1].v_index] = topo_pairs[a - 2].v_index;
@@ -917,7 +917,7 @@ void ED_mesh_mirrtopo_init(Mesh *me, const int ob_mode, MirrTopoStore_t *mesh_to
        }
        if (em) {
                if (skip_em_vert_array_init == FALSE) {
-                       EDBM_free_index_arrays(em);
+                       EDBM_index_arrays_free(em);
                }
        }
 
index 0d40e8585c3504ce91a570f5459b6757949a938b..a464e40217af1c8248f368d9810f5dbfd0b53012 100644 (file)
@@ -51,6 +51,8 @@
 #include "ED_screen.h"
 #include "ED_object.h"
 
+#include "mesh_intern.h"
+
 /* uses context to figure out transform for primitive */
 /* returns standard diameter */
 static float new_primitive_matrix(bContext *C, float *loc, float *rot, float primmat[][4])
@@ -137,7 +139,7 @@ static int add_primitive_plane_exec(bContext *C, wmOperator *op)
        me = obedit->data;
        em = me->edit_btmesh;
 
-       if (!EDBM_CallAndSelectOpf(em, op, "vertout", 
+       if (!EDBM_op_call_and_selectf(em, op, "vertout", 
                                   "create_grid xsegments=%i ysegments=%i size=%f mat=%m4", 1, 1, dia, mat))
        {
                return OPERATOR_CANCELLED;
@@ -183,7 +185,7 @@ static int add_primitive_cube_exec(bContext *C, wmOperator *op)
        me = obedit->data;
        em = me->edit_btmesh;
 
-       if (!EDBM_CallAndSelectOpf(em, op, "vertout", "create_cube mat=%m4 size=%f", mat, 2.0f)) {
+       if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_cube mat=%m4 size=%f", mat, 2.0f)) {
                return OPERATOR_CANCELLED;
        }
        
@@ -237,7 +239,7 @@ static int add_primitive_circle_exec(bContext *C, wmOperator *op)
        me = obedit->data;
        em = me->edit_btmesh;
 
-       if (!EDBM_CallAndSelectOpf(em, op, "vertout",
+       if (!EDBM_op_call_and_selectf(em, op, "vertout",
                                   "create_circle segments=%i diameter=%f cap_ends=%b cap_tris=%b mat=%m4",
                                   RNA_int_get(op->ptr, "vertices"), RNA_float_get(op->ptr, "radius"),
                                   cap_end, cap_tri, mat))
@@ -296,7 +298,7 @@ static int add_primitive_cylinder_exec(bContext *C, wmOperator *op)
        me = obedit->data;
        em = me->edit_btmesh;
 
-       if (!EDBM_CallAndSelectOpf(
+       if (!EDBM_op_call_and_selectf(
                em, op, "vertout",
                "create_cone segments=%i diameter1=%f diameter2=%f cap_ends=%b cap_tris=%b depth=%f mat=%m4",
                RNA_int_get(op->ptr, "vertices"),
@@ -361,7 +363,7 @@ static int add_primitive_cone_exec(bContext *C, wmOperator *op)
        me = obedit->data;
        em = me->edit_btmesh;
 
-       if (!EDBM_CallAndSelectOpf(
+       if (!EDBM_op_call_and_selectf(
                em, op, "vertout",
                "create_cone segments=%i diameter1=%f diameter2=%f cap_ends=%b cap_tris=%b depth=%f mat=%m4",
                RNA_int_get(op->ptr, "vertices"), RNA_float_get(op->ptr, "radius1"),
@@ -422,7 +424,7 @@ static int add_primitive_grid_exec(bContext *C, wmOperator *op)
        me = obedit->data;
        em = me->edit_btmesh;
 
-       if (!EDBM_CallAndSelectOpf(em, op, "vertout",
+       if (!EDBM_op_call_and_selectf(em, op, "vertout",
                                   "create_grid xsegments=%i ysegments=%i size=%f mat=%m4",
                                   RNA_int_get(op->ptr, "x_subdivisions"),
                                   RNA_int_get(op->ptr, "y_subdivisions"),
@@ -481,7 +483,7 @@ static int add_primitive_monkey_exec(bContext *C, wmOperator *op)
        me = obedit->data;
        em = me->edit_btmesh;
 
-       if (!EDBM_CallAndSelectOpf(em, op, "vertout", "create_monkey mat=%m4", mat)) {
+       if (!EDBM_op_call_and_selectf(em, op, "vertout", "create_monkey mat=%m4", mat)) {
                return OPERATOR_CANCELLED;
        }
        
@@ -524,7 +526,7 @@ static int add_primitive_uvsphere_exec(bContext *C, wmOperator *op)
        me = obedit->data;
        em = me->edit_btmesh;
 
-       if (!EDBM_CallAndSelectOpf(em, op, "vertout",
+       if (!EDBM_op_call_and_selectf(em, op, "vertout",
                                   "create_uvsphere segments=%i revolutions=%i diameter=%f mat=%m4",
                                   RNA_int_get(op->ptr, "segments"), RNA_int_get(op->ptr, "ring_count"),
                                   RNA_float_get(op->ptr, "size"), mat))
@@ -580,7 +582,7 @@ static int add_primitive_icosphere_exec(bContext *C, wmOperator *op)
        me = obedit->data;
        em = me->edit_btmesh;
 
-       if (!EDBM_CallAndSelectOpf(
+       if (!EDBM_op_call_and_selectf(
                em, op, "vertout",
                "create_icosphere subdivisions=%i diameter=%f mat=%m4",
                RNA_int_get(op->ptr, "subdivisions"),
index d1dc873aa088e13bc7a85abc549f4476380c96a5..0ef6e2b81a876b0afebc3d1496212ad1b8d46271 100644 (file)
@@ -1269,7 +1269,7 @@ static BMFace *knife_find_closest_face(knifetool_opdata *kcd, float co[3], float
 
        if (!f) {
                /* try to use backbuffer selection method if ray casting failed */
-               f = EDBM_findnearestface(&kcd->vc, &dist);
+               f = EDBM_face_find_nearest(&kcd->vc, &dist);
 
                /* cheat for now; just put in the origin instead
                 * of a true coordinate on the face.
index eb28359c333c2551a697a16ab3ded0feac9d1b36..b151978c1f1743123419c6be04f7592ffc53c5e9 100644 (file)
@@ -334,9 +334,9 @@ static void ringsel_finish(bContext *C, wmOperator *op)
                        
                        /* sets as active, useful for other tools */
                        if (em->selectmode & SCE_SELECT_VERTEX)
-                               EDBM_store_selection(em, lcd->eed->v1);  /* low priority TODO, get vertrex close to mouse */
+                               EDBM_editselection_store(em, &lcd->eed->v1->head);  /* low priority TODO, get vertrex close to mouse */
                        if (em->selectmode & SCE_SELECT_EDGE)
-                               EDBM_store_selection(em, lcd->eed);
+                               EDBM_editselection_store(em, &lcd->eed->head);
                        
                        EDBM_selectmode_flush(lcd->em);
                        WM_event_add_notifier(C, NC_GEOM | ND_SELECT, lcd->ob->data);
@@ -418,7 +418,7 @@ static int ringcut_invoke(bContext *C, wmOperator *op, wmEvent *evt)
        lcd->vc.mval[0] = evt->mval[0];
        lcd->vc.mval[1] = evt->mval[1];
        
-       edge = EDBM_findnearestedge(&lcd->vc, &dist);
+       edge = EDBM_edge_find_nearest(&lcd->vc, &dist);
        if (edge != lcd->eed) {
                lcd->eed = edge;
                ringsel_find_edge(lcd, 1);
@@ -502,7 +502,7 @@ static int loopcut_modal(bContext *C, wmOperator *op, wmEvent *event)
 
                        lcd->vc.mval[0] = event->mval[0];
                        lcd->vc.mval[1] = event->mval[1];
-                       edge = EDBM_findnearestedge(&lcd->vc, &dist);
+                       edge = EDBM_edge_find_nearest(&lcd->vc, &dist);
 
                        if (edge != lcd->eed) {
                                lcd->eed = edge;
index deca9228cdfd1d0de75a934d0fcc473a3ac39d56..af1beba784114531605f021a904e7ed3d80eafb6 100644 (file)
@@ -83,7 +83,7 @@ void EDBM_select_mirrored(Object *UNUSED(obedit), BMEditMesh *em, int extend)
                }
        }
 
-       EDBM_CacheMirrorVerts(em, TRUE);
+       EDBM_verts_mirror_cache_begin(em, TRUE);
 
        if (!extend)
                EDBM_flag_disable_all(em, BM_ELEM_SELECT);
@@ -92,13 +92,13 @@ void EDBM_select_mirrored(Object *UNUSED(obedit), BMEditMesh *em, int extend)
                if (!BM_elem_flag_test(v1, BM_ELEM_TAG) || BM_elem_flag_test(v1, BM_ELEM_HIDDEN))
                        continue;
 
-               v2 = EDBM_GetMirrorVert(em, v1);
+               v2 = EDBM_verts_mirror_get(em, v1);
                if (v2 && !BM_elem_flag_test(v2, BM_ELEM_HIDDEN)) {
                        BM_elem_select_set(em->bm, v2, TRUE);
                }
        }
 
-       EDBM_EndMirrorCache(em);
+       EDBM_verts_mirror_cache_end(em);
 }
 
 void EDBM_automerge(Scene *scene, Object *obedit, int update)
@@ -175,7 +175,7 @@ static void draw_triangulated(int mcords[][2], short tot)
 
 /* reads rect, and builds selection array for quick lookup */
 /* returns if all is OK */
-int EDBM_init_backbuf_border(ViewContext *vc, short xmin, short ymin, short xmax, short ymax)
+int EDBM_backbuf_border_init(ViewContext *vc, short xmin, short ymin, short xmax, short ymax)
 {
        struct ImBuf *buf;
        unsigned int *dr;
@@ -204,7 +204,7 @@ int EDBM_init_backbuf_border(ViewContext *vc, short xmin, short ymin, short xmax
        return 1;
 }
 
-int EDBM_check_backbuf(unsigned int index)
+int EDBM_backbuf_check(unsigned int index)
 {
        if (selbuf == NULL) return 1;
        if (index > 0 && index <= bm_vertoffs)
@@ -212,7 +212,7 @@ int EDBM_check_backbuf(unsigned int index)
        return 0;
 }
 
-void EDBM_free_backbuf(void)
+void EDBM_backbuf_free(void)
 {
        if (selbuf) MEM_freeN(selbuf);
        selbuf = NULL;
@@ -224,7 +224,7 @@ void EDBM_free_backbuf(void)
  * - grab again and compare
  * returns 'OK' 
  */
-int EDBM_mask_init_backbuf_border(ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax)
+int EDBM_backbuf_border_mask_init(ViewContext *vc, int mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax)
 {
        unsigned int *dr, *drm;
        struct ImBuf *buf, *bufmask;
@@ -285,7 +285,7 @@ int EDBM_mask_init_backbuf_border(ViewContext *vc, int mcords[][2], short tot, s
 }
 
 /* circle shaped sample area */
-int EDBM_init_backbuf_circle(ViewContext *vc, short xs, short ys, short rads)
+int EDBM_backbuf_circle_init(ViewContext *vc, short xs, short ys, short rads)
 {
        struct ImBuf *buf;
        unsigned int *dr;
@@ -376,7 +376,7 @@ static unsigned int findnearestvert__backbufIndextest(void *handle, unsigned int
  *      if 0, unselected vertice are given the bias
  * strict: if 1, the vertice corresponding to the sel parameter are ignored and not just biased 
  */
-BMVert *EDBM_findnearestvert(ViewContext *vc, int *dist, short sel, short strict)
+BMVert *EDBM_vert_find_nearest(ViewContext *vc, int *dist, short sel, short strict)
 {
        if (vc->v3d->drawtype > OB_WIRE && (vc->v3d->flag & V3D_ZBUF_SELECT)) {
                int distance;
@@ -494,7 +494,7 @@ static void findnearestedge__doClosest(void *userData, BMEdge *eed, int x0, int
                }
        }
 }
-BMEdge *EDBM_findnearestedge(ViewContext *vc, int *dist)
+BMEdge *EDBM_edge_find_nearest(ViewContext *vc, int *dist)
 {
 
        if (vc->v3d->drawtype > OB_WIRE && (vc->v3d->flag & V3D_ZBUF_SELECT)) {
@@ -567,7 +567,7 @@ static void findnearestface__doClosest(void *userData, BMFace *efa, int x, int y
        }
 }
 
-BMFace *EDBM_findnearestface(ViewContext *vc, int *dist)
+BMFace *EDBM_face_find_nearest(ViewContext *vc, int *dist)
 {
 
        if (vc->v3d->drawtype > OB_WIRE && (vc->v3d->flag & V3D_ZBUF_SELECT)) {
@@ -650,13 +650,13 @@ static int unified_findnearest(ViewContext *vc, BMVert **r_eve, BMEdge **r_eed,
        view3d_validate_backbuf(vc);
        
        if (em->selectmode & SCE_SELECT_VERTEX)
-               *r_eve = EDBM_findnearestvert(vc, &dist, BM_ELEM_SELECT, 0);
+               *r_eve = EDBM_vert_find_nearest(vc, &dist, BM_ELEM_SELECT, 0);
        if (em->selectmode & SCE_SELECT_FACE)
-               *r_efa = EDBM_findnearestface(vc, &dist);
+               *r_efa = EDBM_face_find_nearest(vc, &dist);
 
        dist -= 20; /* since edges select lines, we give dots advantage of 20 pix */
        if (em->selectmode & SCE_SELECT_EDGE)
-               *r_eed = EDBM_findnearestedge(vc, &dist);
+               *r_eed = EDBM_edge_find_nearest(vc, &dist);
 
        /* return only one of 3 pointers, for frontbuffer redraws */
        if (*r_eed) {
@@ -707,7 +707,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
        float thresh = RNA_float_get(op->ptr, "threshold");
 
        /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */
-       EDBM_InitOpf(em, &bmop, op, "similarfaces faces=%hf type=%i thresh=%f", BM_ELEM_SELECT, type, thresh);
+       EDBM_op_init(em, &bmop, op, "similarfaces faces=%hf type=%i thresh=%f", BM_ELEM_SELECT, type, thresh);
 
        /* execute the operator */
        BMO_op_exec(em->bm, &bmop);
@@ -719,7 +719,7 @@ static int similar_face_select_exec(bContext *C, wmOperator *op)
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_ALL, BM_ELEM_SELECT, TRUE);
 
        /* finish the operator */
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -745,7 +745,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
        float thresh = RNA_float_get(op->ptr, "threshold");
 
        /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */
-       EDBM_InitOpf(em, &bmop, op, "similaredges edges=%he type=%i thresh=%f", BM_ELEM_SELECT, type, thresh);
+       EDBM_op_init(em, &bmop, op, "similaredges edges=%he type=%i thresh=%f", BM_ELEM_SELECT, type, thresh);
 
        /* execute the operator */
        BMO_op_exec(em->bm, &bmop);
@@ -758,7 +758,7 @@ static int similar_edge_select_exec(bContext *C, wmOperator *op)
        EDBM_selectmode_flush(em);
 
        /* finish the operator */
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -786,7 +786,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
        float thresh = RNA_float_get(op->ptr, "threshold");
 
        /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */
-       EDBM_InitOpf(em, &bmop, op, "similarverts verts=%hv type=%i thresh=%f", BM_ELEM_SELECT, type, thresh);
+       EDBM_op_init(em, &bmop, op, "similarverts verts=%hv type=%i thresh=%f", BM_ELEM_SELECT, type, thresh);
 
        /* execute the operator */
        BMO_op_exec(em->bm, &bmop);
@@ -798,7 +798,7 @@ static int similar_vert_select_exec(bContext *C, wmOperator *op)
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ALL, BM_ELEM_SELECT, TRUE);
 
        /* finish the operator */
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -1008,7 +1008,7 @@ static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short ring)
        /* no afterqueue (yet), so we check it now, otherwise the bm_xxxofs indices are bad */
        view3d_validate_backbuf(&vc);
 
-       eed = EDBM_findnearestedge(&vc, &dist);
+       eed = EDBM_edge_find_nearest(&vc, &dist);
        if (eed) {
                if (extend == 0) {
                        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
@@ -1047,10 +1047,10 @@ static void mouse_mesh_loop(bContext *C, int mval[2], short extend, short ring)
                                /* TODO: would be nice if the edge vertex chosen here
                                 * was the one closer to the selection pointer, instead
                                 * of arbitrarily selecting the first one */
-                               EDBM_store_selection(em, eed->v1);
+                               EDBM_editselection_store(em, &eed->v1->head);
                        }
                        else if (em->selectmode & SCE_SELECT_EDGE) {
-                               EDBM_store_selection(em, eed);
+                               EDBM_editselection_store(em, &eed->head);
                        }
                        /* TODO: would be nice if the nearest face that
                         * belongs to the selected edge could be set to
@@ -1136,13 +1136,13 @@ static float edgetag_cut_cost(BMEditMesh *UNUSED(em), BMEdge *e1, BMEdge *e2, BM
 static void edgetag_add_adjacent(BMEditMesh *em, SmallHash *visithash, Heap *heap, int mednum, int vertnum, 
                                  int *nedges, int *edges, int *prevedge, float *cost)
 {
-       BMEdge *e1 = EDBM_get_edge_for_index(em, mednum);
-       BMVert *v = EDBM_get_vert_for_index(em, vertnum);
+       BMEdge *e1 = EDBM_edge_at_index(em, mednum);
+       BMVert *v = EDBM_vert_at_index(em, vertnum);
        int startadj, endadj = nedges[vertnum + 1];
 
        for (startadj = nedges[vertnum]; startadj < endadj; startadj++) {
                int adjnum = edges[startadj];
-               BMEdge *e2 = EDBM_get_edge_for_index(em, adjnum);
+               BMEdge *e2 = EDBM_edge_at_index(em, adjnum);
                float newcost;
                float cutcost;
 
@@ -1280,7 +1280,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B
        for (i = 0; i < totvert; i++) {
                int start = nedges[i], end = nedges[i + 1], cur;
                for (cur = start; cur < end; cur++) {
-                       BMEdge *e = EDBM_get_edge_for_index(em, edges[cur]);
+                       BMEdge *e = EDBM_edge_at_index(em, edges[cur]);
                }
        }
 #endif
@@ -1289,12 +1289,12 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B
        heap = BLI_heap_new();
        BLI_heap_insert(heap, 0.0f, SET_INT_IN_POINTER(BM_elem_index_get(source)));
        cost[BM_elem_index_get(source)] = 0.0f;
-       EDBM_init_index_arrays(em, 1, 1, 0);
+       EDBM_index_arrays_init(em, 1, 1, 0);
        targetnum = BM_elem_index_get(target);
 
        while (!BLI_heap_empty(heap)) {
                mednum = GET_INT_FROM_POINTER(BLI_heap_popmin(heap));
-               e = EDBM_get_edge_for_index(em, mednum);
+               e = EDBM_edge_at_index(em, mednum);
 
                if (mednum == targetnum)
                        break;
@@ -1315,7 +1315,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B
                 * if it is, the tags will be cleared instead of set. */
                mednum = targetnum;
                do {
-                       e = EDBM_get_edge_for_index(em, mednum);
+                       e = EDBM_edge_at_index(em, mednum);
                        if (!edgetag_context_check(scene, em, e)) {
                                allseams = 0;
                                break;
@@ -1326,7 +1326,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B
                /* Follow path back and source and add or remove tags */
                mednum = targetnum;
                do {
-                       e = EDBM_get_edge_for_index(em, mednum);
+                       e = EDBM_edge_at_index(em, mednum);
                        if (allseams)
                                edgetag_context_set(em, scene, e, 0);
                        else
@@ -1335,7 +1335,7 @@ static int edgetag_shortest_path(Scene *scene, BMEditMesh *em, BMEdge *source, B
                } while (mednum != -1);
        }
 
-       EDBM_free_index_arrays(em);
+       EDBM_index_arrays_free(em);
        MEM_freeN(nedges);
        MEM_freeN(edges);
        MEM_freeN(prevedge);
@@ -1361,7 +1361,7 @@ static void mouse_mesh_shortest_path(bContext *C, int mval[2])
        vc.mval[1] = mval[1];
        em = vc.em;
        
-       e = EDBM_findnearestedge(&vc, &dist);
+       e = EDBM_edge_find_nearest(&vc, &dist);
        if (e) {
                Mesh *me = vc.obedit->data;
                int path = 0;
@@ -1374,7 +1374,7 @@ static void mouse_mesh_shortest_path(bContext *C, int mval[2])
                                e_act = (BMEdge *)ese->ele;
                                if (e_act != e) {
                                        if (edgetag_shortest_path(vc.scene, em, e_act, e)) {
-                                               EDBM_remove_selection(em, e_act);
+                                               EDBM_editselection_remove(em, &e_act->head);
                                                path = 1;
                                        }
                                }
@@ -1389,9 +1389,9 @@ static void mouse_mesh_shortest_path(bContext *C, int mval[2])
 
                /* even if this is selected it may not be in the selection list */
                if (edgetag_context_check(vc.scene, em, e) == 0)
-                       EDBM_remove_selection(em, e);
+                       EDBM_editselection_remove(em, &e->head);
                else
-                       EDBM_store_selection(em, e);
+                       EDBM_editselection_store(em, &e->head);
        
                /* force drawmode for mesh */
                switch (CTX_data_tool_settings(C)->edge_mode) {
@@ -1467,31 +1467,31 @@ int mouse_mesh(bContext *C, const int mval[2], short extend)
                        BM_active_face_set(vc.em->bm, efa);
                        
                        if (!BM_elem_flag_test(efa, BM_ELEM_SELECT)) {
-                               EDBM_store_selection(vc.em, efa);
+                               EDBM_editselection_store(vc.em, &efa->head);
                                BM_elem_select_set(vc.em->bm, efa, TRUE);
                        }
                        else if (extend) {
-                               EDBM_remove_selection(vc.em, efa);
+                               EDBM_editselection_remove(vc.em, &efa->head);
                                BM_elem_select_set(vc.em->bm, efa, FALSE);
                        }
                }
                else if (eed) {
                        if (!BM_elem_flag_test(eed, BM_ELEM_SELECT)) {
-                               EDBM_store_selection(vc.em, eed);
+                               EDBM_editselection_store(vc.em, &eed->head);
                                BM_elem_select_set(vc.em->bm, eed, TRUE);
                        }
                        else if (extend) {
-                               EDBM_remove_selection(vc.em, eed);
+                               EDBM_editselection_remove(vc.em, &eed->head);
                                BM_elem_select_set(vc.em->bm, eed, FALSE);
                        }
                }
                else if (eve) {
                        if (!BM_elem_flag_test(eve, BM_ELEM_SELECT)) {
-                               EDBM_store_selection(vc.em, eve);
+                               EDBM_editselection_store(vc.em, &eve->head);
                                BM_elem_select_set(vc.em->bm, eve, TRUE);
                        }
                        else if (extend) {
-                               EDBM_remove_selection(vc.em, eve);
+                               EDBM_editselection_remove(vc.em, &eve->head);
                                BM_elem_select_set(vc.em->bm, eve, FALSE);
                        }
                }
@@ -1513,7 +1513,7 @@ int mouse_mesh(bContext *C, const int mval[2], short extend)
        return 0;
 }
 
-static void EDBM_strip_selections(BMEditMesh *em)
+static void edbm_strip_selections(BMEditMesh *em)
 {
        BMEditSelection *ese, *nextese;
 
@@ -1554,7 +1554,7 @@ void EDBM_selectmode_set(BMEditMesh *em)
        
        em->bm->selectmode = em->selectmode;
 
-       EDBM_strip_selections(em); /* strip BMEditSelections from em->selected that are not relevant to new mode */
+       edbm_strip_selections(em); /* strip BMEditSelections from em->selected that are not relevant to new mode */
        
        if (em->selectmode & SCE_SELECT_VERTEX) {
                EDBM_select_flush(em);
@@ -1588,7 +1588,7 @@ void EDBM_selectmode_set(BMEditMesh *em)
        }
 }
 
-void EDBM_convertsel(BMEditMesh *em, short oldmode, short selectmode)
+void EDBM_selectmode_convert(BMEditMesh *em, short oldmode, short selectmode)
 {
        BMEdge *eed;
        BMFace *efa;
@@ -2127,7 +2127,7 @@ static void deselect_nth_active(BMEditMesh *em, BMVert **r_eve, BMEdge **r_eed,
        }
 }
 
-static int EM_deselect_nth(BMEditMesh *em, int nth, int offset)
+static int edbm_deselect_nth(BMEditMesh *em, int nth, int offset)
 {
        BMVert *v;
        BMEdge *e;
@@ -2160,7 +2160,7 @@ static int edbm_select_nth_exec(bContext *C, wmOperator *op)
 
        offset = MIN2(nth, offset);
 
-       if (EM_deselect_nth(em, nth, offset) == 0) {
+       if (edbm_deselect_nth(em, nth, offset) == 0) {
                BKE_report(op->reports, RPT_ERROR, "Mesh has no active vert/edge/face");
                return OPERATOR_CANCELLED;
        }
index 3e809f1241b4a26477aafe0f6db508bc55b77da2..ba1f2924ad95f3a1bf2ee745e5df4691151efa8e 100644 (file)
@@ -183,7 +183,7 @@ static short edbm_extrude_face_indiv(BMEditMesh *em, wmOperator *op, const char
        BMLoop *l;
        BMOperator bmop;
 
-       EDBM_InitOpf(em, &bmop, op, "extrude_face_indiv faces=%hf", hflag);
+       EDBM_op_init(em, &bmop, op, "extrude_face_indiv faces=%hf", hflag);
 
        /* deselect original verts */
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
@@ -199,7 +199,7 @@ static short edbm_extrude_face_indiv(BMEditMesh *em, wmOperator *op, const char
                }
        }
 
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return 0;
        }
 
@@ -211,7 +211,7 @@ static short edbm_extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char
 {
        BMOperator bmop;
 
-       EDBM_InitOpf(em, &bmop, op, "extrude_edge_only edges=%he", hflag);
+       EDBM_op_init(em, &bmop, op, "extrude_edge_only edges=%he", hflag);
 
        /* deselect original verts */
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
@@ -219,7 +219,7 @@ static short edbm_extrude_edges_indiv(BMEditMesh *em, wmOperator *op, const char
        BMO_op_exec(em->bm, &bmop);
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_VERT | BM_EDGE, BM_ELEM_SELECT, TRUE);
 
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return 0;
        }
 
@@ -231,7 +231,7 @@ static short edbm_extrude_verts_indiv(BMEditMesh *em, wmOperator *op, const char
 {
        BMOperator bmop;
 
-       EDBM_InitOpf(em, &bmop, op, "extrude_vert_indiv verts=%hv", hflag);
+       EDBM_op_init(em, &bmop, op, "extrude_vert_indiv verts=%hv", hflag);
 
        /* deselect original verts */
        BMO_slot_buffer_hflag_disable(em->bm, &bmop, "verts", BM_VERT, BM_ELEM_SELECT, TRUE);
@@ -239,7 +239,7 @@ static short edbm_extrude_verts_indiv(BMEditMesh *em, wmOperator *op, const char
        BMO_op_exec(em->bm, &bmop);
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_VERT, BM_ELEM_SELECT, TRUE);
 
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return 0;
        }
 
@@ -404,7 +404,7 @@ static int edbm_extrude_repeat_exec(bContext *C, wmOperator *op)
                //translateflag(em, SELECT, dvec);
        }
        
-       EDBM_RecalcNormals(em);
+       EDBM_mesh_normals_update(em);
 
        EDBM_update_generic(C, em, TRUE);
 
@@ -525,7 +525,7 @@ static int edbm_extrude_region_exec(bContext *C, wmOperator *op)
        /* This normally happens when pushing undo but modal operators
         * like this one don't push undo data until after modal mode is
         * done.*/
-       EDBM_RecalcNormals(em);
+       EDBM_mesh_normals_update(em);
 
        EDBM_update_generic(C, em, TRUE);
        
@@ -832,7 +832,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
                }
                
                if (rot_src) {
-                       EDBM_CallOpf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3",
+                       EDBM_op_callf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3",
                                     BM_ELEM_SELECT, cent, mat);
 
                        /* also project the source, for retopo workflow */
@@ -841,9 +841,9 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
                }
 
                edbm_extrude_edge(vc.obedit, vc.em, BM_ELEM_SELECT, nor);
-               EDBM_CallOpf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3",
+               EDBM_op_callf(vc.em, op, "rotate verts=%hv cent=%v mat=%m3",
                             BM_ELEM_SELECT, cent, mat);
-               EDBM_CallOpf(vc.em, op, "translate verts=%hv vec=%v",
+               EDBM_op_callf(vc.em, op, "translate verts=%hv vec=%v",
                             BM_ELEM_SELECT, min);
        }
        else {
@@ -857,14 +857,14 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
                invert_m4_m4(vc.obedit->imat, vc.obedit->obmat);
                mul_m4_v3(vc.obedit->imat, min); // back in object space
                
-               EDBM_InitOpf(vc.em, &bmop, op, "makevert co=%v", min);
+               EDBM_op_init(vc.em, &bmop, op, "makevert co=%v", min);
                BMO_op_exec(vc.em->bm, &bmop);
 
                BMO_ITER(v1, &oiter, vc.em->bm, &bmop, "newvertout", BM_VERT) {
                        BM_elem_select_set(vc.em->bm, v1, TRUE);
                }
 
-               if (!EDBM_FinishOp(vc.em, &bmop, op, TRUE)) {
+               if (!EDBM_op_finish(vc.em, &bmop, op, TRUE)) {
                        return OPERATOR_CANCELLED;
                }
        }
@@ -875,7 +875,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, wmEvent
        /* This normally happens when pushing undo but modal operators
         * like this one don't push undo data until after modal mode is
         * done. */
-       EDBM_RecalcNormals(vc.em);
+       EDBM_mesh_normals_update(vc.em);
 
        EDBM_update_generic(C, vc.em, TRUE);
 
@@ -918,24 +918,24 @@ static int edbm_delete_exec(bContext *C, wmOperator *op)
        BMEditMesh *bem = BMEdit_FromObject(obedit);
 
        if (type == 0) {
-               if (!EDBM_CallOpf(bem, op, "del geom=%hv context=%i", BM_ELEM_SELECT, DEL_VERTS)) /* Erase Vertices */
+               if (!EDBM_op_callf(bem, op, "del geom=%hv context=%i", BM_ELEM_SELECT, DEL_VERTS)) /* Erase Vertices */
                        return OPERATOR_CANCELLED;
        }
        else if (type == 1) {
-               if (!EDBM_CallOpf(bem, op, "del geom=%he context=%i", BM_ELEM_SELECT, DEL_EDGES)) /* Erase Edges */
+               if (!EDBM_op_callf(bem, op, "del geom=%he context=%i", BM_ELEM_SELECT, DEL_EDGES)) /* Erase Edges */
                        return OPERATOR_CANCELLED;
        }
        else if (type == 2) {
-               if (!EDBM_CallOpf(bem, op, "del geom=%hf context=%i", BM_ELEM_SELECT, DEL_FACES)) /* Erase Faces */
+               if (!EDBM_op_callf(bem, op, "del geom=%hf context=%i", BM_ELEM_SELECT, DEL_FACES)) /* Erase Faces */
                        return OPERATOR_CANCELLED;
        }
        else if (type == 3) {
-               if (!EDBM_CallOpf(bem, op, "del geom=%hef context=%i", BM_ELEM_SELECT, DEL_EDGESFACES)) /* Edges and Faces */
+               if (!EDBM_op_callf(bem, op, "del geom=%hef context=%i", BM_ELEM_SELECT, DEL_EDGESFACES)) /* Edges and Faces */
                        return OPERATOR_CANCELLED;
        }
        else if (type == 4) {
                //"Erase Only Faces";
-               if (!EDBM_CallOpf(bem, op, "del geom=%hf context=%i",
+               if (!EDBM_op_callf(bem, op, "del geom=%hf context=%i",
                                  BM_ELEM_SELECT, DEL_ONLYFACES))
                        return OPERATOR_CANCELLED;
        }
@@ -972,7 +972,7 @@ static int edbm_collapse_edge_exec(bContext *C, wmOperator *op)
        Object *obedit = CTX_data_edit_object(C);
        BMEditMesh *em = BMEdit_FromObject(obedit);
 
-       if (!EDBM_CallOpf(em, op, "collapse edges=%he", BM_ELEM_SELECT))
+       if (!EDBM_op_callf(em, op, "collapse edges=%he", BM_ELEM_SELECT))
                return OPERATOR_CANCELLED;
 
        EDBM_update_generic(C, em, TRUE);
@@ -1000,7 +1000,7 @@ static int edbm_collapse_edge_loop_exec(bContext *C, wmOperator *op)
        Object *obedit = CTX_data_edit_object(C);
        BMEditMesh *em = BMEdit_FromObject(obedit);
 
-       if (!EDBM_CallOpf(em, op, "dissolve_edge_loop edges=%he", BM_ELEM_SELECT))
+       if (!EDBM_op_callf(em, op, "dissolve_edge_loop edges=%he", BM_ELEM_SELECT))
                return OPERATOR_CANCELLED;
 
        EDBM_update_generic(C, em, TRUE);
@@ -1029,13 +1029,13 @@ static int edbm_add_edge_face_exec(bContext *C, wmOperator *op)
        Object *obedit = CTX_data_edit_object(C);
        BMEditMesh *em = BMEdit_FromObject(obedit);
        
-       if (!EDBM_InitOpf(em, &bmop, op, "contextual_create geom=%hfev", BM_ELEM_SELECT))
+       if (!EDBM_op_init(em, &bmop, op, "contextual_create geom=%hfev", BM_ELEM_SELECT))
                return OPERATOR_CANCELLED;
        
        BMO_op_exec(em->bm, &bmop);
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE);
 
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -1177,12 +1177,12 @@ static int edbm_vert_connect(bContext *C, wmOperator *op)
        BMOperator bmop;
        int len = 0;
        
-       if (!EDBM_InitOpf(em, &bmop, op, "connectverts verts=%hv", BM_ELEM_SELECT)) {
+       if (!EDBM_op_init(em, &bmop, op, "connectverts verts=%hv", BM_ELEM_SELECT)) {
                return OPERATOR_CANCELLED;
        }
        BMO_op_exec(bm, &bmop);
        len = BMO_slot_get(&bmop, "edgeout")->len;
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
        
@@ -1213,12 +1213,12 @@ static int edbm_edge_split_exec(bContext *C, wmOperator *op)
        BMOperator bmop;
        int len = 0;
        
-       if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he", BM_ELEM_SELECT)) {
+       if (!EDBM_op_init(em, &bmop, op, "edgesplit edges=%he", BM_ELEM_SELECT)) {
                return OPERATOR_CANCELLED;
        }
        BMO_op_exec(bm, &bmop);
        len = BMO_slot_get(&bmop, "edgeout")->len;
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
        
@@ -1249,14 +1249,14 @@ static int edbm_duplicate_exec(bContext *C, wmOperator *op)
        BMEditMesh *em = BMEdit_FromObject(ob);
        BMOperator bmop;
 
-       EDBM_InitOpf(em, &bmop, op, "dupe geom=%hvef", BM_ELEM_SELECT);
+       EDBM_op_init(em, &bmop, op, "dupe geom=%hvef", BM_ELEM_SELECT);
        
        BMO_op_exec(em->bm, &bmop);
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
 
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "newout", BM_ALL, BM_ELEM_SELECT, TRUE);
 
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -1296,7 +1296,7 @@ static int edbm_flip_normals_exec(bContext *C, wmOperator *op)
        Object *obedit = CTX_data_edit_object(C);
        BMEditMesh *em = BMEdit_FromObject(obedit);
        
-       if (!EDBM_CallOpf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT))
+       if (!EDBM_op_callf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT))
                return OPERATOR_CANCELLED;
        
        EDBM_update_generic(C, em, TRUE);
@@ -1363,7 +1363,7 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
        }
        
-       EDBM_InitOpf(em, &bmop, op, "edgerotate edges=%he ccw=%b", BM_ELEM_TAG, do_ccw);
+       EDBM_op_init(em, &bmop, op, "edgerotate edges=%he ccw=%b", BM_ELEM_TAG, do_ccw);
 
        /* avoids leaving old verts selected which can be a problem running multiple times,
         * since this means the edges become selected around the face which then attempt to rotate */
@@ -1375,7 +1375,7 @@ static int edbm_edge_rotate_selected_exec(bContext *C, wmOperator *op)
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "edgeout", BM_EDGE, BM_ELEM_SELECT, TRUE);
        EDBM_selectmode_flush(em);
 
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -1408,7 +1408,7 @@ static int edbm_hide_exec(bContext *C, wmOperator *op)
        Object *obedit = CTX_data_edit_object(C);
        BMEditMesh *em = BMEdit_FromObject(obedit);
        
-       EDBM_hide_mesh(em, RNA_boolean_get(op->ptr, "unselected"));
+       EDBM_mesh_hide(em, RNA_boolean_get(op->ptr, "unselected"));
 
        EDBM_update_generic(C, em, TRUE);
 
@@ -1438,7 +1438,7 @@ static int edbm_reveal_exec(bContext *C, wmOperator *UNUSED(op))
        Object *obedit = CTX_data_edit_object(C);
        BMEditMesh *em = BMEdit_FromObject(obedit);
        
-       EDBM_reveal_mesh(em);
+       EDBM_mesh_reveal(em);
 
        EDBM_update_generic(C, em, TRUE);
 
@@ -1467,11 +1467,11 @@ static int edbm_normals_make_consistent_exec(bContext *C, wmOperator *op)
        
        /* doflip has to do with bmesh_rationalize_normals, it's an internal
         * thing */
-       if (!EDBM_CallOpf(em, op, "righthandfaces faces=%hf do_flip=%b", BM_ELEM_SELECT, TRUE))
+       if (!EDBM_op_callf(em, op, "righthandfaces faces=%hf do_flip=%b", BM_ELEM_SELECT, TRUE))
                return OPERATOR_CANCELLED;
 
        if (RNA_boolean_get(op->ptr, "inside"))
-               EDBM_CallOpf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT);
+               EDBM_op_callf(em, op, "reversefaces faces=%hf", BM_ELEM_SELECT);
 
        EDBM_update_generic(C, em, TRUE);
 
@@ -1508,7 +1508,7 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op)
 
        /* mirror before smooth */
        if (((Mesh *)obedit->data)->editflag & ME_EDIT_MIRROR_X) {
-               EDBM_CacheMirrorVerts(em, TRUE);
+               EDBM_verts_mirror_cache_begin(em, TRUE);
        }
 
        /* if there is a mirror modifier with clipping, flag the verts that
@@ -1536,7 +1536,7 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op)
                repeat = 1;
        
        for (i = 0; i < repeat; i++) {
-               if (!EDBM_CallOpf(em, op,
+               if (!EDBM_op_callf(em, op,
                                  "vertexsmooth verts=%hv mirror_clip_x=%b mirror_clip_y=%b mirror_clip_z=%b clipdist=%f",
                                  BM_ELEM_SELECT, mirrx, mirry, mirrz, clipdist))
                {
@@ -1546,8 +1546,8 @@ static int edbm_do_smooth_vertex_exec(bContext *C, wmOperator *op)
 
        /* apply mirror */
        if (((Mesh *)obedit->data)->editflag & ME_EDIT_MIRROR_X) {
-               EDBM_ApplyMirrorCache(em, BM_ELEM_SELECT, 0);
-               EDBM_EndMirrorCache(em);
+               EDBM_verts_mirror_apply(em, BM_ELEM_SELECT, 0);
+               EDBM_verts_mirror_cache_end(em);
        }
 
        EDBM_update_generic(C, em, TRUE);
@@ -1655,13 +1655,13 @@ static int edbm_rotate_uvs_exec(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, "face_rotateuvs faces=%hf dir=%i", BM_ELEM_SELECT, dir);
+       EDBM_op_init(em, &bmop, op, "face_rotateuvs faces=%hf dir=%i", BM_ELEM_SELECT, dir);
 
        /* execute the operator */
        BMO_op_exec(em->bm, &bmop);
 
        /* finish the operator */
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -1678,13 +1678,13 @@ static int edbm_reverse_uvs_exec(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, "face_reverseuvs faces=%hf", BM_ELEM_SELECT);
+       EDBM_op_init(em, &bmop, op, "face_reverseuvs faces=%hf", BM_ELEM_SELECT);
 
        /* execute the operator */
        BMO_op_exec(em->bm, &bmop);
 
        /* finish the operator */
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -1704,13 +1704,13 @@ static int edbm_rotate_colors_exec(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, "face_rotatecolors faces=%hf dir=%i", BM_ELEM_SELECT, dir);
+       EDBM_op_init(em, &bmop, op, "face_rotatecolors faces=%hf dir=%i", BM_ELEM_SELECT, dir);
 
        /* execute the operator */
        BMO_op_exec(em->bm, &bmop);
 
        /* finish the operator */
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -1729,13 +1729,13 @@ static int edbm_reverse_colors_exec(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, "face_reversecolors faces=%hf", BM_ELEM_SELECT);
+       EDBM_op_init(em, &bmop, op, "face_reversecolors faces=%hf", BM_ELEM_SELECT);
 
        /* execute the operator */
        BMO_op_exec(em->bm, &bmop);
 
        /* finish the operator */
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -1834,11 +1834,11 @@ static int merge_firstlast(BMEditMesh *em, int first, int uvmerge, wmOperator *w
                return OPERATOR_CANCELLED;
        
        if (uvmerge) {
-               if (!EDBM_CallOpf(em, wmop, "pointmerge_facedata verts=%hv snapv=%e", BM_ELEM_SELECT, mergevert))
+               if (!EDBM_op_callf(em, wmop, "pointmerge_facedata verts=%hv snapv=%e", BM_ELEM_SELECT, mergevert))
                        return OPERATOR_CANCELLED;
        }
 
-       if (!EDBM_CallOpf(em, wmop, "pointmerge verts=%hv mergeco=%v", BM_ELEM_SELECT, mergevert->co))
+       if (!EDBM_op_callf(em, wmop, "pointmerge verts=%hv mergeco=%v", BM_ELEM_SELECT, mergevert->co))
                return OPERATOR_CANCELLED;
 
        return OPERATOR_FINISHED;
@@ -1879,11 +1879,11 @@ static int merge_target(BMEditMesh *em, Scene *scene, View3D *v3d, Object *ob,
                return OPERATOR_CANCELLED;
        
        if (uvmerge) {
-               if (!EDBM_CallOpf(em, wmop, "vert_average_facedata verts=%hv", BM_ELEM_SELECT))
+               if (!EDBM_op_callf(em, wmop, "vert_average_facedata verts=%hv", BM_ELEM_SELECT))
                        return OPERATOR_CANCELLED;
        }
 
-       if (!EDBM_CallOpf(em, wmop, "pointmerge verts=%hv mergeco=%v", BM_ELEM_SELECT, co))
+       if (!EDBM_op_callf(em, wmop, "pointmerge verts=%hv mergeco=%v", BM_ELEM_SELECT, co))
                return OPERATOR_CANCELLED;
 
        return OPERATOR_FINISHED;
@@ -1912,7 +1912,7 @@ static int edbm_merge_exec(bContext *C, wmOperator *op)
                        break;
                case 5:
                        status = 1;
-                       if (!EDBM_CallOpf(em, op, "collapse edges=%he", BM_ELEM_SELECT))
+                       if (!EDBM_op_callf(em, op, "collapse edges=%he", BM_ELEM_SELECT))
                                status = 0;
                        break;
        }
@@ -2003,17 +2003,17 @@ static int edbm_remove_doubles_exec(bContext *C, wmOperator *op)
        BMOperator bmop;
        int count;
 
-       EDBM_InitOpf(em, &bmop, op, "finddoubles verts=%hv dist=%f", BM_ELEM_SELECT, RNA_float_get(op->ptr, "mergedist"));
+       EDBM_op_init(em, &bmop, op, "finddoubles verts=%hv dist=%f", BM_ELEM_SELECT, RNA_float_get(op->ptr, "mergedist"));
        BMO_op_exec(em->bm, &bmop);
 
        count = BMO_slot_map_count(em->bm, &bmop, "targetmapout");
 
-       if (!EDBM_CallOpf(em, op, "weldverts targetmap=%s", &bmop, "targetmapout")) {
+       if (!EDBM_op_callf(em, op, "weldverts targetmap=%s", &bmop, "targetmapout")) {
                BMO_op_finish(em->bm, &bmop);
                return OPERATOR_CANCELLED;
        }
 
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
        
@@ -2079,7 +2079,7 @@ static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op)
                return OPERATOR_CANCELLED;
 
        /* initialize the bmop using EDBM api, which does various ui error reporting and other stuff */
-       EDBM_InitOpf(em, &bmop, op, "vertexshortestpath startv=%e endv=%e type=%i", sv->ele, ev->ele, type);
+       EDBM_op_init(em, &bmop, op, "vertexshortestpath startv=%e endv=%e type=%i", sv->ele, ev->ele, type);
 
        /* execute the operator */
        BMO_op_exec(em->bm, &bmop);
@@ -2091,7 +2091,7 @@ static int edbm_select_vertex_path_exec(bContext *C, wmOperator *op)
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "vertout", BM_ALL, BM_ELEM_SELECT, TRUE);
 
        /* finish the operator */
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -2182,7 +2182,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
                singlesel = TRUE;
 
                /* find selected vert - same some time and check history first */
-               if (EDBM_get_actSelection(em, &ese) && ese.htype == BM_VERT) {
+               if (EDBM_editselection_active_get(em, &ese) && ese.htype == BM_VERT) {
                        v = (BMVert *)ese.ele;
                }
                else {
@@ -2262,7 +2262,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
                }
        }
 
-       if (!EDBM_InitOpf(em, &bmop, op, "edgesplit edges=%he verts=%hv use_verts=%b",
+       if (!EDBM_op_init(em, &bmop, op, "edgesplit edges=%he verts=%hv use_verts=%b",
                          BM_ELEM_TAG, BM_ELEM_SELECT, TRUE)) {
                return OPERATOR_CANCELLED;
        }
@@ -2361,7 +2361,7 @@ static int edbm_rip_invoke(bContext *C, wmOperator *op, wmEvent *event)
 
        BLI_assert(singlesel ? (bm->totvertsel > 0) : (bm->totedgesel > 0));
 
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -2649,7 +2649,7 @@ static int edbm_solidify_exec(bContext *C, wmOperator *op)
 
        float thickness = RNA_float_get(op->ptr, "thickness");
 
-       if (!EDBM_InitOpf(em, &bmop, op, "solidify geom=%hf thickness=%f", BM_ELEM_SELECT, thickness)) {
+       if (!EDBM_op_init(em, &bmop, op, "solidify geom=%hf thickness=%f", BM_ELEM_SELECT, thickness)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -2664,7 +2664,7 @@ static int edbm_solidify_exec(bContext *C, wmOperator *op)
        /* select the newly generated faces */
        BMO_slot_buffer_hflag_enable(bm, &bmop, "geomout", BM_FACE, BM_ELEM_SELECT, TRUE);
 
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -2946,7 +2946,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op)
                BLI_ghash_insert(gh, bv, scr);
        }
 
-       if (!EDBM_InitOpf(em, &bmop, op, "esubd")) {
+       if (!EDBM_op_init(em, &bmop, op, "esubd")) {
                return OPERATOR_CANCELLED;
        }
 
@@ -2986,7 +2986,7 @@ static int edbm_knife_cut_exec(bContext *C, wmOperator *op)
        BMO_slot_float_set(&bmop, "radius", 0);
        
        BMO_op_exec(bm, &bmop);
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
        
@@ -3052,8 +3052,8 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO
 
        ED_base_object_select(basenew, BA_DESELECT);
        
-       EDBM_CallOpf(em, wmop, "dupe geom=%hvef dest=%p", BM_ELEM_SELECT, bm_new);
-       EDBM_CallOpf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_FACES);
+       EDBM_op_callf(em, wmop, "dupe geom=%hvef dest=%p", BM_ELEM_SELECT, bm_new);
+       EDBM_op_callf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_FACES);
 
        /* clean up any loose edges */
        BM_ITER(e, &iter, em->bm, BM_EDGES_OF_MESH, NULL) {
@@ -3064,7 +3064,7 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO
                        BM_elem_select_set(em->bm, e, FALSE);
                }
        }
-       EDBM_CallOpf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_EDGES);
+       EDBM_op_callf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_EDGES);
 
        /* clean up any loose verts */
        BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
@@ -3076,7 +3076,7 @@ static int mesh_separate_selected(Main *bmain, Scene *scene, Base *editbase, wmO
                }
        }
 
-       EDBM_CallOpf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_VERTS);
+       EDBM_op_callf(em, wmop, "del geom=%hvef context=%i", BM_ELEM_SELECT, DEL_VERTS);
 
        BM_mesh_normals_update(bm_new, TRUE);
        BMO_op_callf(bm_new, "bmesh_to_mesh mesh=%p object=%p notessellation=%b",
@@ -3226,7 +3226,7 @@ static int edbm_fill_exec(bContext *C, wmOperator *op)
        BMEditMesh *em = BMEdit_FromObject(obedit);
        BMOperator bmop;
        
-       if (!EDBM_InitOpf(em, &bmop, op, "triangle_fill edges=%he", BM_ELEM_SELECT)) {
+       if (!EDBM_op_init(em, &bmop, op, "triangle_fill edges=%he", BM_ELEM_SELECT)) {
                return OPERATOR_CANCELLED;
        }
        
@@ -3235,7 +3235,7 @@ static int edbm_fill_exec(bContext *C, wmOperator *op)
        /* select new geometry */
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_FACE | BM_EDGE, BM_ELEM_SELECT, TRUE);
        
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -3264,7 +3264,7 @@ static int edbm_beautify_fill_exec(bContext *C, wmOperator *op)
        Object *obedit = CTX_data_edit_object(C);
        BMEditMesh *em = BMEdit_FromObject(obedit);
 
-       if (!EDBM_CallOpf(em, op, "beautify_fill faces=%hf", BM_ELEM_SELECT))
+       if (!EDBM_op_callf(em, op, "beautify_fill faces=%hf", BM_ELEM_SELECT))
                return OPERATOR_CANCELLED;
 
        EDBM_update_generic(C, em, TRUE);
@@ -3294,7 +3294,7 @@ static int edbm_quads_convert_to_tris_exec(bContext *C, wmOperator *op)
        BMEditMesh *em = BMEdit_FromObject(obedit);
        int use_beauty = RNA_boolean_get(op->ptr, "use_beauty");
 
-       if (!EDBM_CallOpf(em, op, "triangulate faces=%hf use_beauty=%b", BM_ELEM_SELECT, use_beauty))
+       if (!EDBM_op_callf(em, op, "triangulate faces=%hf use_beauty=%b", BM_ELEM_SELECT, use_beauty))
                return OPERATOR_CANCELLED;
 
        EDBM_update_generic(C, em, TRUE);
@@ -3330,7 +3330,7 @@ static int edbm_tris_convert_to_quads_exec(bContext *C, wmOperator *op)
        dovcols = RNA_boolean_get(op->ptr, "vcols");
        domaterials = RNA_boolean_get(op->ptr, "materials");
 
-       if (!EDBM_CallOpf(em, op,
+       if (!EDBM_op_callf(em, op,
                          "join_triangles faces=%hf limit=%f cmp_sharp=%b cmp_uvs=%b cmp_vcols=%b cmp_materials=%b",
                          BM_ELEM_SELECT, limit, dosharp, douvs, dovcols, domaterials))
        {
@@ -3375,15 +3375,15 @@ static int edbm_dissolve_exec(bContext *C, wmOperator *op)
        int use_verts = RNA_boolean_get(op->ptr, "use_verts");
 
        if (em->selectmode & SCE_SELECT_FACE) {
-               if (!EDBM_CallOpf(em, op, "dissolve_faces faces=%hf use_verts=%b", BM_ELEM_SELECT, use_verts))
+               if (!EDBM_op_callf(em, op, "dissolve_faces faces=%hf use_verts=%b", BM_ELEM_SELECT, use_verts))
                        return OPERATOR_CANCELLED;
        }
        else if (em->selectmode & SCE_SELECT_EDGE) {
-               if (!EDBM_CallOpf(em, op, "dissolve_edges edges=%he use_verts=%b", BM_ELEM_SELECT, use_verts))
+               if (!EDBM_op_callf(em, op, "dissolve_edges edges=%he use_verts=%b", BM_ELEM_SELECT, use_verts))
                        return OPERATOR_CANCELLED;
        }
        else if (em->selectmode & SCE_SELECT_VERTEX) {
-               if (!EDBM_CallOpf(em, op, "dissolve_verts verts=%hv", BM_ELEM_SELECT))
+               if (!EDBM_op_callf(em, op, "dissolve_verts verts=%hv", BM_ELEM_SELECT))
                        return OPERATOR_CANCELLED;
        }
 
@@ -3417,7 +3417,7 @@ static int edbm_dissolve_limited_exec(bContext *C, wmOperator *op)
        BMEditMesh *em = BMEdit_FromObject(obedit);
        float angle_limit = RNA_float_get(op->ptr, "angle_limit");
 
-       if (!EDBM_CallOpf(em, op,
+       if (!EDBM_op_callf(em, op,
                          "dissolve_limit edges=%he verts=%hv angle_limit=%f",
                          BM_ELEM_SELECT, BM_ELEM_SELECT, angle_limit))
        {
@@ -3456,16 +3456,16 @@ static int edbm_split_exec(bContext *C, wmOperator *op)
        BMEditMesh *em = BMEdit_FromObject(ob);
        BMOperator bmop;
 
-       EDBM_InitOpf(em, &bmop, op, "split geom=%hvef use_only_faces=%b", BM_ELEM_SELECT, FALSE);
+       EDBM_op_init(em, &bmop, op, "split geom=%hvef use_only_faces=%b", BM_ELEM_SELECT, FALSE);
        BMO_op_exec(em->bm, &bmop);
        BM_mesh_elem_flag_disable_all(em->bm, BM_VERT | BM_EDGE | BM_FACE, BM_ELEM_SELECT);
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "geomout", BM_ALL, BM_ELEM_SELECT, TRUE);
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
        /* Geometry has changed, need to recalc normals and looptris */
-       EDBM_RecalcNormals(em);
+       EDBM_mesh_normals_update(em);
 
        EDBM_update_generic(C, em, TRUE);
 
@@ -3512,7 +3512,7 @@ static int edbm_spin_exec(bContext *C, wmOperator *op)
        mul_m3_v3(imat, cent);
        mul_m3_v3(imat, axis);
 
-       if (!EDBM_InitOpf(em, &spinop, op,
+       if (!EDBM_op_init(em, &spinop, op,
                          "spin geom=%hvef cent=%v axis=%v dvec=%v steps=%i ang=%f do_dupli=%b",
                          BM_ELEM_SELECT, cent, axis, d, steps, degr, dupli))
        {
@@ -3521,7 +3521,7 @@ static int edbm_spin_exec(bContext *C, wmOperator *op)
        BMO_op_exec(bm, &spinop);
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
        BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ALL, BM_ELEM_SELECT, TRUE);
-       if (!EDBM_FinishOp(em, &spinop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &spinop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -3635,7 +3635,7 @@ static int edbm_screw_exec(bContext *C, wmOperator *op)
        if (dot_v3v3(nor, dvec) > 0.000f)
                negate_v3(dvec);
 
-       if (!EDBM_InitOpf(em, &spinop, op,
+       if (!EDBM_op_init(em, &spinop, op,
                          "spin geom=%hvef cent=%v axis=%v dvec=%v steps=%i ang=%f do_dupli=%b",
                          BM_ELEM_SELECT, cent, axis, dvec, turns * steps, 360.0f * turns, FALSE))
        {
@@ -3644,7 +3644,7 @@ static int edbm_screw_exec(bContext *C, wmOperator *op)
        BMO_op_exec(bm, &spinop);
        EDBM_flag_disable_all(em, BM_ELEM_SELECT);
        BMO_slot_buffer_hflag_enable(bm, &spinop, "lastout", BM_ALL, BM_ELEM_SELECT, TRUE);
-       if (!EDBM_FinishOp(em, &spinop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &spinop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
 
@@ -4265,7 +4265,7 @@ static int edbm_noise_exec(bContext *C, wmOperator *op)
                }
        }
 
-       EDBM_RecalcNormals(em);
+       EDBM_mesh_normals_update(em);
 
        EDBM_update_generic(C, em, TRUE);
 
@@ -4337,7 +4337,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op)
        for (i = 0; i < recursion; i++) {
                float fac = w[recursion - i - 1] * factor;
 
-               if (!EDBM_InitOpf(em, &bmop, op,
+               if (!EDBM_op_init(em, &bmop, op,
                                  "bevel geom=%hev percent=%f lengthlayer=%i use_lengths=%b use_even=%b use_dist=%b",
                                  BM_ELEM_SELECT, fac, li, TRUE, use_even, use_dist))
                {
@@ -4345,7 +4345,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op)
                }
                
                BMO_op_exec(em->bm, &bmop);
-               if (!EDBM_FinishOp(em, &bmop, op, TRUE))
+               if (!EDBM_op_finish(em, &bmop, op, TRUE))
                        return OPERATOR_CANCELLED;
        }
        
@@ -4353,7 +4353,7 @@ static int edbm_bevel_exec(bContext *C, wmOperator *op)
        
        MEM_freeN(w);
 
-       EDBM_RecalcNormals(em);
+       EDBM_mesh_normals_update(em);
 
        EDBM_update_generic(C, em, TRUE);
 
@@ -4387,7 +4387,7 @@ static int edbm_bridge_edge_loops_exec(bContext *C, wmOperator *op)
        Object *obedit = CTX_data_edit_object(C);
        BMEditMesh *em = BMEdit_FromObject(obedit);
        
-       if (!EDBM_CallOpf(em, op, "bridge_loops edges=%he", BM_ELEM_SELECT))
+       if (!EDBM_op_callf(em, op, "bridge_loops edges=%he", BM_ELEM_SELECT))
                return OPERATOR_CANCELLED;
        
        EDBM_update_generic(C, em, TRUE);
@@ -4425,7 +4425,7 @@ static int edbm_inset_exec(bContext *C, wmOperator *op)
        const float thickness         = RNA_float_get(op->ptr, "thickness");
        const int use_outset          = RNA_boolean_get(op->ptr, "use_outset");
 
-       EDBM_InitOpf(em, &bmop, op,
+       EDBM_op_init(em, &bmop, op,
                     "inset faces=%hf use_boundary=%b use_even_offset=%b use_relative_offset=%b thickness=%f use_outset=%b",
                     BM_ELEM_SELECT, use_boundary, use_even_offset, use_relative_offset, thickness, use_outset);
 
@@ -4436,7 +4436,7 @@ static int edbm_inset_exec(bContext *C, wmOperator *op)
 
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, "faceout", BM_FACE, BM_ELEM_SELECT, TRUE);
 
-       if (!EDBM_FinishOp(em, &bmop, op, TRUE)) {
+       if (!EDBM_op_finish(em, &bmop, op, TRUE)) {
                return OPERATOR_CANCELLED;
        }
        else {
index 5d2bb359d3ce302978355de8efc3371d7789154f..22420c50e2f1c08908bfba7467e593692d0d301a 100644 (file)
 
 #include "bmesh.h"
 
-void EDBM_RecalcNormals(BMEditMesh *em)
+#include "mesh_intern.h"
+
+void EDBM_mesh_normals_update(BMEditMesh *em)
 {
        BM_mesh_normals_update(em->bm, TRUE);
 }
 
-void EDBM_ClearMesh(BMEditMesh *em)
+void EDBM_mesh_clear(BMEditMesh *em)
 {
        /* clear bmesh */
        BM_mesh_clear(em->bm);
@@ -111,7 +113,7 @@ void EDBM_stats_update(BMEditMesh *em)
        }
 }
 
-int EDBM_InitOpf(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const char *fmt, ...)
+int EDBM_op_init(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const char *fmt, ...)
 {
        BMesh *bm = em->bm;
        va_list list;
@@ -135,7 +137,7 @@ int EDBM_InitOpf(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const char *f
 
 
 /* returns 0 on error, 1 on success.  executes and finishes a bmesh operator */
-int EDBM_FinishOp(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int report)
+int EDBM_op_finish(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int report)
 {
        const char *errmsg;
        
@@ -170,7 +172,7 @@ int EDBM_FinishOp(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const int re
        return 1;
 }
 
-int EDBM_CallOpf(BMEditMesh *em, wmOperator *op, const char *fmt, ...)
+int EDBM_op_callf(BMEditMesh *em, wmOperator *op, const char *fmt, ...)
 {
        BMesh *bm = em->bm;
        BMOperator bmop;
@@ -191,10 +193,10 @@ int EDBM_CallOpf(BMEditMesh *em, wmOperator *op, const char *fmt, ...)
        BMO_op_exec(bm, &bmop);
 
        va_end(list);
-       return EDBM_FinishOp(em, &bmop, op, TRUE);
+       return EDBM_op_finish(em, &bmop, op, TRUE);
 }
 
-int EDBM_CallAndSelectOpf(BMEditMesh *em, wmOperator *op, const char *selectslot, const char *fmt, ...)
+int EDBM_op_call_and_selectf(BMEditMesh *em, wmOperator *op, const char *selectslot, const char *fmt, ...)
 {
        BMesh *bm = em->bm;
        BMOperator bmop;
@@ -219,10 +221,10 @@ int EDBM_CallAndSelectOpf(BMEditMesh *em, wmOperator *op, const char *selectslot
        BMO_slot_buffer_hflag_enable(em->bm, &bmop, selectslot, BM_ALL, BM_ELEM_SELECT, TRUE);
 
        va_end(list);
-       return EDBM_FinishOp(em, &bmop, op, TRUE);
+       return EDBM_op_finish(em, &bmop, op, TRUE);
 }
 
-int EDBM_CallOpfSilent(BMEditMesh *em, const char *fmt, ...)
+int EDBM_op_call_silentf(BMEditMesh *em, const char *fmt, ...)
 {
        BMesh *bm = em->bm;
        BMOperator bmop;
@@ -242,7 +244,7 @@ int EDBM_CallOpfSilent(BMEditMesh *em, const char *fmt, ...)
        BMO_op_exec(bm, &bmop);
 
        va_end(list);
-       return EDBM_FinishOp(em, &bmop, NULL, FALSE);
+       return EDBM_op_finish(em, &bmop, NULL, FALSE);
 }
 
 void EDBM_selectmode_to_scene(bContext *C)
@@ -260,7 +262,7 @@ void EDBM_selectmode_to_scene(bContext *C)
        WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, scene);
 }
 
-void EDBM_MakeEditBMesh(ToolSettings *ts, Scene *UNUSED(scene), Object *ob)
+void EDBM_mesh_make(ToolSettings *ts, Scene *UNUSED(scene), Object *ob)
 {
        Mesh *me = ob->data;
        BMesh *bm;
@@ -290,7 +292,7 @@ void EDBM_MakeEditBMesh(ToolSettings *ts, Scene *UNUSED(scene), Object *ob)
        me->edit_btmesh->ob = ob;
 }
 
-void EDBM_LoadEditBMesh(Scene *scene, Object *ob)
+void EDBM_mesh_load(Scene *scene, Object *ob)
 {
        Mesh *me = ob->data;
        BMesh *bm = me->edit_btmesh->bm;
@@ -303,14 +305,14 @@ void EDBM_LoadEditBMesh(Scene *scene, Object *ob)
 
 }
 
-void EDBM_FreeEditBMesh(BMEditMesh *tm)
+void EDBM_mesh_free(BMEditMesh *tm)
 {
        BMEdit_Free(tm);
 }
 
-void EDBM_init_index_arrays(BMEditMesh *tm, int forvert, int foredge, int forface)
+void EDBM_index_arrays_init(BMEditMesh *tm, int forvert, int foredge, int forface)
 {
-       EDBM_free_index_arrays(tm);
+       EDBM_index_arrays_free(tm);
 
        if (forvert) {
                BMIter iter;
@@ -352,7 +354,7 @@ void EDBM_init_index_arrays(BMEditMesh *tm, int forvert, int foredge, int forfac
        }
 }
 
-void EDBM_free_index_arrays(BMEditMesh *tm)
+void EDBM_index_arrays_free(BMEditMesh *tm)
 {
        if (tm->vert_index) {
                MEM_freeN(tm->vert_index);
@@ -370,17 +372,17 @@ void EDBM_free_index_arrays(BMEditMesh *tm)
        }
 }
 
-BMVert *EDBM_get_vert_for_index(BMEditMesh *tm, int index)
+BMVert *EDBM_vert_at_index(BMEditMesh *tm, int index)
 {
        return tm->vert_index && index < tm->bm->totvert ? tm->vert_index[index] : NULL;
 }
 
-BMEdge *EDBM_get_edge_for_index(BMEditMesh *tm, int index)
+BMEdge *EDBM_edge_at_index(BMEditMesh *tm, int index)
 {
        return tm->edge_index && index < tm->bm->totedge ? tm->edge_index[index] : NULL;
 }
 
-BMFace *EDBM_get_face_for_index(BMEditMesh *tm, int index)
+BMFace *EDBM_face_at_index(BMEditMesh *tm, int index)
 {
        return (tm->face_index && index < tm->bm->totface && index >= 0) ? tm->face_index[index] : NULL;
 }
@@ -444,7 +446,7 @@ void EDBM_select_less(BMEditMesh *em)
        EDBM_selectmode_flush(em);
 }
 
-int EDBM_get_actSelection(BMEditMesh *em, BMEditSelection *ese)
+int EDBM_editselection_active_get(BMEditMesh *em, BMEditSelection *ese)
 {
        BMEditSelection *ese_last = em->bm->selected.last;
        BMFace *efa = BM_active_face_get(em->bm, FALSE);
@@ -577,7 +579,7 @@ void undo_push_mesh(bContext *C, const char *name)
 }
 
 /* write comment here */
-UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_array, float *limit)
+UvVertMap *EDBM_uv_vert_map_create(BMEditMesh *em, int selected, int do_face_idx_array, float *limit)
 {
        BMVert *ev;
        BMFace *efa;
@@ -592,7 +594,7 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a
        int totverts, i, totuv;
        
        if (do_face_idx_array)
-               EDBM_init_index_arrays(em, 0, 0, 1);
+               EDBM_index_arrays_init(em, 0, 0, 1);
 
        BM_mesh_elem_index_ensure(em->bm, BM_VERT);
        
@@ -607,13 +609,13 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a
 
        if (totuv == 0) {
                if (do_face_idx_array)
-                       EDBM_free_index_arrays(em);
+                       EDBM_index_arrays_free(em);
                return NULL;
        }
        vmap = (UvVertMap *)MEM_callocN(sizeof(*vmap), "UvVertMap");
        if (!vmap) {
                if (do_face_idx_array)
-                       EDBM_free_index_arrays(em);
+                       EDBM_index_arrays_free(em);
                return NULL;
        }
 
@@ -623,7 +625,7 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a
        if (!vmap->vert || !vmap->buf) {
                free_uv_vert_map(vmap);
                if (do_face_idx_array)
-                       EDBM_free_index_arrays(em);
+                       EDBM_index_arrays_free(em);
                return NULL;
        }
        
@@ -660,7 +662,7 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a
                        v->next = newvlist;
                        newvlist = v;
 
-                       efa = EDBM_get_face_for_index(em, v->f);
+                       efa = EDBM_face_at_index(em, v->f);
                        /* tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */
                        
                        l = BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa, v->tfindex);
@@ -672,7 +674,7 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a
 
                        while (iterv) {
                                next = iterv->next;
-                               efa = EDBM_get_face_for_index(em, iterv->f);
+                               efa = EDBM_face_at_index(em, iterv->f);
                                /* tf = CustomData_bmesh_get(&em->bm->pdata, efa->head.data, CD_MTEXPOLY); */ /* UNUSED */
                                
                                l = BM_iter_at_index(em->bm, BM_LOOPS_OF_FACE, efa, iterv->tfindex);
@@ -702,13 +704,13 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a
        }
        
        if (do_face_idx_array)
-               EDBM_free_index_arrays(em);
+               EDBM_index_arrays_free(em);
        
        return vmap;
 }
 
 
-UvMapVert *EDBM_get_uv_map_vert(UvVertMap *vmap, unsigned int v)
+UvMapVert *EDBM_uv_vert_map_at_index(UvVertMap *vmap, unsigned int v)
 {
        return vmap->vert[v];
 }
@@ -717,7 +719,7 @@ UvMapVert *EDBM_get_uv_map_vert(UvVertMap *vmap, unsigned int v)
 
 
 /* A specialized vert map used by stitch operator */
-UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_islands)
+UvElementMap *EDBM_uv_element_map_create(BMEditMesh *em, int selected, int do_islands)
 {
        BMVert *ev;
        BMFace *efa;
@@ -767,7 +769,7 @@ UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_isla
        buf = element_map->buf = (UvElement *)MEM_callocN(sizeof(*element_map->buf) * totuv, "UvElement");
 
        if (!element_map->vert || !element_map->buf) {
-               EDBM_free_uv_element_map(element_map);
+               EDBM_uv_element_map_free(element_map);
                MEM_freeN(island_number);
                return NULL;
        }
@@ -906,7 +908,7 @@ UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_isla
                        MEM_freeN(islandbuf);
                        MEM_freeN(stack);
                        MEM_freeN(map);
-                       EDBM_free_uv_element_map(element_map);
+                       EDBM_uv_element_map_free(element_map);
                        MEM_freeN(island_number);
                }
 
@@ -936,13 +938,7 @@ UvElementMap *EDBM_make_uv_element_map(BMEditMesh *em, int selected, int do_isla
        return element_map;
 }
 
-
-UvMapVert *EM_get_uv_map_vert(UvVertMap *vmap, unsigned int v)
-{
-       return vmap->vert[v];
-}
-
-void EDBM_free_uv_vert_map(UvVertMap *vmap)
+void EDBM_uv_vert_map_free(UvVertMap *vmap)
 {
        if (vmap) {
                if (vmap->vert) MEM_freeN(vmap->vert);
@@ -951,7 +947,7 @@ void EDBM_free_uv_vert_map(UvVertMap *vmap)
        }
 }
 
-void EDBM_free_uv_element_map(UvElementMap *element_map)
+void EDBM_uv_element_map_free(UvElementMap *element_map)
 {
        if (element_map) {
                if (element_map->vert) MEM_freeN(element_map->vert);
@@ -963,11 +959,11 @@ void EDBM_free_uv_element_map(UvElementMap *element_map)
 
 /* last_sel, use em->act_face otherwise get the last selected face in the editselections
  * at the moment, last_sel is mainly useful for making sure the space image dosnt flicker */
-MTexPoly *EDBM_get_active_mtexpoly(BMEditMesh *em, BMFace **r_act_efa, int sloppy)
+MTexPoly *EDBM_mtexpoly_active_get(BMEditMesh *em, BMFace **r_act_efa, int sloppy)
 {
        BMFace *efa = NULL;
        
-       if (!EDBM_texFaceCheck(em))
+       if (!EDBM_mtexpoly_check(em))
                return NULL;
        
        efa = BM_active_face_get(em->bm, sloppy);
@@ -982,14 +978,14 @@ MTexPoly *EDBM_get_active_mtexpoly(BMEditMesh *em, BMFace **r_act_efa, int slopp
 }
 
 /* can we edit UV's for this mesh?*/
-int EDBM_texFaceCheck(BMEditMesh *em)
+int EDBM_mtexpoly_check(BMEditMesh *em)
 {
        /* some of these checks could be a touch overkill */
        return em && em->bm->totface && CustomData_has_layer(&em->bm->pdata, CD_MTEXPOLY) &&
               CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV);
 }
 
-int EDBM_vertColorCheck(BMEditMesh *em)
+int EDBM_vert_color_check(BMEditMesh *em)
 {
        /* some of these checks could be a touch overkill */
        return em && em->bm->totface && CustomData_has_layer(&em->bm->ldata, CD_MLOOPCOL);
@@ -1001,11 +997,31 @@ static BMVert *cache_mirr_intptr_as_bmvert(intptr_t *index_lookup, int index)
        return (eve_i == -1) ? NULL : (BMVert *)eve_i;
 }
 
+/**
+ * [note: I've decided to use ideasman's code for non-editmode stuff, but since
+ *  it has a big "not for editmode!" disclaimer, I'm going to keep what I have here
+ *  - joeedh]
+ *
+ * x-mirror editing api.  usage:
+ *
+ *  EDBM_verts_mirror_cache_begin(em);
+ *  ...
+ *  ...
+ *  BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
+ *     mirrorv = EDBM_verts_mirror_get(em, v);
+ *  }
+ *  ...
+ *  ...
+ *  EDBM_verts_mirror_cache_end(em);
+ *
+ * \note why do we only allow x axis mirror editing?
+ */
+
 /* BM_SEARCH_MAXDIST is too big, copied from 2.6x MOC_THRESH, should become a
  * preference */
 #define BM_SEARCH_MAXDIST_MIRR 0.00002f
 #define BM_CD_LAYER_ID "__mirror_index"
-void EDBM_CacheMirrorVerts(BMEditMesh *em, const short use_select)
+void EDBM_verts_mirror_cache_begin(BMEditMesh *em, const short use_select)
 {
        Mesh *me = em->me;
        BMesh *bm = em->bm;
@@ -1022,7 +1038,7 @@ void EDBM_CacheMirrorVerts(BMEditMesh *em, const short use_select)
        }
 
        if (!em->vert_index) {
-               EDBM_init_index_arrays(em, 1, 0, 0);
+               EDBM_index_arrays_init(em, 1, 0, 0);
                em->mirr_free_arrays = 1;
        }
 
@@ -1084,7 +1100,7 @@ void EDBM_CacheMirrorVerts(BMEditMesh *em, const short use_select)
        em->mirror_cdlayer = li;
 }
 
-BMVert *EDBM_GetMirrorVert(BMEditMesh *em, BMVert *v)
+BMVert *EDBM_verts_mirror_get(BMEditMesh *em, BMVert *v)
 {
        int *mirr = CustomData_bmesh_get_layer_n(&em->bm->vdata, v->head.data, em->mirror_cdlayer);
 
@@ -1093,7 +1109,7 @@ BMVert *EDBM_GetMirrorVert(BMEditMesh *em, BMVert *v)
        if (mirr && *mirr >= 0 && *mirr < em->bm->totvert) {
                if (!em->vert_index) {
                        printf("err: should only be called between "
-                              "EDBM_CacheMirrorVerts and EDBM_EndMirrorCache");
+                              "EDBM_verts_mirror_cache_begin and EDBM_verts_mirror_cache_end");
                        return NULL;
                }
 
@@ -1103,7 +1119,7 @@ BMVert *EDBM_GetMirrorVert(BMEditMesh *em, BMVert *v)
        return NULL;
 }
 
-void EDBM_ClearMirrorVert(BMEditMesh *em, BMVert *v)
+void EDBM_verts_mirror_cache_clear(BMEditMesh *em, BMVert *v)
 {
        int *mirr = CustomData_bmesh_get_layer_n(&em->bm->vdata, v->head.data, em->mirror_cdlayer);
 
@@ -1114,7 +1130,7 @@ void EDBM_ClearMirrorVert(BMEditMesh *em, BMVert *v)
        }
 }
 
-void EDBM_EndMirrorCache(BMEditMesh *em)
+void EDBM_verts_mirror_cache_end(BMEditMesh *em)
 {
        if (em->mirr_free_arrays) {
                MEM_freeN(em->vert_index);
@@ -1124,7 +1140,7 @@ void EDBM_EndMirrorCache(BMEditMesh *em)
        em->mirror_cdlayer = -1;
 }
 
-void EDBM_ApplyMirrorCache(BMEditMesh *em, const int sel_from, const int sel_to)
+void EDBM_verts_mirror_apply(BMEditMesh *em, const int sel_from, const int sel_to)
 {
        BMIter iter;
        BMVert *v;
@@ -1133,7 +1149,7 @@ void EDBM_ApplyMirrorCache(BMEditMesh *em, const int sel_from, const int sel_to)
 
        BM_ITER(v, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
                if (BM_elem_flag_test(v, BM_ELEM_SELECT) == sel_from) {
-                       BMVert *mirr = EDBM_GetMirrorVert(em, v);
+                       BMVert *mirr = EDBM_verts_mirror_get(em, v);
                        if (mirr) {
                                if (BM_elem_flag_test(mirr, BM_ELEM_SELECT) == sel_to) {
                                        copy_v3_v3(mirr->co, v->co);
@@ -1146,7 +1162,7 @@ void EDBM_ApplyMirrorCache(BMEditMesh *em, const int sel_from, const int sel_to)
 
 
 /* swap is 0 or 1, if 1 it hides not selected */
-void EDBM_hide_mesh(BMEditMesh *em, int swap)
+void EDBM_mesh_hide(BMEditMesh *em, int swap)
 {
        BMIter iter;
        BMElem *ele;
@@ -1178,7 +1194,7 @@ void EDBM_hide_mesh(BMEditMesh *em, int swap)
 }
 
 
-void EDBM_reveal_mesh(BMEditMesh *em)
+void EDBM_mesh_reveal(BMEditMesh *em)
 {
        const char iter_types[3] = {BM_VERTS_OF_MESH,
                                    BM_EDGES_OF_MESH,
@@ -1257,17 +1273,17 @@ void EDBM_editselection_plane(BMEditMesh *em, float *plane, BMEditSelection *ese
        BM_editselection_plane(em->bm, plane, ese);
 }
 
-void EDBM_remove_selection(BMEditMesh *em, BMElem *ele)
+void EDBM_editselection_remove(BMEditMesh *em, BMHeader *ele)
 {
-       BM_select_history_remove(em->bm, ele);
+       BM_select_history_remove(em->bm, (BMElem *)ele);
 }
 
-void EDBM_store_selection(BMEditMesh *em, BMElem *ele)
+void EDBM_editselection_store(BMEditMesh *em, BMHeader *ele)
 {
-       BM_select_history_store(em->bm, ele);
+       BM_select_history_store(em->bm, (BMElem *)ele);
 }
 
-void EDBM_validate_selections(BMEditMesh *em)
+void EDBM_editselection_validate(BMEditMesh *em)
 {
        BM_select_history_validate(em->bm);
 }
index fe3fe6986265b8668e4c58b69ff8fe6e83704202..2ea5ac800ceb5da9e95eecba592f52174e98e4a0 100644 (file)
@@ -604,7 +604,7 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
        obedit = base->object;
        me = obedit->data;
        if (me->edit_btmesh == NULL) {
-               EDBM_MakeEditBMesh(scene->toolsettings, scene, obedit);
+               EDBM_mesh_make(scene->toolsettings, scene, obedit);
                exitmode = 1;
        }
        if (me->edit_btmesh == NULL)
@@ -613,8 +613,8 @@ static int drop_named_image_invoke(bContext *C, wmOperator *op, wmEvent *event)
        ED_uvedit_assign_image(bmain, scene, obedit, ima, NULL);
 
        if (exitmode) {
-               EDBM_LoadEditBMesh(scene, obedit);
-               EDBM_FreeEditBMesh(me->edit_btmesh);
+               EDBM_mesh_load(scene, obedit);
+               EDBM_mesh_free(me->edit_btmesh);
                MEM_freeN(me->edit_btmesh);
                me->edit_btmesh = NULL;
 
index 4f94294e6c624e545253a0e29d72373cb031a8db..59d7b24f7b89858ba5cbbf97edb021d49b0d9820 100644 (file)
 #ifndef __MESH_INTERN_H__
 #define __MESH_INTERN_H__
 
-struct bContext;
-struct wmOperatorType;
-struct ViewContext;
-struct BMEditMesh;
-struct BMesh;
 struct BMEdge;
+struct BMEditMesh;
 struct BMFace;
+struct BMHeader;
 struct BMOperator;
-struct wmOperator;
-struct wmKeyMap;
-struct wmKeyConfig;
+struct BMesh;
 struct EnumPropertyItem;
+struct ViewContext;
+struct bContext;
+struct wmKeyConfig;
+struct wmKeyMap;
+struct wmOperator;
+struct wmOperatorType;
 
 /* ******************** bmeshutils.c */
 
@@ -57,26 +58,29 @@ struct EnumPropertyItem;
  */
 
 /*calls a bmesh op, reporting errors to the user, etc*/
-int EDBM_CallOpf(struct BMEditMesh *em, struct wmOperator *op, const char *fmt, ...);
+int EDBM_op_callf(struct BMEditMesh *em, struct wmOperator *op, const char *fmt, ...);
+
+int EDBM_op_call_and_selectf(struct BMEditMesh *em, struct wmOperator *op,
+                              const char *selectslot, const char *fmt, ...);
 
 /* same as above, but doesn't report errors.*/
-int EDBM_CallOpfSilent(struct BMEditMesh *em, const char *fmt, ...);
+int EDBM_op_call_silentf(struct BMEditMesh *em, const char *fmt, ...);
 
-/* these next two functions are the split version of EDBM_CallOpf, so you can
+/* these next two functions are the split version of EDBM_op_callf, so you can
  * do stuff with a bmesh operator, after initializing it but before executing
  * it.
  *
  * execute the operator with BM_Exec_Op */
-int EDBM_InitOpf(struct BMEditMesh *em, struct BMOperator *bmop,
-                 struct wmOperator *op, const char *fmt, ...);
+int EDBM_op_init(struct BMEditMesh *em, struct BMOperator *bmop,
+                  struct wmOperator *op, const char *fmt, ...);
 /*cleans up after a bmesh operator*/
-int EDBM_FinishOp(struct BMEditMesh *em, struct BMOperator *bmop,
-                  struct wmOperator *op, const int report);
+int EDBM_op_finish(struct BMEditMesh *em, struct BMOperator *bmop,
+                    struct wmOperator *op, const int report);
 
 void EDBM_flag_disable_all(struct BMEditMesh *em, const char hflag);
-void EDBM_store_selection(struct BMEditMesh *em, void *data);
-void EDBM_validate_selections(struct BMEditMesh *em);
-void EDBM_remove_selection(struct BMEditMesh *em, void *data);
+void EDBM_editselection_store(struct BMEditMesh *em, struct BMHeader *ele);
+void EDBM_editselection_validate(struct BMEditMesh *em);
+void EDBM_editselection_remove(struct BMEditMesh *em, struct BMHeader *ele);
 void EDBM_stats_update(struct BMEditMesh *em);
 
 /* TODO, move to math_geometry.c */
index c95a81d5a37e82c384bd6d37ec971c71a8b5063f..f1b0a82b654a859c65a8e0ae1b612d87f10c1e9f 100644 (file)
@@ -326,7 +326,7 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
 
        if (!createob) {
                /* clear */
-               EDBM_ClearMesh(em);
+               EDBM_mesh_clear(em);
        }
 
        /* create verts for polygon mesh */
@@ -373,7 +373,7 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
                        BM_vert_create(em->bm, co, NULL);
                }
 
-               EDBM_init_index_arrays(em, 1, 0, 0);
+               EDBM_index_arrays_init(em, 1, 0, 0);
 
                /* create faces */
                for (j = 0; j < trinum; j++) {
@@ -388,9 +388,9 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
                                        face[k] = uniquevbase + tri[k] - nv;  /* unique vertex */
                        }
                        newFace = BM_face_create_quad_tri(em->bm,
-                                                         EDBM_get_vert_for_index(em, face[0]),
-                                                         EDBM_get_vert_for_index(em, face[2]),
-                                                         EDBM_get_vert_for_index(em, face[1]), NULL,
+                                                         EDBM_vert_at_index(em, face[0]),
+                                                         EDBM_vert_at_index(em, face[2]),
+                                                         EDBM_vert_at_index(em, face[1]), NULL,
                                                          NULL, FALSE);
 
                        /* set navigation polygon idx to the custom layer */
@@ -398,7 +398,7 @@ static Object *createRepresentation(bContext *C, struct recast_polyMesh *pmesh,
                        *polygonIdx = i + 1; /* add 1 to avoid zero idx */
                }
                
-               EDBM_free_index_arrays(em);
+               EDBM_index_arrays_free(em);
        }
 
        recast_destroyPolyMesh(pmesh);
index 3dfc66bce252df22ff5eee0bdefcb3e2a9858040..f6fd4b45288b5946564f63f73274de056ea693b7 100644 (file)
@@ -542,9 +542,9 @@ int join_mesh_exec(bContext *C, wmOperator *op)
        ED_object_exit_editmode(C, EM_FREEDATA | EM_WAITCURSOR | EM_DO_UNDO);
 #else
        /* toggle editmode using lower level functions so this can be called from python */
-       EDBM_MakeEditBMesh(scene->toolsettings, scene, ob);
-       EDBM_LoadEditBMesh(scene, ob);
-       EDBM_FreeEditBMesh(me->edit_btmesh);
+       EDBM_mesh_make(scene->toolsettings, scene, ob);
+       EDBM_mesh_load(scene, ob);
+       EDBM_mesh_free(me->edit_btmesh);
        MEM_freeN(me->edit_btmesh);
        me->edit_btmesh = NULL;
        DAG_id_tag_update(&ob->id, OB_RECALC_OB | OB_RECALC_DATA);
index 4d0e67eafee47904c8144b7c43c9a5e403851217..c40ea73d543a50130ca9da689ce8a0e1897e585f 100644 (file)
@@ -327,10 +327,10 @@ void ED_object_exit_editmode(bContext *C, int flag)
                        return;
                }
                
-               EDBM_LoadEditBMesh(scene, obedit);
+               EDBM_mesh_load(scene, obedit);
                
                if (freedata) {
-                       EDBM_FreeEditBMesh(me->edit_btmesh);
+                       EDBM_mesh_free(me->edit_btmesh);
                        MEM_freeN(me->edit_btmesh);
                        me->edit_btmesh= NULL;
                }
@@ -444,7 +444,7 @@ void ED_object_enter_editmode(bContext *C, int flag)
                ok= 1;
                scene->obedit = ob;  /* context sees this */
 
-               EDBM_MakeEditBMesh(CTX_data_tool_settings(C), scene, ob);
+               EDBM_mesh_make(CTX_data_tool_settings(C), scene, ob);
 
                em = BMEdit_FromObject(ob);
                if (LIKELY(em)) {
index 7bb2be8e24890eb1f4c8b18d2e15248631b59eff..bdb53e25a074ab1877086f7090a82501f52f9897 100644 (file)
@@ -308,8 +308,8 @@ static int object_hook_index_array(Scene *scene, Object *obedit, int *tot, int *
 
                        BMEditMesh *em;
 
-                       EDBM_LoadEditBMesh(scene, obedit);
-                       EDBM_MakeEditBMesh(scene->toolsettings, scene, obedit);
+                       EDBM_mesh_load(scene, obedit);
+                       EDBM_mesh_make(scene->toolsettings, scene, obedit);
 
                        em = me->edit_btmesh;
 
index 341ba368729b92018a03b7557ed3c2e68ead97d1..f9b0cfeedb8641a3480bd2f4c748c99d5777669d 100644 (file)
@@ -128,8 +128,8 @@ static int vertex_parent_set_exec(bContext *C, wmOperator *op)
                Mesh *me= obedit->data;
                BMEditMesh *em;
 
-               EDBM_LoadEditBMesh(scene, obedit);
-               EDBM_MakeEditBMesh(scene->toolsettings, scene, obedit);
+               EDBM_mesh_load(scene, obedit);
+               EDBM_mesh_make(scene->toolsettings, scene, obedit);
 
                em= me->edit_btmesh;
 
index 1d502aeb55c09ee9bcb5715d42bce58f262fb399..474d10ffbd8368e716afdabf5ef68431051d8bc5 100644 (file)
@@ -704,7 +704,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
                                sub_v3_v3(eve->co, cent);
                        }
 
-                       EDBM_RecalcNormals(em);
+                       EDBM_mesh_normals_update(em);
                        tot_change++;
                        DAG_id_tag_update(&obedit->id, OB_RECALC_DATA);
            }
index cc8f91e455866d96ddf4199706609d5d0cc8c63a..e0f808aa1a17a2ecf839bb932488a5215f19afd0 100644 (file)
@@ -1527,11 +1527,11 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
                                goto cleanup;
                        }
 
-                       EDBM_CacheMirrorVerts(em, FALSE);
+                       EDBM_verts_mirror_cache_begin(em, FALSE);
 
                        /* Go through the list of editverts and assign them */
                        BM_ITER(eve, &iter, em->bm, BM_VERTS_OF_MESH, NULL) {
-                               if ((eve_mirr= EDBM_GetMirrorVert(em, eve))) {
+                               if ((eve_mirr= EDBM_verts_mirror_get(em, eve))) {
                                        sel= BM_elem_flag_test(eve, BM_ELEM_SELECT);
                                        sel_mirr= BM_elem_flag_test(eve_mirr, BM_ELEM_SELECT);
 
@@ -1544,11 +1544,11 @@ void ED_vgroup_mirror(Object *ob, const short mirror_weights, const short flip_v
                                        }
 
                                        /* don't use these again */
-                                       EDBM_ClearMirrorVert(em, eve);
-                                       EDBM_ClearMirrorVert(em, eve_mirr);
+                                       EDBM_verts_mirror_cache_clear(em, eve);
+                                       EDBM_verts_mirror_cache_clear(em, eve_mirr);
                                }
                        }
-                       EDBM_EndMirrorCache(em);
+                       EDBM_verts_mirror_cache_end(em);
                }
                else {
                        /* object mode / weight paint */
index 40b04437cdf1600c9a23826f232feb07f15e266f..d2cf5c3c294f3c29788dea90731eabbfb409b2d1 100644 (file)
@@ -4668,7 +4668,7 @@ static int uv_sculpt_brush_poll(bContext *C)
                return 0;
 
        em = BMEdit_FromObject(obedit);
-       ret = EDBM_texFaceCheck(em);
+       ret = EDBM_mtexpoly_check(em);
 
        if (ret && sima) {
                ARegion *ar= CTX_wm_region(C);
index 240a8feeb88bb0feddf6022e4261e58815dd3f28..4aa56266a219833f658e89f0efc1b1f7289a94b0 100644 (file)
@@ -416,7 +416,7 @@ static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op)
                WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), data->timer);
        }
        if (data->elementMap) {
-               EDBM_free_uv_element_map(data->elementMap);
+               EDBM_uv_element_map_free(data->elementMap);
        }
        if (data->uv) {
                MEM_freeN(data->uv);
@@ -435,9 +435,9 @@ static void uv_sculpt_stroke_exit(bContext *C, wmOperator *op)
        op->customdata = NULL;
 }
 
-static int get_uv_element_offset_from_face(UvElementMap *map, BMFace *efa, BMLoop *l, int island_index, int doIslands)
+static int uv_element_offset_from_face_get(UvElementMap *map, BMFace *efa, BMLoop *l, int island_index, int doIslands)
 {
-       UvElement *element = ED_get_uv_element(map, efa, l);
+       UvElement *element = ED_uv_element_get(map, efa, l);
        if (!element || (doIslands && element->island != island_index)) {
                return -1;
        }
@@ -501,18 +501,18 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent
                if (do_island_optimization) {
                        /* We will need island information */
                        if (ts->uv_flag & UV_SYNC_SELECTION) {
-                               data->elementMap = EDBM_make_uv_element_map(em, 0, 1);
+                               data->elementMap = EDBM_uv_element_map_create(em, 0, 1);
                        }
                        else {
-                               data->elementMap = EDBM_make_uv_element_map(em, 1, 1);
+                               data->elementMap = EDBM_uv_element_map_create(em, 1, 1);
                        }
                }
                else {
                        if (ts->uv_flag & UV_SYNC_SELECTION) {
-                               data->elementMap = EDBM_make_uv_element_map(em, 0, 0);
+                               data->elementMap = EDBM_uv_element_map_create(em, 0, 0);
                        }
                        else {
-                               data->elementMap = EDBM_make_uv_element_map(em, 1, 0);
+                               data->elementMap = EDBM_uv_element_map_create(em, 1, 0);
                        }
                }
 
@@ -531,7 +531,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent
                        Image *ima= CTX_data_edit_image(C);
                        uv_find_nearest_vert(scene, ima, em, co, NULL, &hit);
 
-                       element = ED_get_uv_element(data->elementMap, hit.efa, hit.l);
+                       element = ED_uv_element_get(data->elementMap, hit.efa, hit.l);
                        island_index = element->island;
                }
 
@@ -597,8 +597,8 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, wmEvent
                counter = 0;
                BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
                        BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
-                               int offset1, itmp1 = get_uv_element_offset_from_face(data->elementMap, efa, l, island_index, do_island_optimization);
-                               int offset2, itmp2 = get_uv_element_offset_from_face(data->elementMap, efa, l->next, island_index, do_island_optimization);
+                               int offset1, itmp1 = uv_element_offset_from_face_get(data->elementMap, efa, l, island_index, do_island_optimization);
+                               int offset2, itmp2 = uv_element_offset_from_face_get(data->elementMap, efa, l->next, island_index, do_island_optimization);
 
                                /* Skip edge if not found(unlikely) or not on valid island */
                                if (itmp1 == -1 || itmp2 == -1)
index f1967477d7ab3b3958721fb312bd91e04dfbcabc..55f767375d2a905d8ff7cdbc27f0e1e1cd786ca9 100644 (file)
@@ -279,7 +279,7 @@ int ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit)
                struct BMEditMesh *em = BMEdit_FromObject(obedit);
                int ret;
                
-               ret = EDBM_texFaceCheck(em);
+               ret = EDBM_mtexpoly_check(em);
                
                return ret;
        }
@@ -297,7 +297,7 @@ int ED_space_image_show_uvshadow(SpaceImage *sima, Object *obedit)
                        struct BMEditMesh *em = BMEdit_FromObject(obedit);
                        int ret;
                        
-                       ret = EDBM_texFaceCheck(em);
+                       ret = EDBM_mtexpoly_check(em);
                        
                        return ret;
                }
@@ -605,10 +605,10 @@ static void image_refresh(const bContext *C, ScrArea *UNUSED(sa))
                        /* old shading system, we set texface */
                        MTexPoly *tf;
                        
-                       if (em && EDBM_texFaceCheck(em)) {
+                       if (em && EDBM_mtexpoly_check(em)) {
                                sima->image= NULL;
                                
-                               tf = EDBM_get_active_mtexpoly(em, NULL, TRUE); /* partially selected face is ok */
+                               tf = EDBM_mtexpoly_active_get(em, NULL, TRUE); /* partially selected face is ok */
                                
                                if (tf) {
                                        /* don't need to check for pin here, see above */
index 211104e60f01c6e2e17f5e83af4436360356a3fa..39f1552c8a6618fcaa20c9e5f2bb376c5b5769e1 100644 (file)
@@ -564,7 +564,7 @@ static DMDrawOption draw_em_tf_mapped__set_draw(void *userData, int index)
 {
        drawEMTFMapped_userData *data = userData;
        BMEditMesh *em = data->em;
-       BMFace *efa = EDBM_get_face_for_index(em, index);
+       BMFace *efa = EDBM_face_at_index(em, index);
 
        if (efa == NULL || BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
                return DM_DRAW_OPTION_SKIP;
@@ -924,7 +924,7 @@ static int tex_mat_set_face_editmesh_cb(void *userData, int index)
        /* editmode face hiding */
        TexMatCallback *data = (TexMatCallback *)userData;
        Mesh *me = (Mesh *)data->me;
-       BMFace *efa = EDBM_get_face_for_index(me->edit_btmesh, index);
+       BMFace *efa = EDBM_face_at_index(me->edit_btmesh, index);
 
        return !BM_elem_flag_test(efa, BM_ELEM_HIDDEN);
 }
index 0332bd0bdb706f57042f34c7d6caad86f61da093..258debc8e60f306c4e4cc3f02f90fe8c7a659f80 100644 (file)
@@ -2021,7 +2021,7 @@ static void drawlattice(Scene *scene, View3D *v3d, Object *ob)
 static void mesh_foreachScreenVert__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
 {
        foreachScreenVert_userData *data = userData;
-       BMVert *eve = EDBM_get_vert_for_index(data->vc.em, index);
+       BMVert *eve = EDBM_vert_at_index(data->vc.em, index);
 
        if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
                short s[2] = {IS_CLIPPED, 0};
@@ -2056,9 +2056,9 @@ void mesh_foreachScreenVert(
        if (clipVerts != V3D_CLIP_TEST_OFF)
                ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat);  /* for local clipping lookups */
 
-       EDBM_init_index_arrays(vc->em, 1, 0, 0);
+       EDBM_index_arrays_init(vc->em, 1, 0, 0);
        dm->foreachMappedVert(dm, mesh_foreachScreenVert__mapFunc, &data);
-       EDBM_free_index_arrays(vc->em);
+       EDBM_index_arrays_free(vc->em);
 
        dm->release(dm);
 }
@@ -2100,7 +2100,7 @@ static int is_co_in_region(ARegion *ar, const short co[2])
 static void mesh_foreachScreenEdge__mapFunc(void *userData, int index, float *v0co, float *v1co)
 {
        foreachScreenEdge_userData *data = userData;
-       BMEdge *eed = EDBM_get_edge_for_index(data->vc.em, index);
+       BMEdge *eed = EDBM_edge_at_index(data->vc.em, index);
 
        if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
                short s[2][2];
@@ -2147,9 +2147,9 @@ void mesh_foreachScreenEdge(
        if (clipVerts != V3D_CLIP_TEST_OFF)
                ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat);  /* for local clipping lookups */
 
-       EDBM_init_index_arrays(vc->em, 0, 1, 0);
+       EDBM_index_arrays_init(vc->em, 0, 1, 0);
        dm->foreachMappedEdge(dm, mesh_foreachScreenEdge__mapFunc, &data);
-       EDBM_free_index_arrays(vc->em);
+       EDBM_index_arrays_free(vc->em);
 
        dm->release(dm);
 }
@@ -2157,7 +2157,7 @@ void mesh_foreachScreenEdge(
 static void mesh_foreachScreenFace__mapFunc(void *userData, int index, float *cent, float *UNUSED(no))
 {
        foreachScreenFace_userData *data = userData;
-       BMFace *efa = EDBM_get_face_for_index(data->vc.em, index);
+       BMFace *efa = EDBM_face_at_index(data->vc.em, index);
 
        if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
                float cent2[3];
@@ -2187,9 +2187,9 @@ void mesh_foreachScreenFace(
        //if (clipVerts)
        ED_view3d_clipping_local(vc->rv3d, vc->obedit->obmat); /* for local clipping lookups */
 
-       EDBM_init_index_arrays(vc->em, 0, 0, 1);
+       EDBM_index_arrays_init(vc->em, 0, 0, 1);
        dm->foreachMappedFaceCenter(dm, mesh_foreachScreenFace__mapFunc, &data);
-       EDBM_free_index_arrays(vc->em);
+       EDBM_index_arrays_free(vc->em);
 
        dm->release(dm);
 }
@@ -2261,7 +2261,7 @@ void nurbs_foreachScreenVert(
 static void draw_dm_face_normals__mapFunc(void *userData, int index, float *cent, float *no)
 {
        drawDMNormal_userData *data = userData;
-       BMFace *efa = EDBM_get_face_for_index(data->em, index);
+       BMFace *efa = EDBM_face_at_index(data->em, index);
 
        if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
                glVertex3fv(cent);
@@ -2284,7 +2284,7 @@ static void draw_dm_face_normals(BMEditMesh *em, Scene *scene, DerivedMesh *dm)
 
 static void draw_dm_face_centers__mapFunc(void *userData, int index, float *cent, float *UNUSED(no))
 {
-       BMFace *efa = EDBM_get_face_for_index(((void **)userData)[0], index);
+       BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index);
        int sel = *(((int **)userData)[1]);
        
        if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN) && BM_elem_flag_test(efa, BM_ELEM_SELECT) == sel) {
@@ -2303,7 +2303,7 @@ static void draw_dm_face_centers(BMEditMesh *em, DerivedMesh *dm, int sel)
 static void draw_dm_vert_normals__mapFunc(void *userData, int index, float *co, float *no_f, short *no_s)
 {
        drawDMNormal_userData *data = userData;
-       BMVert *eve = EDBM_get_vert_for_index(data->em, index);
+       BMVert *eve = EDBM_vert_at_index(data->em, index);
 
        if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
                glVertex3fv(co);
@@ -2336,7 +2336,7 @@ static void draw_dm_vert_normals(BMEditMesh *em, Scene *scene, DerivedMesh *dm)
 static void draw_dm_verts__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
 {
        drawDMVerts_userData *data = userData;
-       BMVert *eve = EDBM_get_vert_for_index(data->em, index);
+       BMVert *eve = EDBM_vert_at_index(data->em, index);
 
        if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN) && BM_elem_flag_test(eve, BM_ELEM_SELECT) == data->sel) {
                /* draw active larger - need to stop/start point drawing for this :/ */
@@ -2381,7 +2381,7 @@ static DMDrawOption draw_dm_edges_sel__setDrawOptions(void *userData, int index)
        drawDMEdgesSel_userData *data = userData;
        unsigned char *col;
 
-       eed = EDBM_get_edge_for_index(data->em, index);
+       eed = EDBM_edge_at_index(data->em, index);
 
        if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
                if (eed == data->eed_act) {
@@ -2422,7 +2422,7 @@ static void draw_dm_edges_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba
 /* Draw edges */
 static DMDrawOption draw_dm_edges__setDrawOptions(void *userData, int index)
 {
-       if (BM_elem_flag_test(EDBM_get_edge_for_index(userData, index), BM_ELEM_HIDDEN))
+       if (BM_elem_flag_test(EDBM_edge_at_index(userData, index), BM_ELEM_HIDDEN))
                return DM_DRAW_OPTION_SKIP;
        else
                return DM_DRAW_OPTION_NORMAL;
@@ -2436,14 +2436,14 @@ static void draw_dm_edges(BMEditMesh *em, DerivedMesh *dm)
 /* Draw edges with color interpolated based on selection */
 static DMDrawOption draw_dm_edges_sel_interp__setDrawOptions(void *userData, int index)
 {
-       if (BM_elem_flag_test(EDBM_get_edge_for_index(((void **)userData)[0], index), BM_ELEM_HIDDEN))
+       if (BM_elem_flag_test(EDBM_edge_at_index(((void **)userData)[0], index), BM_ELEM_HIDDEN))
                return DM_DRAW_OPTION_SKIP;
        else
                return DM_DRAW_OPTION_NORMAL;
 }
 static void draw_dm_edges_sel_interp__setDrawInterpOptions(void *userData, int index, float t)
 {
-       BMEdge *eed = EDBM_get_edge_for_index(((void **)userData)[0], index);
+       BMEdge *eed = EDBM_edge_at_index(((void **)userData)[0], index);
        unsigned char **cols = userData;
        unsigned char *col0 = cols[(BM_elem_flag_test(eed->v1, BM_ELEM_SELECT)) ? 2 : 1];
        unsigned char *col1 = cols[(BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)) ? 2 : 1];
@@ -2464,7 +2464,7 @@ static void draw_dm_edges_sel_interp(BMEditMesh *em, DerivedMesh *dm, unsigned c
 /* Draw only seam edges */
 static DMDrawOption draw_dm_edges_seams__setDrawOptions(void *userData, int index)
 {
-       BMEdge *eed = EDBM_get_edge_for_index(userData, index);
+       BMEdge *eed = EDBM_edge_at_index(userData, index);
 
        if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && BM_elem_flag_test(eed, BM_ELEM_SEAM))
                return DM_DRAW_OPTION_NORMAL;
@@ -2480,7 +2480,7 @@ static void draw_dm_edges_seams(BMEditMesh *em, DerivedMesh *dm)
 /* Draw only sharp edges */
 static DMDrawOption draw_dm_edges_sharp__setDrawOptions(void *userData, int index)
 {
-       BMEdge *eed = EDBM_get_edge_for_index(userData, index);
+       BMEdge *eed = EDBM_edge_at_index(userData, index);
 
        if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN) && !BM_elem_flag_test(eed, BM_ELEM_SMOOTH))
                return DM_DRAW_OPTION_NORMAL;
@@ -2499,7 +2499,7 @@ static void draw_dm_edges_sharp(BMEditMesh *em, DerivedMesh *dm)
 static DMDrawOption draw_dm_faces_sel__setDrawOptions(void *userData, int index)
 {
        drawDMFacesSel_userData *data = userData;
-       BMFace *efa = EDBM_get_face_for_index(data->em, index);
+       BMFace *efa = EDBM_face_at_index(data->em, index);
        unsigned char *col;
        
        if (!efa)
@@ -2533,8 +2533,8 @@ static int draw_dm_faces_sel__compareDrawOptions(void *userData, int index, int
        if (!data->orig_index)
                return 0;
 
-       efa = EDBM_get_face_for_index(data->em, data->orig_index[index]);
-       next_efa = EDBM_get_face_for_index(data->em, data->orig_index[next_index]);
+       efa = EDBM_face_at_index(data->em, data->orig_index[index]);
+       next_efa = EDBM_face_at_index(data->em, data->orig_index[next_index]);
 
        if (efa == next_efa)
                return 1;
@@ -2570,7 +2570,7 @@ static void draw_dm_faces_sel(BMEditMesh *em, DerivedMesh *dm, unsigned char *ba
 static DMDrawOption draw_dm_creases__setDrawOptions(void *userData, int index)
 {
        BMEditMesh *em = userData;
-       BMEdge *eed = EDBM_get_edge_for_index(userData, index);
+       BMEdge *eed = EDBM_edge_at_index(userData, index);
        float *crease = eed ? (float *)CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_CREASE) : NULL;
        
        if (!crease)
@@ -2594,7 +2594,7 @@ static void draw_dm_creases(BMEditMesh *em, DerivedMesh *dm)
 static DMDrawOption draw_dm_bweights__setDrawOptions(void *userData, int index)
 {
        BMEditMesh *em = userData;
-       BMEdge *eed = EDBM_get_edge_for_index(userData, index);
+       BMEdge *eed = EDBM_edge_at_index(userData, index);
        float *bweight = (float *)CustomData_bmesh_get(&em->bm->edata, eed->head.data, CD_BWEIGHT);
 
        if (!bweight)
@@ -2611,7 +2611,7 @@ static DMDrawOption draw_dm_bweights__setDrawOptions(void *userData, int index)
 static void draw_dm_bweights__mapFunc(void *userData, int index, float *co, float *UNUSED(no_f), short *UNUSED(no_s))
 {
        BMEditMesh *em = userData;
-       BMVert *eve = EDBM_get_vert_for_index(userData, index);
+       BMVert *eve = EDBM_vert_at_index(userData, index);
        float *bweight = (float *)CustomData_bmesh_get(&em->bm->vdata, eve->head.data, CD_BWEIGHT);
        
        if (!bweight)
@@ -2983,7 +2983,7 @@ static void draw_em_indices(BMEditMesh *em)
 
 static DMDrawOption draw_em_fancy__setFaceOpts(void *userData, int index)
 {
-       BMFace *efa = EDBM_get_face_for_index(userData, index);
+       BMFace *efa = EDBM_face_at_index(userData, index);
 
        if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
                GPU_enable_material(efa->mat_nr + 1, NULL);
@@ -2995,7 +2995,7 @@ static DMDrawOption draw_em_fancy__setFaceOpts(void *userData, int index)
 
 static DMDrawOption draw_em_fancy__setGLSLFaceOpts(void *userData, int index)
 {
-       BMFace *efa = EDBM_get_face_for_index(userData, index);
+       BMFace *efa = EDBM_face_at_index(userData, index);
 
        if (BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
                return DM_DRAW_OPTION_SKIP;
@@ -3029,7 +3029,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
                }
        }
        
-       EDBM_init_index_arrays(em, 1, 1, 1);
+       EDBM_index_arrays_init(em, 1, 1, 1);
 
        if (dt > OB_WIRE) {
                if (CHECK_OB_DRAWTEXTURE(v3d, dt)) {
@@ -3179,7 +3179,7 @@ static void draw_em_fancy(Scene *scene, View3D *v3d, RegionView3D *rv3d,
                GPU_disable_material();
        }
 
-       EDBM_free_index_arrays(em);
+       EDBM_index_arrays_free(em);
 }
 
 /* Mesh drawing routines */
@@ -7167,7 +7167,7 @@ static void bbs_mesh_verts__mapFunc(void *userData, int index, float *co, float
 {
        void **ptrs = userData;
        int offset = (intptr_t) ptrs[0];
-       BMVert *eve = EDBM_get_vert_for_index(ptrs[1], index);
+       BMVert *eve = EDBM_vert_at_index(ptrs[1], index);
 
        if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
                WM_set_framebuffer_index_color(offset + index);
@@ -7189,7 +7189,7 @@ static DMDrawOption bbs_mesh_wire__setDrawOptions(void *userData, int index)
 {
        void **ptrs = userData;
        int offset = (intptr_t) ptrs[0];
-       BMEdge *eed = EDBM_get_edge_for_index(ptrs[1], index);
+       BMEdge *eed = EDBM_edge_at_index(ptrs[1], index);
 
        if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
                WM_set_framebuffer_index_color(offset + index);
@@ -7207,7 +7207,7 @@ static void bbs_mesh_wire(BMEditMesh *em, DerivedMesh *dm, int offset)
 
 static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int index)
 {
-       BMFace *efa = EDBM_get_face_for_index(((void **)userData)[0], index);
+       BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index);
        
        if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
                if (((void **)userData)[1]) {
@@ -7222,7 +7222,7 @@ static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int inde
 
 static void bbs_mesh_solid__drawCenter(void *userData, int index, float *cent, float *UNUSED(no))
 {
-       BMFace *efa = EDBM_get_face_for_index(((void **)userData)[0], index);
+       BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index);
 
        if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
                WM_set_framebuffer_index_color(index + 1);
@@ -7319,7 +7319,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
 
                                DerivedMesh *dm = editbmesh_get_derived_cage(scene, ob, em, CD_MASK_BAREMESH);
 
-                               EDBM_init_index_arrays(em, 1, 1, 1);
+                               EDBM_index_arrays_init(em, 1, 1, 1);
 
                                bbs_mesh_solid_EM(em, scene, v3d, ob, dm, ts->selectmode & SCE_SELECT_FACE);
                                if (ts->selectmode & SCE_SELECT_FACE)
@@ -7346,7 +7346,7 @@ void draw_object_backbufsel(Scene *scene, View3D *v3d, RegionView3D *rv3d, Objec
 
                                dm->release(dm);
 
-                               EDBM_free_index_arrays(em);
+                               EDBM_index_arrays_free(em);
                        }
                        else {
                                Mesh *me = ob->data;
index f714260ed4185b56849b4951a66f923769e70e08..08d0afb1879498dc91207fc523ba01ad83efedad 100644 (file)
@@ -445,7 +445,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
                                        }
                                }
 
-                               EDBM_RecalcNormals(em);
+                               EDBM_mesh_normals_update(em);
                        }
 
                        if (median[3] != 0.0f) {
@@ -523,7 +523,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
                                        }
                                }
                        }
-                       EDBM_RecalcNormals(em);
+                       EDBM_mesh_normals_update(em);
                }
                else if (ELEM(ob->type, OB_CURVE, OB_SURF)) {
                        Curve *cu = ob->data;
index aa76d9a94c1414f22c8e32f77147895f77245fa4..a3031bc3cfacada6e96816a0f929a9c10cbc5dcf 100644 (file)
@@ -374,7 +374,7 @@ static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event)
                        if (em) {
                                if (shift == 0 || em->selectmode == 0) {
                                        if ( (em->selectmode ^ SCE_SELECT_EDGE) == SCE_SELECT_VERTEX) {
-                                               if (ctrl) EDBM_convertsel(em, SCE_SELECT_VERTEX, SCE_SELECT_EDGE);
+                                               if (ctrl) EDBM_selectmode_convert(em, SCE_SELECT_VERTEX, SCE_SELECT_EDGE);
                                        }
                                        em->selectmode = SCE_SELECT_EDGE;
                                }
@@ -388,7 +388,7 @@ static void do_view3d_header_buttons(bContext *C, void *UNUSED(arg), int event)
                        if (em) {
                                if (shift == 0 || em->selectmode == 0) {
                                        if ( ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_VERTEX) || ((ts->selectmode ^ SCE_SELECT_FACE) == SCE_SELECT_EDGE)) {
-                                               if (ctrl) EDBM_convertsel(em, (ts->selectmode ^ SCE_SELECT_FACE), SCE_SELECT_FACE);
+                                               if (ctrl) EDBM_selectmode_convert(em, (ts->selectmode ^ SCE_SELECT_FACE), SCE_SELECT_FACE);
                                        }
                                        em->selectmode = SCE_SELECT_FACE;
                                }
index 4251592e9864c68d20f7fbf90d37168eaa39afb5..5646570a6231d85b72aa841064af07c2b394cea6 100644 (file)
@@ -166,7 +166,7 @@ void view3d_get_transformation(const ARegion *ar, RegionView3D *rv3d, Object *ob
 
 /* local prototypes */
 
-static void EDBM_backbuf_checkAndSelectVerts(BMEditMesh *em, int select)
+static void edbm_backbuf_check_and_select_verts(BMEditMesh *em, int select)
 {
        BMVert *eve;
        BMIter iter;
@@ -175,14 +175,14 @@ static void EDBM_backbuf_checkAndSelectVerts(BMEditMesh *em, int select)
        eve = BM_iter_new(&iter, em->bm, BM_VERTS_OF_MESH, NULL);
        for (; eve; eve = BM_iter_step(&iter), index++) {
                if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
-                       if (EDBM_check_backbuf(index)) {
+                       if (EDBM_backbuf_check(index)) {
                                BM_vert_select_set(em->bm, eve, select);
                        }
                }
        }
 }
 
-static void EDBM_backbuf_checkAndSelectEdges(BMEditMesh *em, int select)
+static void edbm_backbuf_check_and_select_edges(BMEditMesh *em, int select)
 {
        BMEdge *eed;
        BMIter iter;
@@ -191,14 +191,14 @@ static void EDBM_backbuf_checkAndSelectEdges(BMEditMesh *em, int select)
        eed = BM_iter_new(&iter, em->bm, BM_EDGES_OF_MESH, NULL);
        for (; eed; eed = BM_iter_step(&iter), index++) {
                if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
-                       if (EDBM_check_backbuf(index)) {
+                       if (EDBM_backbuf_check(index)) {
                                BM_edge_select_set(em->bm, eed, select);
                        }
                }
        }
 }
 
-static void EDBM_backbuf_checkAndSelectFaces(BMEditMesh *em, int select)
+static void edbm_backbuf_check_and_select_faces(BMEditMesh *em, int select)
 {
        BMFace *efa;
        BMIter iter;
@@ -207,7 +207,7 @@ static void EDBM_backbuf_checkAndSelectFaces(BMEditMesh *em, int select)
        efa = BM_iter_new(&iter, em->bm, BM_FACES_OF_MESH, NULL);
        for (; efa; efa = BM_iter_step(&iter), index++) {
                if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
-                       if (EDBM_check_backbuf(index)) {
+                       if (EDBM_backbuf_check(index)) {
                                BM_face_select_set(em->bm, efa, select);
                        }
                }
@@ -216,14 +216,14 @@ static void EDBM_backbuf_checkAndSelectFaces(BMEditMesh *em, int select)
 
 
 /* object mode, EM_ prefix is confusing here, rename? */
-static void EDBM_backbuf_checkAndSelectVerts_obmode(Mesh *me, int select)
+static void edbm_backbuf_check_and_select_verts_obmode(Mesh *me, int select)
 {
        MVert *mv = me->mvert;
        int a;
 
        if (mv) {
                for (a = 1; a <= me->totvert; a++, mv++) {
-                       if (EDBM_check_backbuf(a)) {
+                       if (EDBM_backbuf_check(a)) {
                                if (!(mv->flag & ME_HIDE)) {
                                        mv->flag = select ? (mv->flag | SELECT) : (mv->flag & ~SELECT);
                                }
@@ -233,14 +233,14 @@ static void EDBM_backbuf_checkAndSelectVerts_obmode(Mesh *me, int select)
 }
 /* object mode, EM_ prefix is confusing here, rename? */
 
-static void EDBM_backbuf_checkAndSelectTFaces(Mesh *me, int select)
+static void edbm_backbuf_check_and_select_tfaces(Mesh *me, int select)
 {
        MPoly *mpoly = me->mpoly;
        int a;
 
        if (mpoly) {
                for (a = 1; a <= me->totpoly; a++, mpoly++) {
-                       if (EDBM_check_backbuf(a)) {
+                       if (EDBM_backbuf_check(a)) {
                                mpoly->flag = select ? (mpoly->flag | ME_FACE_SEL) : (mpoly->flag & ~ME_FACE_SEL);
                        }
                }
@@ -481,7 +481,7 @@ static void do_lasso_select_mesh__doSelectEdge(void *userData, BMEdge *eed, int
 {
        LassoSelectUserData *data = userData;
 
-       if (EDBM_check_backbuf(bm_solidoffs + index)) {
+       if (EDBM_backbuf_check(bm_solidoffs + index)) {
                if (data->pass == 0) {
                        if (edge_fully_inside_rect(data->rect, x0, y0, x1, y1)  &&
                            lasso_inside(data->mcords, data->moves, x0, y0) &&
@@ -533,11 +533,11 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves,
        ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
 
        glLoadMatrixf(vc->rv3d->viewmat);
-       bbsel = EDBM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+       bbsel = EDBM_backbuf_border_mask_init(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
        
        if (ts->selectmode & SCE_SELECT_VERTEX) {
                if (bbsel) {
-                       EDBM_backbuf_checkAndSelectVerts(vc->em, select);
+                       edbm_backbuf_check_and_select_verts(vc->em, select);
                }
                else {
                        mesh_foreachScreenVert(vc, do_lasso_select_mesh__doSelectVert, &data, V3D_CLIP_TEST_RV3D_CLIPPING);
@@ -556,14 +556,14 @@ static void do_lasso_select_mesh(ViewContext *vc, int mcords[][2], short moves,
        
        if (ts->selectmode & SCE_SELECT_FACE) {
                if (bbsel) {
-                       EDBM_backbuf_checkAndSelectFaces(vc->em, select);
+                       edbm_backbuf_check_and_select_faces(vc->em, select);
                }
                else {
                        mesh_foreachScreenFace(vc, do_lasso_select_mesh__doSelectFace, &data);
                }
        }
        
-       EDBM_free_backbuf();
+       EDBM_backbuf_free();
        EDBM_selectmode_flush(vc->em);
 }
 
@@ -851,11 +851,11 @@ static void do_lasso_select_paintvert(ViewContext *vc, int mcords[][2], short mo
        bm_vertoffs = me->totvert + 1; /* max index array */
 
        lasso_select_boundbox(&rect, mcords, moves);
-       EDBM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+       EDBM_backbuf_border_mask_init(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
 
-       EDBM_backbuf_checkAndSelectVerts_obmode(me, select);
+       edbm_backbuf_check_and_select_verts_obmode(me, select);
 
-       EDBM_free_backbuf();
+       EDBM_backbuf_free();
 
        paintvert_flush_flags(ob);
 }
@@ -874,11 +874,11 @@ static void do_lasso_select_paintface(ViewContext *vc, int mcords[][2], short mo
        bm_vertoffs = me->totpoly + 1; /* max index array */
 
        lasso_select_boundbox(&rect, mcords, moves);
-       EDBM_mask_init_backbuf_border(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
+       EDBM_backbuf_border_mask_init(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
        
-       EDBM_backbuf_checkAndSelectTFaces(me, select);
+       edbm_backbuf_check_and_select_tfaces(me, select);
 
-       EDBM_free_backbuf();
+       EDBM_backbuf_free();
 
        paintface_flush_flags(ob);
 }
@@ -1763,7 +1763,7 @@ static void do_mesh_box_select__doSelectEdge(void *userData, BMEdge *eed, int x0
 {
        BoxSelectUserData *data = userData;
 
-       if (EDBM_check_backbuf(bm_solidoffs + index)) {
+       if (EDBM_backbuf_check(bm_solidoffs + index)) {
                if (data->pass == 0) {
                        if (edge_fully_inside_rect(data->rect, x0, y0, x1, y1)) {
                                BM_elem_select_set(data->vc->em->bm, eed, data->select);
@@ -1804,11 +1804,11 @@ static int do_mesh_box_select(ViewContext *vc, rcti *rect, int select, int exten
        ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
 
        glLoadMatrixf(vc->rv3d->viewmat);
-       bbsel = EDBM_init_backbuf_border(vc, rect->xmin, rect->ymin, rect->xmax, rect->ymax);
+       bbsel = EDBM_backbuf_border_init(vc, rect->xmin, rect->ymin, rect->xmax, rect->ymax);
 
        if (ts->selectmode & SCE_SELECT_VERTEX) {
                if (bbsel) {
-                       EDBM_backbuf_checkAndSelectVerts(vc->em, select);
+                       edbm_backbuf_check_and_select_verts(vc->em, select);
                }
                else {
                        mesh_foreachScreenVert(vc, do_mesh_box_select__doSelectVert, &data, V3D_CLIP_TEST_RV3D_CLIPPING);
@@ -1828,14 +1828,14 @@ static int do_mesh_box_select(ViewContext *vc, rcti *rect, int select, int exten
        
        if (ts->selectmode & SCE_SELECT_FACE) {
                if (bbsel) {
-                       EDBM_backbuf_checkAndSelectFaces(vc->em, select);
+                       edbm_backbuf_check_and_select_faces(vc->em, select);
                }
                else {
                        mesh_foreachScreenFace(vc, do_mesh_box_select__doSelectFace, &data);
                }
        }
        
-       EDBM_free_backbuf();
+       EDBM_backbuf_free();
                
        EDBM_selectmode_flush(vc->em);
        
@@ -2332,7 +2332,7 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f
        int bbsel;
        CircleSelectUserData data;
        
-       bbsel = EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad + 1.0));
+       bbsel = EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0));
        ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d); /* for foreach's screen/vert projection */
 
        vc->em = BMEdit_FromObject(vc->obedit);
@@ -2345,7 +2345,7 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f
 
        if (ts->selectmode & SCE_SELECT_VERTEX) {
                if (bbsel) {
-                       EDBM_backbuf_checkAndSelectVerts(vc->em, select == LEFTMOUSE);
+                       edbm_backbuf_check_and_select_verts(vc->em, select == LEFTMOUSE);
                }
                else {
                        mesh_foreachScreenVert(vc, mesh_circle_doSelectVert, &data, V3D_CLIP_TEST_RV3D_CLIPPING);
@@ -2354,7 +2354,7 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f
 
        if (ts->selectmode & SCE_SELECT_EDGE) {
                if (bbsel) {
-                       EDBM_backbuf_checkAndSelectEdges(vc->em, select == LEFTMOUSE);
+                       edbm_backbuf_check_and_select_edges(vc->em, select == LEFTMOUSE);
                }
                else {
                        mesh_foreachScreenEdge(vc, mesh_circle_doSelectEdge, &data, V3D_CLIP_TEST_OFF);
@@ -2363,14 +2363,14 @@ static void mesh_circle_select(ViewContext *vc, int select, const int mval[2], f
        
        if (ts->selectmode & SCE_SELECT_FACE) {
                if (bbsel) {
-                       EDBM_backbuf_checkAndSelectFaces(vc->em, select == LEFTMOUSE);
+                       edbm_backbuf_check_and_select_faces(vc->em, select == LEFTMOUSE);
                }
                else {
                        mesh_foreachScreenFace(vc, mesh_circle_doSelectFace, &data);
                }
        }
 
-       EDBM_free_backbuf();
+       EDBM_backbuf_free();
        EDBM_selectmode_flush(vc->em);
 }
 
@@ -2383,9 +2383,9 @@ static void paint_facesel_circle_select(ViewContext *vc, int select, const int m
        if (me) {
                bm_vertoffs = me->totpoly + 1; /* max index array */
 
-               /* bbsel= */ /* UNUSED */ EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad + 1.0));
-               EDBM_backbuf_checkAndSelectTFaces(me, select == LEFTMOUSE);
-               EDBM_free_backbuf();
+               /* bbsel= */ /* UNUSED */ EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0));
+               edbm_backbuf_check_and_select_tfaces(me, select == LEFTMOUSE);
+               EDBM_backbuf_free();
        }
 }
 
@@ -2399,9 +2399,9 @@ static void paint_vertsel_circle_select(ViewContext *vc, int select, const int m
        if (me) {
                bm_vertoffs = me->totvert + 1; /* max index array */
 
-               /* bbsel= */ /* UNUSED */ EDBM_init_backbuf_circle(vc, mval[0], mval[1], (short)(rad + 1.0f));
-               EDBM_backbuf_checkAndSelectVerts_obmode(me, select == LEFTMOUSE);
-               EDBM_free_backbuf();
+               /* bbsel= */ /* UNUSED */ EDBM_backbuf_circle_init(vc, mval[0], mval[1], (short)(rad + 1.0f));
+               edbm_backbuf_check_and_select_verts_obmode(me, select == LEFTMOUSE);
+               EDBM_backbuf_free();
 
                paintvert_flush_flags(ob);
        }
index 9d160fb361a8d667762db144efa068063cced46d..ac94accf9917d86887acc1a5cb0a2d3d49c29279 100644 (file)
@@ -198,7 +198,7 @@ static void set_mapped_co(void *vuserdata, int index, float *co, float *UNUSED(n
        void **userdata = vuserdata;
        BMEditMesh *em = userdata[0];
        TransVert *tv = userdata[1];
-       BMVert *eve = EDBM_get_vert_for_index(em, index);
+       BMVert *eve = EDBM_vert_at_index(em, index);
        
        if (BM_elem_index_get(eve) != -1 && !(tv[BM_elem_index_get(eve)].flag & TX_VERT_USE_MAPLOC)) {
                copy_v3_v3(tv[BM_elem_index_get(eve)].maploc, co);
@@ -317,9 +317,9 @@ static void make_trans_verts(Object *obedit, float *min, float *max, int mode)
                }
                
                if (transvmain && em->derivedCage) {
-                       EDBM_init_index_arrays(em, 1, 0, 0);
+                       EDBM_index_arrays_init(em, 1, 0, 0);
                        em->derivedCage->foreachMappedVert(em->derivedCage, set_mapped_co, userdata);
-                       EDBM_free_index_arrays(em);
+                       EDBM_index_arrays_free(em);
                }
        }
        else if (obedit->type == OB_ARMATURE) {
@@ -991,7 +991,7 @@ static int snap_curs_to_active(bContext *C, wmOperator *UNUSED(op))
                        Mesh *me = obedit->data;
                        BMEditSelection ese;
                        
-                       if (EDBM_get_actSelection(me->edit_btmesh, &ese)) {
+                       if (EDBM_editselection_active_get(me->edit_btmesh, &ese)) {
                                EDBM_editselection_center(me->edit_btmesh, curs, &ese);
                        }
                        
index 3f15a05d843186f02d7b6c87c2a3db83959542ca..4754e1731c8783fb88625aef53040164d9dbdf6f 100644 (file)
@@ -2037,7 +2037,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
 
        if (t->flag & T_MIRROR)
        {
-               EDBM_CacheMirrorVerts(em, TRUE);
+               EDBM_verts_mirror_cache_begin(em, TRUE);
                mirror = 1;
        }
 
@@ -2226,7 +2226,7 @@ static void createTransEditVerts(bContext *C, TransInfo *t)
 
                                /* Mirror? */
                                if ( (mirror>0 && tob->iloc[0]>0.0f) || (mirror<0 && tob->iloc[0]<0.0f)) {
-                                       BMVert *vmir= EDBM_GetMirrorVert(em, eve); //t->obedit, em, eve, tob->iloc, a);
+                                       BMVert *vmir= EDBM_verts_mirror_get(em, eve); //t->obedit, em, eve, tob->iloc, a);
                                        if (vmir && vmir != eve) {
                                                tob->extra = vmir;
                                        }
@@ -2260,7 +2260,7 @@ cleanup:
        MEM_freeN(selstate);
 
        if (t->flag & T_MIRROR) {
-               EDBM_EndMirrorCache(em);
+               EDBM_verts_mirror_cache_end(em);
                mirror = 1;
        }
 }
index 19dc968a8d2919f9c6c24baa935e5c97dfb677bb..eb04ad04aa7719017aeefbe145470294ddef219b 100644 (file)
@@ -724,7 +724,7 @@ static void recalcData_view3d(TransInfo *t)
                                
                        DAG_id_tag_update(t->obedit->data, 0);  /* sets recalc flags */
                        
-                       EDBM_RecalcNormals(em);
+                       EDBM_mesh_normals_update(em);
                        BMEdit_RecalcTessellation(em);
                }
                else if (t->obedit->type==OB_ARMATURE) { /* no recalc flag, does pose */
@@ -1523,7 +1523,7 @@ void calculateCenter(TransInfo *t)
                                BMEditSelection ese;
                                BMEditMesh *em = BMEdit_FromObject(t->obedit);
 
-                               if (EDBM_get_actSelection(em, &ese)) {
+                               if (EDBM_editselection_active_get(em, &ese)) {
                                        EDBM_editselection_center(em, t->center, &ese);
                                        calculateCenter2D(t);
                                        break;
index ece556f11aef193e7bbda828ed58ffe98e6412c5..513f7df19577e9529cf3a31891584f15a937d97f 100644 (file)
@@ -300,7 +300,7 @@ int calc_manipulator_stats(const bContext *C)
                        float vec[3]= {0,0,0};
 
                        /* USE LAST SELECTE WITH ACTIVE */
-                       if (v3d->around==V3D_ACTIVE && EDBM_get_actSelection(em, &ese)) {
+                       if (v3d->around==V3D_ACTIVE && EDBM_editselection_active_get(em, &ese)) {
                                EDBM_editselection_center(em, vec, &ese);
                                calc_tw_center(scene, vec);
                                totsel= 1;
index 2a53a8e4ad2bc5a82e76fe0412d9d55cd7b015a2..d2cf74881f2f7d0200f5ee3664761a43e5d3e34a 100644 (file)
@@ -577,7 +577,7 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
                        float vec[3]= {0,0,0};
                        
                        /* USE LAST SELECTED WITH ACTIVE */
-                       if (activeOnly && EDBM_get_actSelection(em, &ese)) {
+                       if (activeOnly && EDBM_editselection_active_get(em, &ese)) {
                                EDBM_editselection_normal(normal, &ese);
                                EDBM_editselection_plane(em, plane, &ese);
                                
index 7ad7b0f5c40b748e031e9ccede48482a668990c8..ea21a6363007807d8b21d7067682f51ce6bc48a7 100644 (file)
@@ -1412,7 +1412,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
                                        if (em != NULL)
                                        {
                                                index_array = dm->getTessFaceDataArray(dm, CD_ORIGINDEX);
-                                               EDBM_init_index_arrays(em, 0, 0, 1);
+                                               EDBM_index_arrays_init(em, 0, 0, 1);
                                        }
                                        
                                        for ( i = 0; i < totface; i++) {
@@ -1434,7 +1434,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
                                                                test = 0;
                                                        }
                                                        else {
-                                                               efa = EDBM_get_face_for_index(em, index);
+                                                               efa = EDBM_face_at_index(em, index);
                                                                
                                                                if (efa && BM_elem_flag_test(efa, BM_ELEM_HIDDEN))
                                                                {
@@ -1478,7 +1478,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
                                        
                                        if (em != NULL)
                                        {
-                                               EDBM_free_index_arrays(em);
+                                               EDBM_index_arrays_free(em);
                                        }
 #endif
                                        break;
@@ -1493,7 +1493,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
                                        if (em != NULL)
                                        {
                                                index_array = dm->getVertDataArray(dm, CD_ORIGINDEX);
-                                               EDBM_init_index_arrays(em, 1, 0, 0);
+                                               EDBM_index_arrays_init(em, 1, 0, 0);
                                        }
                                        
                                        for ( i = 0; i < totvert; i++) {
@@ -1514,7 +1514,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
                                                                test = 0;
                                                        }
                                                        else {
-                                                               eve = EDBM_get_vert_for_index(em, index);
+                                                               eve = EDBM_vert_at_index(em, index);
                                                                
                                                                if (eve && (BM_elem_flag_test(eve, BM_ELEM_HIDDEN) || BM_elem_flag_test(eve, BM_ELEM_SELECT)))
                                                                {
@@ -1532,7 +1532,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
 
                                        if (em != NULL)
                                        {
-                                               EDBM_free_index_arrays(em);
+                                               EDBM_index_arrays_free(em);
                                        }
                                        break;
                                }
@@ -1548,7 +1548,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
                                        if (em != NULL)
                                        {
                                                index_array = dm->getEdgeDataArray(dm, CD_ORIGINDEX);
-                                               EDBM_init_index_arrays(em, 0, 1, 0);
+                                               EDBM_index_arrays_init(em, 0, 1, 0);
                                        }
                                        
                                        for ( i = 0; i < totedge; i++) {
@@ -1570,7 +1570,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
                                                                test = 0;
                                                        }
                                                        else {
-                                                               eed = EDBM_get_edge_for_index(em, index);
+                                                               eed = EDBM_edge_at_index(em, index);
                                                                
                                                                if (eed && (BM_elem_flag_test(eed, BM_ELEM_HIDDEN) ||
                                                                        BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) || 
@@ -1590,7 +1590,7 @@ static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh
 
                                        if (em != NULL)
                                        {
-                                               EDBM_free_index_arrays(em);
+                                               EDBM_index_arrays_free(em);
                                        }
                                        break;
                                }
index fcf950474141816dbb5edf749f9a1dbb6b2bb9ea..78616a2c2280fce920d2eb4244279c34539d6f96 100644 (file)
@@ -109,7 +109,7 @@ void ED_editors_exit(bContext *C)
                                if (ob->type==OB_MESH) {
                                        Mesh *me= ob->data;
                                        if (me->edit_btmesh) {
-                                               EDBM_FreeEditBMesh(me->edit_btmesh);
+                                               EDBM_mesh_free(me->edit_btmesh);
                                                MEM_freeN(me->edit_btmesh);
                                                me->edit_btmesh= NULL;
                                        }
index 383f97da6a0230e0888960e83370248dd389feb6..4690f11d9afd87a68a8c4a2e4fe5f37b9f7ad667 100644 (file)
@@ -455,7 +455,7 @@ static void draw_uvs(SpaceImage *sima, Scene *scene, Object *obedit)
        StitchPreviewer *stitch_preview = uv_get_stitch_previewer();
 
        em= me->edit_btmesh;
-       activetf= EDBM_get_active_mtexpoly(em, &efa_act, FALSE); /* will be set to NULL if hidden */
+       activetf= EDBM_mtexpoly_active_get(em, &efa_act, FALSE); /* will be set to NULL if hidden */
        activef = BM_active_face_get(em->bm, FALSE);
        ts= scene->toolsettings;
 
index 0e2154006c18a0ae8686af19fe9409579e42f90c..fdcb5db19119a1dacec67c383ad7ead099f6b753 100644 (file)
@@ -79,7 +79,7 @@ void uv_find_nearest_edge(struct Scene *scene, struct Image *ima, struct BMEditM
 
 /* utility tool functions */
 
-struct UvElement *ED_get_uv_element(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l);
+struct UvElement *ED_uv_element_get(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l);
 void uvedit_live_unwrap_update(struct SpaceImage *sima, struct Scene *scene, struct Object *obedit);
 
 /* smart stitch */
index 3e6be67f233f24176b40d2417c731a5ebfe0e663..3f4352d8ab31cedaf45c7dbe72f1642f41b2ee4b 100644 (file)
@@ -98,7 +98,7 @@ int ED_uvedit_test(Object *obedit)
                return 0;
 
        em = BMEdit_FromObject(obedit);
-       ret = EDBM_texFaceCheck(em);
+       ret = EDBM_mtexpoly_check(em);
        
        return ret;
 }
@@ -927,7 +927,7 @@ static UvMapVert *uv_vertex_map_get(UvVertMap *vmap, BMFace *efa, int a)
        BMLoop *l;
 
        l = BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, a);
-       first= EDBM_get_uv_map_vert(vmap,  BM_elem_index_get(l->v));
+       first= EDBM_uv_vert_map_at_index(vmap,  BM_elem_index_get(l->v));
 
        for (iterv=first; iterv; iterv=iterv->next) {
                if (iterv->separate)
@@ -939,7 +939,7 @@ static UvMapVert *uv_vertex_map_get(UvVertMap *vmap, BMFace *efa, int a)
        return NULL;
 }
 
-UvElement *ED_get_uv_element(UvElementMap *map, BMFace *efa, BMLoop *l)
+UvElement *ED_uv_element_get(UvElementMap *map, BMFace *efa, BMLoop *l)
 {
        UvElement *element;
 
@@ -969,7 +969,7 @@ static int uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first
 
                        if (iterv1->f == iterv2->f) {
                                /* if face already tagged, don't do this edge */
-                               efa= EDBM_get_face_for_index(em, iterv1->f);
+                               efa= EDBM_face_at_index(em, iterv1->f);
                                if (BMO_elem_flag_test(em->bm, efa, EFA_F1_FLAG))
                                        return 0;
 
@@ -994,7 +994,7 @@ static int uv_edge_tag_faces(BMEditMesh *em, UvMapVert *first1, UvMapVert *first
                                break;
 
                        if (iterv1->f == iterv2->f) {
-                               efa= EDBM_get_face_for_index(em, iterv1->f);
+                               efa= EDBM_face_at_index(em, iterv1->f);
                                BMO_elem_flag_enable(em->bm, efa, EFA_F1_FLAG);
                                break;
                        }
@@ -1015,8 +1015,8 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
        int a, count, looking, nverts, starttotf, select;
 
        /* setup */
-       EDBM_init_index_arrays(em, 0, 0, 1);
-       vmap= EDBM_make_uv_vert_map(em, 0, 0, limit);
+       EDBM_index_arrays_init(em, 0, 0, 1);
+       vmap= EDBM_uv_vert_map_create(em, 0, 0, limit);
 
        BM_mesh_elem_index_ensure(em->bm, BM_VERT);
 
@@ -1114,8 +1114,8 @@ static int select_edgeloop(Scene *scene, Image *ima, BMEditMesh *em, NearestHit
        }
 
        /* cleanup */
-       EDBM_free_uv_vert_map(vmap);
-       EDBM_free_index_arrays(em);
+       EDBM_uv_vert_map_free(vmap);
+       EDBM_index_arrays_free(em);
 
        return (select)? 1: -1;
 }
@@ -1135,8 +1135,8 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
        unsigned int a;
        char *flag;
 
-       EDBM_init_index_arrays(em, 0, 0, 1); /* we can use this too */
-       vmap= EDBM_make_uv_vert_map(em, 1, 1, limit);
+       EDBM_index_arrays_init(em, 0, 0, 1); /* we can use this too */
+       vmap= EDBM_uv_vert_map_create(em, 1, 1, limit);
 
        if (vmap == NULL)
                return;
@@ -1195,7 +1195,7 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
                BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
 
                        /* make_uv_vert_map_EM sets verts tmp.l to the indices */
-                       vlist= EDBM_get_uv_map_vert(vmap, BM_elem_index_get(l->v));
+                       vlist= EDBM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v));
                        
                        startv= vlist;
 
@@ -1293,8 +1293,8 @@ static void select_linked(Scene *scene, Image *ima, BMEditMesh *em, float limit[
        
        MEM_freeN(stack);
        MEM_freeN(flag);
-       EDBM_free_uv_vert_map(vmap);
-       EDBM_free_index_arrays(em);
+       EDBM_uv_vert_map_free(vmap);
+       EDBM_index_arrays_free(em);
 }
 
 /* WATCH IT: this returns first selected UV,
@@ -2340,8 +2340,8 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
                
                uvedit_pixel_to_float(sima, limit, 0.05);
                
-               EDBM_init_index_arrays(em, 0, 0, 1);
-               vmap= EDBM_make_uv_vert_map(em, 0, 0, limit);
+               EDBM_index_arrays_init(em, 0, 0, 1);
+               vmap= EDBM_uv_vert_map_create(em, 0, 0, limit);
                
                /* verts are numbered above in make_uv_vert_map_EM, make sure this stays true! */
                /* BMESH_TODO - why keep this commented? - campbell */
@@ -2364,7 +2364,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
                                        else
                                                uvedit_uv_deselect(em, scene, l);
                                        
-                                       vlist_iter= EDBM_get_uv_map_vert(vmap, BM_elem_index_get(l->v));
+                                       vlist_iter= EDBM_uv_vert_map_at_index(vmap, BM_elem_index_get(l->v));
                                        
                                        while (vlist_iter) {
                                                if (vlist_iter->separate)
@@ -2383,7 +2383,7 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
                                                        break;
                                                
                                                if (efa_index != vlist_iter->f) {
-                                                       efa_vlist = EDBM_get_face_for_index(em, vlist_iter->f);
+                                                       efa_vlist = EDBM_face_at_index(em, vlist_iter->f);
                                                        /* tf_vlist = CustomData_bmesh_get(&em->bm->pdata, efa_vlist->head.data, CD_MTEXPOLY); */ /* UNUSED */
                                                        
                                                        if (select)
@@ -2396,8 +2396,8 @@ static void uv_faces_do_sticky(bContext *C, SpaceImage *sima, Scene *scene, Obje
                                }
                        }
                }
-               EDBM_free_index_arrays(em);
-               EDBM_free_uv_vert_map(vmap);
+               EDBM_index_arrays_free(em);
+               EDBM_uv_vert_map_free(vmap);
                
        }
        else { /* SI_STICKY_DISABLE or ts->uv_flag & UV_SYNC_SELECTION */
@@ -3041,7 +3041,7 @@ static int hide_exec(bContext *C, wmOperator *op)
        int facemode= sima ? sima->flag & SI_SELACTFACE : 0;
 
        if (ts->uv_flag & UV_SYNC_SELECTION) {
-               EDBM_hide_mesh(em, swap);
+               EDBM_mesh_hide(em, swap);
                WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
 
                return OPERATOR_FINISHED;
@@ -3100,7 +3100,7 @@ static int hide_exec(bContext *C, wmOperator *op)
        }
        
        
-       EDBM_validate_selections(em);
+       EDBM_editselection_validate(em);
        WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
 
        return OPERATOR_FINISHED;
@@ -3140,7 +3140,7 @@ static int reveal_exec(bContext *C, wmOperator *UNUSED(op))
 
        /* call the mesh function if we are in mesh sync sel */
        if (ts->uv_flag & UV_SYNC_SELECTION) {
-               EDBM_reveal_mesh(em);
+               EDBM_mesh_reveal(em);
                WM_event_add_notifier(C, NC_GEOM|ND_SELECT, obedit->data);
 
                return OPERATOR_FINISHED;
@@ -3372,13 +3372,13 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op)
        em = me->edit_btmesh;
        bm = em->bm;
 
-       if (!EDBM_texFaceCheck(em)) {
+       if (!EDBM_mtexpoly_check(em)) {
                return OPERATOR_CANCELLED;
        }
 
        /* This code sets editvert->tmp.l to the index. This will be useful later on. */
-       EDBM_init_index_arrays(em, 0, 0, 1);
-       vmap = EDBM_make_uv_vert_map(em, 0, 0, limit);
+       EDBM_index_arrays_init(em, 0, 0, 1);
+       vmap = EDBM_uv_vert_map_create(em, 0, 0, limit);
 
        BM_ITER(editedge, &iter, bm, BM_EDGES_OF_MESH, NULL) {
                /* flags to determine if we uv is separated from first editface match */
@@ -3406,14 +3406,14 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op)
                                v1coincident = 0;
 
                        separated2 = 0;
-                       efa1 = EDBM_get_face_for_index(em, mv1->f);
+                       efa1 = EDBM_face_at_index(em, mv1->f);
                        mvinit2 = vmap->vert[BM_elem_index_get(editedge->v2)];
 
                        for (mv2 = mvinit2; mv2; mv2 = mv2->next) {
                                if (mv2->separate)
                                        mv2sep = mv2;
 
-                               efa2 = EDBM_get_face_for_index(em, mv2->f);
+                               efa2 = EDBM_face_at_index(em, mv2->f);
                                if (efa1 == efa2) {
                                        /* if v1 is not coincident no point in comparing */
                                        if (v1coincident) {
@@ -3456,8 +3456,8 @@ static int seams_from_islands_exec(bContext *C, wmOperator *op)
 
        me->drawflag |= ME_DRAWSEAMS;
 
-       EDBM_free_uv_vert_map(vmap);
-       EDBM_free_index_arrays(em);
+       EDBM_uv_vert_map_free(vmap);
+       EDBM_index_arrays_free(em);
 
        DAG_id_tag_update(&me->id, 0);
        WM_event_add_notifier(C, NC_GEOM|ND_DATA, me);
index af87f4d4b077b05b2ae1fa96edadfa4221d6b624..384581247a03433a3a5b5ea1c082cbfac8789e48 100644 (file)
@@ -453,7 +453,7 @@ static void stitch_state_delete(StitchState *stitch_state)
 {
        if (stitch_state) {
                if (stitch_state->element_map) {
-                       EDBM_free_uv_element_map(stitch_state->element_map);
+                       EDBM_uv_element_map_free(stitch_state->element_map);
                }
                if (stitch_state->uvs) {
                        MEM_freeN(stitch_state->uvs);
@@ -685,7 +685,7 @@ static int stitch_process_data(StitchState *state, Scene *scene, int final)
                /* copy data from MTFaces to the preview display buffers */
                BM_ITER(efa, &iter, state->em->bm, BM_FACES_OF_MESH, NULL) {
                        /* just to test if face was added for processing. uvs of inselected vertices will return NULL */
-                       UvElement *element = ED_get_uv_element(state->element_map, efa, BM_FACE_FIRST_LOOP(efa));
+                       UvElement *element = ED_uv_element_get(state->element_map, efa, BM_FACE_FIRST_LOOP(efa));
 
                        if (element) {
                                int numoftris = efa->len - 2;
@@ -1001,10 +1001,10 @@ static int stitch_init(bContext *C, wmOperator *op)
        state->midpoints = RNA_boolean_get(op->ptr, "midpoint_snap");
        /* in uv synch selection, all uv's are visible */
        if (ts->uv_flag & UV_SYNC_SELECTION) {
-               state->element_map = EDBM_make_uv_element_map(state->em, 0, 1);
+               state->element_map = EDBM_uv_element_map_create(state->em, 0, 1);
        }
        else {
-               state->element_map = EDBM_make_uv_element_map(state->em, 1, 1);
+               state->element_map = EDBM_uv_element_map_create(state->em, 1, 1);
        }
        if (!state->element_map) {
                stitch_state_delete(state);
@@ -1063,9 +1063,9 @@ static int stitch_init(bContext *C, wmOperator *op)
                        continue;
 
                BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
-                       UvElement *element = ED_get_uv_element(state->element_map, efa, l);
+                       UvElement *element = ED_uv_element_get(state->element_map, efa, l);
                        int offset1, itmp1 = element - state->element_map->buf;
-                       int offset2, itmp2 = ED_get_uv_element(state->element_map, efa, l->next) - state->element_map->buf;
+                       int offset2, itmp2 = ED_uv_element_get(state->element_map, efa, l->next) - state->element_map->buf;
 
                        offset1 = map[itmp1];
                        offset2 = map[itmp2];
@@ -1157,18 +1157,18 @@ static int stitch_init(bContext *C, wmOperator *op)
                int faceIndex, elementIndex;
                UvElement *element;
 
-               EDBM_init_index_arrays(em, 0, 0, 1);
+               EDBM_index_arrays_init(em, 0, 0, 1);
 
                RNA_BEGIN(op->ptr, itemptr, "selection") {
                        faceIndex = RNA_int_get(&itemptr, "face_index");
                        elementIndex = RNA_int_get(&itemptr, "element_index");
-                       efa = EDBM_get_face_for_index(em, faceIndex);
-                       element = ED_get_uv_element(state->element_map, efa, BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, elementIndex));
+                       efa = EDBM_face_at_index(em, faceIndex);
+                       element = ED_uv_element_get(state->element_map, efa, BM_iter_at_index(NULL, BM_LOOPS_OF_FACE, efa, elementIndex));
                        stitch_select_uv(element, state, 1);
                }
                RNA_END;
 
-               EDBM_free_index_arrays(em);
+               EDBM_index_arrays_free(em);
                /* Clear the selection */
                RNA_collection_clear(op->ptr, "selection");
 
@@ -1178,7 +1178,7 @@ static int stitch_init(bContext *C, wmOperator *op)
                        i = 0;
                        BM_ITER(l, &liter, em->bm, BM_LOOPS_OF_FACE, efa) {
                                if (uvedit_uv_selected(em, scene, l)) {
-                                       UvElement *element = ED_get_uv_element(state->element_map, efa, l);
+                                       UvElement *element = ED_uv_element_get(state->element_map, efa, l);
                                        stitch_select_uv(element, state, 1);
                                }
                                i++;
@@ -1195,7 +1195,7 @@ static int stitch_init(bContext *C, wmOperator *op)
        }
 
        BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
-               UvElement *element = ED_get_uv_element(state->element_map, efa, BM_FACE_FIRST_LOOP(efa));
+               UvElement *element = ED_uv_element_get(state->element_map, efa, BM_FACE_FIRST_LOOP(efa));
 
                if (element) {
                        state->tris_per_island[element->island] += (efa->len > 2)? efa->len-2 : 0;
@@ -1313,7 +1313,7 @@ static void stitch_select(bContext *C, Scene *scene, wmEvent *event, StitchState
                 * you can do stuff like deselect the opposite stitchable vertex and the initial still gets deselected */
 
                /* This works due to setting of tmp in find nearest uv vert */
-               UvElement *element = ED_get_uv_element(stitch_state->element_map, hit.efa, hit.l);
+               UvElement *element = ED_uv_element_get(stitch_state->element_map, hit.efa, hit.l);
                stitch_select_uv(element, stitch_state, 0);
 
        }
index 3c150769e50b5e95377bc437d8b2fdd6a7c99166..ac04e25216d47c868a2980c84a4fc56ff1f3bd70 100644 (file)
@@ -417,11 +417,11 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e
        faceMap = MEM_mallocN(numOfFaces*sizeof(BMFace *), "unwrap_edit_face_map");
 
        BM_mesh_elem_index_ensure(em->bm, BM_VERT);
-       EDBM_init_index_arrays(em, 0, 1, 1);
+       EDBM_index_arrays_init(em, 0, 1, 1);
 
        /* map subsurfed faces to original editFaces */
        for (i = 0; i < numOfFaces; i++)
-               faceMap[i] = EDBM_get_face_for_index(em, origFaceIndices[i]);
+               faceMap[i] = EDBM_face_at_index(em, origFaceIndices[i]);
 
        edgeMap = MEM_mallocN(numOfEdges*sizeof(BMEdge *), "unwrap_edit_edge_map");
 
@@ -429,10 +429,10 @@ static ParamHandle *construct_param_handle_subsurfed(Scene *scene, BMEditMesh *e
        for (i = 0; i < numOfEdges; i++) {
                /* not all edges correspond to an old edge */
                edgeMap[i] = (origEdgeIndices[i] != -1)?
-                       EDBM_get_edge_for_index(em, origEdgeIndices[i]) : NULL;
+                       EDBM_edge_at_index(em, origEdgeIndices[i]) : NULL;
        }
 
-       EDBM_free_index_arrays(em);
+       EDBM_index_arrays_free(em);
 
        /* Prepare and feed faces to the solver */
        for (i = 0; i < numOfFaces; i++) {
index e3cf9af6c39a13be118c38392b1e5f44c5db14b3..574d9877cfb70bbd119b4cdc9e65fefad8eb61e1 100644 (file)
@@ -228,8 +228,8 @@ void rna_Object_active_shape_update(Main *bmain, Scene *scene, PointerRNA *ptr)
                /* exit/enter editmode to get new shape */
                switch (ob->type) {
                        case OB_MESH:
-                               EDBM_LoadEditBMesh(scene, ob);
-                               EDBM_MakeEditBMesh(scene->toolsettings, scene, ob);
+                               EDBM_mesh_load(scene, ob);
+                               EDBM_mesh_make(scene->toolsettings, scene, ob);
                                BMEdit_RecalcTessellation(((Mesh*)ob->data)->edit_btmesh);
                                break;
                        case OB_CURVE:
index aa7eb08cda51e616fa03097920e703ab5a346d59..682c671f520ab5421a07c1c248d74ca2747c6ab2 100644 (file)
@@ -116,8 +116,8 @@ struct wmWindowManager;
 
 /*new render funcs */
 void EDBM_selectmode_set(struct BMEditMesh *em) {}
-void EDBM_LoadEditBMesh(struct Scene *scene, struct Object *ob) {}
-void EDBM_MakeEditBMesh(struct ToolSettings *ts, struct Scene *scene, struct Object *ob) {}
+void EDBM_mesh_load(struct Scene *scene, struct Object *ob) {}
+void EDBM_mesh_make(struct ToolSettings *ts, struct Scene *scene, struct Object *ob) {}
 void *g_system;
 
 struct Heap* BLI_heap_new (void){return NULL;}
@@ -354,11 +354,6 @@ void ED_space_image_size(struct SpaceImage *sima, int *width, int *height){}
 
 void ED_nurb_set_spline_type(struct Nurb *nu, int type){}
 
-void EM_selectmode_set(struct EditMesh *em){}
-int EM_texFaceCheck(struct EditMesh *em){return 0;}
-void make_editMesh(struct Scene *scene, struct Object *ob){}
-void load_editMesh(struct Scene *scene, struct Object *ob){}
-
 void make_editLatt(struct Object *obedit){}
 void load_editLatt(struct Object *obedit){}