diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-22 16:45:46 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-22 16:45:46 +0300 |
commit | c850fcc2c02bb8b15a4849284d24ab906a138cb5 (patch) | |
tree | e21438fe16127bb477a653351aa3bdf5738bd288 /source/blender/modifiers/intern/MOD_shapekey.c | |
parent | 97c99fb034db3b25e8a3e6fca3ab1a232d8d5b43 (diff) |
Modifiers: port shapekey modifier, some cleanup.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_shapekey.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_shapekey.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/modifiers/intern/MOD_shapekey.c b/source/blender/modifiers/intern/MOD_shapekey.c index 90c339361b7..a6c7419da49 100644 --- a/source/blender/modifiers/intern/MOD_shapekey.c +++ b/source/blender/modifiers/intern/MOD_shapekey.c @@ -34,11 +34,11 @@ #include "BLI_math.h" +#include "DNA_mesh_types.h" #include "DNA_key_types.h" #include "BLI_utildefines.h" -#include "BKE_cdderivedmesh.h" #include "BKE_key.h" #include "BKE_particle.h" @@ -46,7 +46,7 @@ static void deformVerts( ModifierData *UNUSED(md), const ModifierEvalContext *ctx, - DerivedMesh *UNUSED(derivedData), + Mesh *UNUSED(mesh), float (*vertexCos)[3], int numVerts) { @@ -62,7 +62,7 @@ static void deformVerts( } static void deformMatrices( - ModifierData *md, const ModifierEvalContext *ctx, DerivedMesh *derivedData, + ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh, float (*vertexCos)[3], float (*defMats)[3][3], int numVerts) { Key *key = BKE_key_from_object(ctx->object); @@ -81,26 +81,26 @@ static void deformMatrices( copy_m3_m3(defMats[a], scale); } - deformVerts(md, ctx, derivedData, vertexCos, numVerts); + deformVerts(md, ctx, mesh, vertexCos, numVerts); } static void deformVertsEM( ModifierData *md, const ModifierEvalContext *ctx, struct BMEditMesh *UNUSED(editData), - DerivedMesh *derivedData, + Mesh *mesh, float (*vertexCos)[3], int numVerts) { Key *key = BKE_key_from_object(ctx->object); if (key && key->type == KEY_RELATIVE) - deformVerts(md, ctx, derivedData, vertexCos, numVerts); + deformVerts(md, ctx, mesh, vertexCos, numVerts); } static void deformMatricesEM( ModifierData *UNUSED(md), const ModifierEvalContext *ctx, struct BMEditMesh *UNUSED(editData), - DerivedMesh *UNUSED(derivedData), + Mesh *UNUSED(mesh), float (*vertexCos)[3], float (*defMats)[3][3], int numVerts) @@ -132,17 +132,17 @@ ModifierTypeInfo modifierType_ShapeKey = { /* copyData */ NULL, - /* deformVerts_DM */ deformVerts, - /* deformMatrices_DM */ deformMatrices, - /* deformVertsEM_DM */ deformVertsEM, - /* deformMatricesEM_DM*/deformMatricesEM, + /* deformVerts_DM */ NULL, + /* deformMatrices_DM */ NULL, + /* deformVertsEM_DM */ NULL, + /* deformMatricesEM_DM*/NULL, /* applyModifier_DM */ NULL, /* applyModifierEM_DM */NULL, - /* deformVerts */ NULL, - /* deformMatrices */ NULL, - /* deformVertsEM */ NULL, - /* deformMatricesEM */ NULL, + /* deformVerts */ deformVerts, + /* deformMatrices */ deformMatrices, + /* deformVertsEM */ deformVertsEM, + /* deformMatricesEM */ deformMatricesEM, /* applyModifier */ NULL, /* applyModifierEM */ NULL, |