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>2018-10-12 10:11:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-12 10:14:11 +0300
commitb15123d27965f5ef753354b3eb5f6739802848b9 (patch)
tree5697c0c4363bc1b265347995facf5d02050fe471 /source/blender
parent8962b5e16b91d22029674c58dcc7499dc3e21606 (diff)
Cleanup: remove unused derived mesh wrappers
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/BKE_modifier.h37
-rw-r--r--source/blender/blenkernel/intern/modifier.c164
2 files changed, 0 insertions, 201 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 581b69619f2..2be91406524 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -424,33 +424,19 @@ const char *modifier_path_relbase_from_global(struct Object *ob);
/* wrappers for modifier callbacks that ensure valid normals */
-struct DerivedMesh *modwrap_applyModifier_DM_deprecated(
- ModifierData *md, const struct ModifierEvalContext *ctx,
- struct DerivedMesh *dm);
struct Mesh *modwrap_applyModifier(
ModifierData *md, const struct ModifierEvalContext *ctx,
struct Mesh *me);
-struct DerivedMesh *modwrap_applyModifierEM_DM_deprecated(
- ModifierData *md, const struct ModifierEvalContext *ctx,
- struct BMEditMesh *em, struct DerivedMesh *dm);
struct Mesh *modwrap_applyModifierEM(
ModifierData *md, const struct ModifierEvalContext *ctx,
struct BMEditMesh *em, struct Mesh *me);
-void modwrap_deformVerts_DM_deprecated(
- ModifierData *md, const struct ModifierEvalContext *ctx,
- struct DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts);
void modwrap_deformVerts(
ModifierData *md, const struct ModifierEvalContext *ctx,
struct Mesh *me,
float (*vertexCos)[3], int numVerts);
-void modwrap_deformVertsEM_DM_deprecated(
- ModifierData *md, const struct ModifierEvalContext *ctx,
- struct BMEditMesh *em, struct DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts);
void modwrap_deformVertsEM(
ModifierData *md, const struct ModifierEvalContext *ctx,
struct BMEditMesh *em, struct Mesh *me,
@@ -470,33 +456,10 @@ void modwrap_deformVertsEM(
* depending on if the modifier has been ported to Mesh or is still using DerivedMesh
*/
-void modifier_deformVerts_DM_deprecated(
- struct ModifierData *md, const struct ModifierEvalContext *ctx,
- struct DerivedMesh *dm, float (*vertexCos)[3], int numVerts);
-
-void modifier_deformMatrices_DM_deprecated(
- struct ModifierData *md, const struct ModifierEvalContext *ctx,
- struct DerivedMesh *dm,
- float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
-
-void modifier_deformVertsEM_DM_deprecated(
- struct ModifierData *md, const struct ModifierEvalContext *ctx,
- struct BMEditMesh *editData, struct DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts);
-
-void modifier_deformMatricesEM_DM_deprecated(
- struct ModifierData *md, const struct ModifierEvalContext *ctx,
- struct BMEditMesh *editData, struct DerivedMesh *dm,
- float (*vertexCos)[3], float (*defMats)[3][3], int numVerts);
-
struct DerivedMesh *modifier_applyModifier_DM_deprecated(
struct ModifierData *md, const struct ModifierEvalContext *ctx,
struct DerivedMesh *dm);
-struct DerivedMesh *modifier_applyModifierEM_DM_deprecated(
- struct ModifierData *md, const struct ModifierEvalContext *ctx,
- struct BMEditMesh *editData, struct DerivedMesh *dm);
-
struct Mesh *BKE_modifier_get_evaluated_mesh_from_evaluated_object(
struct Object *ob_eval, bool *r_free_mesh);
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 558d1537028..41c35de8aea 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -826,18 +826,6 @@ void modifier_path_init(char *path, int path_maxlen, const char *name)
/* wrapper around ModifierTypeInfo.applyModifier that ensures valid normals */
-struct DerivedMesh *modwrap_applyModifier_DM_deprecated(
- ModifierData *md, const ModifierEvalContext *ctx,
- struct DerivedMesh *dm)
-{
- const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- BLI_assert(CustomData_has_layer(&dm->polyData, CD_NORMAL) == false);
-
- if (mti->dependsOnNormals && mti->dependsOnNormals(md)) {
- DM_ensure_normals(dm);
- }
- return modifier_applyModifier_DM_deprecated(md, ctx, dm);
-}
struct Mesh *modwrap_applyModifier(
ModifierData *md, const ModifierEvalContext *ctx,
struct Mesh *me)
@@ -851,18 +839,6 @@ struct Mesh *modwrap_applyModifier(
return mti->applyModifier(md, ctx, me);
}
-struct DerivedMesh *modwrap_applyModifierEM_DM_deprecated(
- ModifierData *md, const ModifierEvalContext *ctx,
- struct BMEditMesh *em, DerivedMesh *dm)
-{
- const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- BLI_assert(CustomData_has_layer(&dm->polyData, CD_NORMAL) == false);
-
- if (mti->dependsOnNormals && mti->dependsOnNormals(md)) {
- DM_ensure_normals(dm);
- }
- return modifier_applyModifierEM_DM_deprecated(md, ctx, em, dm);
-}
struct Mesh *modwrap_applyModifierEM(
ModifierData *md, const ModifierEvalContext *ctx,
struct BMEditMesh *em, Mesh *me)
@@ -876,18 +852,6 @@ struct Mesh *modwrap_applyModifierEM(
return mti->applyModifierEM(md, ctx, em, me);
}
-void modwrap_deformVerts_DM_deprecated(
- ModifierData *md, const ModifierEvalContext *ctx,
- DerivedMesh *dm, float (*vertexCos)[3], int numVerts)
-{
- const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- BLI_assert(!dm || CustomData_has_layer(&dm->polyData, CD_NORMAL) == false);
-
- if (dm && mti->dependsOnNormals && mti->dependsOnNormals(md)) {
- DM_ensure_normals(dm);
- }
- modifier_deformVerts_DM_deprecated(md, ctx, dm, vertexCos, numVerts);
-}
void modwrap_deformVerts(
ModifierData *md, const ModifierEvalContext *ctx,
Mesh *me, float (*vertexCos)[3], int numVerts)
@@ -901,19 +865,6 @@ void modwrap_deformVerts(
mti->deformVerts(md, ctx, me, vertexCos, numVerts);
}
-void modwrap_deformVertsEM_DM_deprecated(
- ModifierData *md, const ModifierEvalContext *ctx,
- struct BMEditMesh *em, DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts)
-{
- const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
- BLI_assert(!dm || CustomData_has_layer(&dm->polyData, CD_NORMAL) == false);
-
- if (dm && mti->dependsOnNormals && mti->dependsOnNormals(md)) {
- DM_ensure_normals(dm);
- }
- modifier_deformVertsEM_DM_deprecated(md, ctx, em, dm, vertexCos, numVerts);
-}
void modwrap_deformVertsEM(
ModifierData *md, const ModifierEvalContext *ctx,
struct BMEditMesh *em, Mesh *me,
@@ -937,91 +888,6 @@ void modwrap_deformVertsEM(
/* deprecated variants of above that accept DerivedMesh */
-void modifier_deformVerts_DM_deprecated(
- struct ModifierData *md, const ModifierEvalContext *ctx,
- struct DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts)
-{
- const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
-
- /* TODO(sybren): deduplicate all the copies of this code in this file. */
- Mesh *mesh = NULL;
- if (dm != NULL) {
- mesh = BKE_id_new_nomain(ID_ME, NULL);
- DM_to_mesh(dm, mesh, ctx->object, CD_MASK_EVERYTHING, false);
- }
-
- mti->deformVerts(md, ctx, mesh, vertexCos, numVerts);
-
- if (mesh != NULL) {
- BKE_id_free(NULL, mesh);
- }
-}
-
-void modifier_deformMatrices_DM_deprecated(
- struct ModifierData *md, const ModifierEvalContext *ctx,
- struct DerivedMesh *dm,
- float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
-{
-
- const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
-
- /* TODO(sybren): deduplicate all the copies of this code in this file. */
- Mesh *mesh = NULL;
- if (dm != NULL) {
- mesh = BKE_id_new_nomain(ID_ME, NULL);
- DM_to_mesh(dm, mesh, ctx->object, CD_MASK_EVERYTHING, false);
- }
-
- mti->deformMatrices(md, ctx, mesh, vertexCos, defMats, numVerts);
-
- if (mesh != NULL) {
- BKE_id_free(NULL, mesh);
- }
-}
-
-void modifier_deformVertsEM_DM_deprecated(
- struct ModifierData *md, const ModifierEvalContext *ctx,
- struct BMEditMesh *editData, struct DerivedMesh *dm,
- float (*vertexCos)[3], int numVerts)
-{
- const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
-
- /* TODO(sybren): deduplicate all the copies of this code in this file. */
- Mesh *mesh = NULL;
- if (dm != NULL) {
- mesh = BKE_id_new_nomain(ID_ME, NULL);
- DM_to_mesh(dm, mesh, ctx->object, CD_MASK_EVERYTHING, false);
- }
-
- mti->deformVertsEM(md, ctx, editData, mesh, vertexCos, numVerts);
-
- if (mesh != NULL) {
- BKE_id_free(NULL, mesh);
- }
-}
-
-void modifier_deformMatricesEM_DM_deprecated(
- struct ModifierData *md, const ModifierEvalContext *ctx,
- struct BMEditMesh *editData, struct DerivedMesh *dm,
- float (*vertexCos)[3], float (*defMats)[3][3], int numVerts)
-{
- const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
-
- /* TODO(sybren): deduplicate all the copies of this code in this file. */
- Mesh *mesh = NULL;
- if (dm != NULL) {
- mesh = BKE_id_new_nomain(ID_ME, NULL);
- DM_to_mesh(dm, mesh, ctx->object, CD_MASK_EVERYTHING, false);
- }
-
- mti->deformMatricesEM(md, ctx, editData, mesh, vertexCos, defMats, numVerts);
-
- if (mesh != NULL) {
- BKE_id_free(NULL, mesh);
- }
-}
-
struct DerivedMesh *modifier_applyModifier_DM_deprecated(
struct ModifierData *md, const ModifierEvalContext *ctx,
struct DerivedMesh *dm)
@@ -1051,36 +917,6 @@ struct DerivedMesh *modifier_applyModifier_DM_deprecated(
}
-struct DerivedMesh *modifier_applyModifierEM_DM_deprecated(
- struct ModifierData *md, const ModifierEvalContext *ctx,
- struct BMEditMesh *editData,
- struct DerivedMesh *dm)
-{
- const ModifierTypeInfo *mti = modifierType_getInfo(md->type);
-
- /* TODO(sybren): deduplicate all the copies of this code in this file. */
- Mesh *mesh = NULL;
- if (dm != NULL) {
- mesh = BKE_id_new_nomain(ID_ME, NULL);
- DM_to_mesh(dm, mesh, ctx->object, CD_MASK_EVERYTHING, false);
- }
-
- struct Mesh *new_mesh = mti->applyModifierEM(md, ctx, editData, mesh);
-
- /* Make a DM that doesn't reference new_mesh so we can free the latter. */
- DerivedMesh *ndm = CDDM_from_mesh_ex(new_mesh, CD_DUPLICATE, CD_MASK_EVERYTHING);
-
- if (new_mesh != mesh) {
- BKE_id_free(NULL, new_mesh);
- }
- if (mesh != NULL) {
- BKE_id_free(NULL, mesh);
- }
-
- return ndm;
-
-}
-
/**
* Get evaluated mesh for other evaluated object, which is used as an operand for the modifier,
* e.g. second operand for boolean modifier.