Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-02-12 14:51:45 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-12 14:51:45 +0400
commitb6dcdb065d9ca6244f2de9e621439f75cf2c386e (patch)
treedb7e8287d27bd6e68085dab6cacb997f5eb473a9 /source/blender/editors/mesh/mesh_data.c
parent8b43813b69b36af55635028e18e9b179df217317 (diff)
code refactor, function renaming for bmesh.
These changes are to make the bmesh api more consistent and easier to learn, grouping similar functions which is convenient for autocomplete. This uses similar convention to RNA. * use face/loop/edge/vert as a prefix for functions. * use 'elem' as a prefix too for functions that can take any type with a BMHeader. * changed from camel case to underscore separated (like RNA).
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r--source/blender/editors/mesh/mesh_data.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 9ed177f0f7d..e818f8aad93 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -109,7 +109,7 @@ static void delete_customdata_layer(bContext *C, Object *ob, CustomDataLayer *la
CustomData_set_layer_active(data, type, layer - &data->layers[index]);
if(me->edit_btmesh) {
- BM_free_data_layer(me->edit_btmesh->bm, data, type);
+ BM_data_layer_free(me->edit_btmesh->bm, data, type);
}
else {
CustomData_free_layer_active(data, type, tot);
@@ -215,7 +215,7 @@ int ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me)
BLI_assert(CustomData_has_layer(&em->bm->ldata, CD_MLOOPUV));
BM_ITER(efa, &iter, em->bm, BM_FACES_OF_MESH, NULL) {
- if (!BM_TestHFlag(efa, BM_ELEM_SELECT))
+ if (!BM_elem_flag_test(efa, BM_ELEM_SELECT))
continue;
i = 0;
@@ -312,7 +312,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s
if (layernum >= MAX_MTFACE)
return -1;
- BM_add_data_layer(em->bm, &em->bm->pdata, CD_MTEXPOLY);
+ BM_data_layer_add(em->bm, &em->bm->pdata, CD_MTEXPOLY);
CustomData_set_layer_active(&em->bm->pdata, CD_MTEXPOLY, layernum);
CustomData_set_layer_name(&em->bm->pdata, CD_MTEXPOLY, layernum, name);
@@ -324,7 +324,7 @@ int ED_mesh_uv_texture_add(bContext *C, Mesh *me, const char *name, int active_s
CustomData_set_layer_active(&em->bm->pdata, CD_MTEXPOLY, layernum);
}
- BM_add_data_layer(em->bm, &em->bm->ldata, CD_MLOOPUV);
+ BM_data_layer_add(em->bm, &em->bm->ldata, CD_MLOOPUV);
CustomData_set_layer_name(&em->bm->ldata, CD_MLOOPUV, layernum, name);
CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPUV, layernum);
@@ -402,7 +402,7 @@ int ED_mesh_color_add(bContext *C, Scene *UNUSED(scene), Object *UNUSED(ob), Mes
return -1;
}
- BM_add_data_layer(em->bm, &em->bm->pdata, CD_MLOOPCOL);
+ BM_data_layer_add(em->bm, &em->bm->pdata, CD_MLOOPCOL);
CustomData_set_layer_active(&em->bm->ldata, CD_MLOOPCOL, layernum);
/* copy data from active vertex color layer */