Cleanup: naming
Use BKE_mesh_* prefix for mesh module.
This commit is contained in:
@@ -547,7 +547,7 @@ Mesh *AbcMeshWriter::getFinalMesh(bool &r_needsfree)
|
|||||||
BM_mesh_triangulate(bm, quad_method, ngon_method, tag_only, NULL, NULL, NULL);
|
BM_mesh_triangulate(bm, quad_method, ngon_method, tag_only, NULL, NULL, NULL);
|
||||||
|
|
||||||
struct BMeshToMeshParams bmmp = {0};
|
struct BMeshToMeshParams bmmp = {0};
|
||||||
Mesh *result = BKE_bmesh_to_mesh_nomain(bm, &bmmp);
|
Mesh *result = BKE_mesh_from_bmesh_nomain(bm, &bmmp);
|
||||||
BM_mesh_free(bm);
|
BM_mesh_free(bm);
|
||||||
|
|
||||||
mesh = result;
|
mesh = result;
|
||||||
|
@@ -90,7 +90,7 @@ struct BMesh *BKE_mesh_to_bmesh(
|
|||||||
struct Mesh *me, struct Object *ob,
|
struct Mesh *me, struct Object *ob,
|
||||||
const bool add_key_index, const struct BMeshCreateParams *params);
|
const bool add_key_index, const struct BMeshCreateParams *params);
|
||||||
|
|
||||||
struct Mesh *BKE_bmesh_to_mesh_nomain(struct BMesh *bm, const struct BMeshToMeshParams *params);
|
struct Mesh *BKE_mesh_from_bmesh_nomain(struct BMesh *bm, const struct BMeshToMeshParams *params);
|
||||||
|
|
||||||
struct Mesh *BKE_mesh_from_editmesh_with_coords_thin_wrap(
|
struct Mesh *BKE_mesh_from_editmesh_with_coords_thin_wrap(
|
||||||
struct BMEditMesh *em, CustomDataMask data_mask, float (*vertexCos)[3]);
|
struct BMEditMesh *em, CustomDataMask data_mask, float (*vertexCos)[3]);
|
||||||
|
@@ -1201,7 +1201,7 @@ static Mesh *create_orco_mesh(Object *ob, Mesh *me, BMEditMesh *em, int layer)
|
|||||||
int free;
|
int free;
|
||||||
|
|
||||||
if (em) {
|
if (em) {
|
||||||
mesh = BKE_bmesh_to_mesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
|
mesh = BKE_mesh_from_bmesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mesh = BKE_mesh_copy_for_eval(me, true);
|
mesh = BKE_mesh_copy_for_eval(me, true);
|
||||||
@@ -2015,7 +2015,7 @@ static void editbmesh_calc_modifiers(
|
|||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
me = BKE_bmesh_to_mesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
|
me = BKE_mesh_from_bmesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
|
||||||
ASSERT_IS_VALID_MESH(me);
|
ASSERT_IS_VALID_MESH(me);
|
||||||
|
|
||||||
if (deformedVerts) {
|
if (deformedVerts) {
|
||||||
|
@@ -748,7 +748,7 @@ BMesh *BKE_mesh_to_bmesh(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Mesh *BKE_bmesh_to_mesh_nomain(BMesh *bm, const struct BMeshToMeshParams *params)
|
Mesh *BKE_mesh_from_bmesh_nomain(BMesh *bm, const struct BMeshToMeshParams *params)
|
||||||
{
|
{
|
||||||
BLI_assert(params->calc_object_remap == false);
|
BLI_assert(params->calc_object_remap == false);
|
||||||
Mesh *mesh = BKE_id_new_nomain(ID_ME, NULL);
|
Mesh *mesh = BKE_id_new_nomain(ID_ME, NULL);
|
||||||
@@ -762,7 +762,7 @@ Mesh *BKE_bmesh_to_mesh_nomain(BMesh *bm, const struct BMeshToMeshParams *params
|
|||||||
Mesh *BKE_mesh_from_editmesh_with_coords_thin_wrap(
|
Mesh *BKE_mesh_from_editmesh_with_coords_thin_wrap(
|
||||||
BMEditMesh *em, CustomDataMask data_mask, float (*vertexCos)[3])
|
BMEditMesh *em, CustomDataMask data_mask, float (*vertexCos)[3])
|
||||||
{
|
{
|
||||||
Mesh *me = BKE_bmesh_to_mesh_nomain(
|
Mesh *me = BKE_mesh_from_bmesh_nomain(
|
||||||
em->bm,
|
em->bm,
|
||||||
&(struct BMeshToMeshParams){
|
&(struct BMeshToMeshParams){
|
||||||
.cd_mask_extra = data_mask,
|
.cd_mask_extra = data_mask,
|
||||||
|
@@ -1094,7 +1094,7 @@ Mesh *BKE_modifier_get_evaluated_mesh_from_evaluated_object(Object *ob_eval, boo
|
|||||||
/* Note: currently we have no equivalent to derived cagemesh or even final dm in BMEditMesh...
|
/* Note: currently we have no equivalent to derived cagemesh or even final dm in BMEditMesh...
|
||||||
* This is TODO in core depsgraph/modifier stack code still. */
|
* This is TODO in core depsgraph/modifier stack code still. */
|
||||||
BMEditMesh *em = BKE_editmesh_from_object(ob_eval);
|
BMEditMesh *em = BKE_editmesh_from_object(ob_eval);
|
||||||
me = BKE_bmesh_to_mesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
|
me = BKE_mesh_from_bmesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
|
||||||
*r_free_mesh = true;
|
*r_free_mesh = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -448,7 +448,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
|
|||||||
if (set_wn_strength)
|
if (set_wn_strength)
|
||||||
bevel_set_weighted_normal_face_strength(bm, scene);
|
bevel_set_weighted_normal_face_strength(bm, scene);
|
||||||
|
|
||||||
result = BKE_bmesh_to_mesh_nomain(bm, &(struct BMeshToMeshParams){0});
|
result = BKE_mesh_from_bmesh_nomain(bm, &(struct BMeshToMeshParams){0});
|
||||||
|
|
||||||
BLI_assert(bm->vtoolflagpool == NULL &&
|
BLI_assert(bm->vtoolflagpool == NULL &&
|
||||||
bm->etoolflagpool == NULL &&
|
bm->etoolflagpool == NULL &&
|
||||||
|
@@ -317,7 +317,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes
|
|||||||
MEM_freeN(looptris);
|
MEM_freeN(looptris);
|
||||||
}
|
}
|
||||||
|
|
||||||
result = BKE_bmesh_to_mesh_nomain(bm, &((struct BMeshToMeshParams){0}));
|
result = BKE_mesh_from_bmesh_nomain(bm, &((struct BMeshToMeshParams){0}));
|
||||||
|
|
||||||
BM_mesh_free(bm);
|
BM_mesh_free(bm);
|
||||||
|
|
||||||
|
@@ -186,7 +186,7 @@ static Mesh *applyModifier(
|
|||||||
|
|
||||||
/* update for display only */
|
/* update for display only */
|
||||||
dmd->face_count = bm->totface;
|
dmd->face_count = bm->totface;
|
||||||
result = BKE_bmesh_to_mesh_nomain(bm, &((struct BMeshToMeshParams){0}));
|
result = BKE_mesh_from_bmesh_nomain(bm, &((struct BMeshToMeshParams){0}));
|
||||||
BLI_assert(bm->vtoolflagpool == NULL &&
|
BLI_assert(bm->vtoolflagpool == NULL &&
|
||||||
bm->etoolflagpool == NULL &&
|
bm->etoolflagpool == NULL &&
|
||||||
bm->ftoolflagpool == NULL); /* make sure we never alloc'd these */
|
bm->ftoolflagpool == NULL); /* make sure we never alloc'd these */
|
||||||
|
@@ -106,7 +106,7 @@ static Mesh *doEdgeSplit(Mesh *mesh, EdgeSplitModifierData *emd, const ModifierE
|
|||||||
|
|
||||||
/* BM_mesh_validate(bm); */ /* for troubleshooting */
|
/* BM_mesh_validate(bm); */ /* for troubleshooting */
|
||||||
|
|
||||||
result = BKE_bmesh_to_mesh_nomain(bm, &((struct BMeshToMeshParams){0}));
|
result = BKE_mesh_from_bmesh_nomain(bm, &((struct BMeshToMeshParams){0}));
|
||||||
BM_mesh_free(bm);
|
BM_mesh_free(bm);
|
||||||
|
|
||||||
result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
|
result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
|
||||||
|
@@ -162,7 +162,7 @@ static void deformVerts(
|
|||||||
|
|
||||||
if (edit_btmesh) {
|
if (edit_btmesh) {
|
||||||
/* In edit mode get directly from the edit mesh. */
|
/* In edit mode get directly from the edit mesh. */
|
||||||
psmd->mesh_original = BKE_bmesh_to_mesh_nomain(edit_btmesh->bm, &(struct BMeshToMeshParams){0});
|
psmd->mesh_original = BKE_mesh_from_bmesh_nomain(edit_btmesh->bm, &(struct BMeshToMeshParams){0});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Otherwise get regular mesh. */
|
/* Otherwise get regular mesh. */
|
||||||
|
@@ -126,7 +126,7 @@ static void deformVertsEM(
|
|||||||
Mesh *mesh_src = mesh;
|
Mesh *mesh_src = mesh;
|
||||||
|
|
||||||
if (mesh_src == NULL) {
|
if (mesh_src == NULL) {
|
||||||
mesh_src = BKE_bmesh_to_mesh_nomain(editData->bm, &(struct BMeshToMeshParams){0});
|
mesh_src = BKE_mesh_from_bmesh_nomain(editData->bm, &(struct BMeshToMeshParams){0});
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_assert(mesh_src->totvert == numVerts);
|
BLI_assert(mesh_src->totvert == numVerts);
|
||||||
|
@@ -1880,7 +1880,7 @@ static Mesh *base_skin(Mesh *origmesh,
|
|||||||
if (!bm)
|
if (!bm)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
result = BKE_bmesh_to_mesh_nomain(bm, &(struct BMeshToMeshParams){0});
|
result = BKE_mesh_from_bmesh_nomain(bm, &(struct BMeshToMeshParams){0});
|
||||||
BM_mesh_free(bm);
|
BM_mesh_free(bm);
|
||||||
|
|
||||||
result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
|
result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
|
||||||
|
@@ -232,7 +232,7 @@ static void deformVertsEM(
|
|||||||
Mesh *mesh_src = mesh;
|
Mesh *mesh_src = mesh;
|
||||||
|
|
||||||
if (mesh_src == NULL) {
|
if (mesh_src == NULL) {
|
||||||
mesh_src = BKE_bmesh_to_mesh_nomain(editData->bm, &(struct BMeshToMeshParams){0});
|
mesh_src = BKE_mesh_from_bmesh_nomain(editData->bm, &(struct BMeshToMeshParams){0});
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_assert(mesh_src->totvert == numVerts);
|
BLI_assert(mesh_src->totvert == numVerts);
|
||||||
|
@@ -53,7 +53,7 @@ static Mesh *triangulate_mesh(Mesh *mesh, const int quad_method, const int ngon_
|
|||||||
|
|
||||||
BM_mesh_triangulate(bm, quad_method, ngon_method, false, NULL, NULL, NULL);
|
BM_mesh_triangulate(bm, quad_method, ngon_method, false, NULL, NULL, NULL);
|
||||||
|
|
||||||
result = BKE_bmesh_to_mesh_nomain(bm, &((struct BMeshToMeshParams){0}));
|
result = BKE_mesh_from_bmesh_nomain(bm, &((struct BMeshToMeshParams){0}));
|
||||||
BM_mesh_free(bm);
|
BM_mesh_free(bm);
|
||||||
|
|
||||||
total_edges = result->totedge;
|
total_edges = result->totedge;
|
||||||
|
@@ -177,7 +177,7 @@ Mesh *MOD_get_mesh_eval(
|
|||||||
}
|
}
|
||||||
else if (ob->type == OB_MESH) {
|
else if (ob->type == OB_MESH) {
|
||||||
if (em) {
|
if (em) {
|
||||||
mesh = BKE_bmesh_to_mesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
|
mesh = BKE_mesh_from_bmesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* TODO(sybren): after modifier conversion of DM to Mesh is done, check whether
|
/* TODO(sybren): after modifier conversion of DM to Mesh is done, check whether
|
||||||
|
@@ -332,7 +332,7 @@ static void deformVertsEM(
|
|||||||
Mesh *mesh_src = mesh;
|
Mesh *mesh_src = mesh;
|
||||||
|
|
||||||
if (mesh_src == NULL) {
|
if (mesh_src == NULL) {
|
||||||
mesh_src = BKE_bmesh_to_mesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
|
mesh_src = BKE_mesh_from_bmesh_nomain(em->bm, &(struct BMeshToMeshParams){0});
|
||||||
}
|
}
|
||||||
|
|
||||||
BLI_assert(mesh_src->totvert == numVerts);
|
BLI_assert(mesh_src->totvert == numVerts);
|
||||||
|
@@ -93,7 +93,7 @@ static Mesh *WireframeModifier_do(WireframeModifierData *wmd, Object *ob, Mesh *
|
|||||||
MAX2(ob->totcol - 1, 0),
|
MAX2(ob->totcol - 1, 0),
|
||||||
false);
|
false);
|
||||||
|
|
||||||
result = BKE_bmesh_to_mesh_nomain(bm, &(struct BMeshToMeshParams){0});
|
result = BKE_mesh_from_bmesh_nomain(bm, &(struct BMeshToMeshParams){0});
|
||||||
BM_mesh_free(bm);
|
BM_mesh_free(bm);
|
||||||
|
|
||||||
result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
|
result->runtime.cd_dirty_vert |= CD_MASK_NORMAL;
|
||||||
|
Reference in New Issue
Block a user