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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-20 13:33:45 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-21 14:56:22 +0300
commitcfb7565cd5c19e80089d82d7034393342a24f696 (patch)
tree78fa4a4a73e5b61e6b7cd5626967a836e2ed9628 /source/blender/modifiers
parent91a5b665b0b47a20e65434dd40740a80b39a0b9c (diff)
Cleanup: convert smoke modifier from DerivedMesh to Mesh.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_particlesystem.c14
-rw-r--r--source/blender/modifiers/intern/MOD_smoke.c10
2 files changed, 6 insertions, 18 deletions
diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c
index 6f9a44cd9e6..aeb2bfb2467 100644
--- a/source/blender/modifiers/intern/MOD_particlesystem.c
+++ b/source/blender/modifiers/intern/MOD_particlesystem.c
@@ -145,12 +145,7 @@ static void deformVerts(
}
/* make new mesh */
- BKE_id_copy_ex(NULL, &mesh_src->id, (ID **)&psmd->mesh_final,
- LIB_ID_CREATE_NO_MAIN |
- LIB_ID_CREATE_NO_USER_REFCOUNT |
- LIB_ID_CREATE_NO_DEG_TAG |
- LIB_ID_COPY_NO_PREVIEW,
- false);
+ psmd->mesh_final = BKE_mesh_copy_for_eval(mesh_src, false);
BKE_mesh_apply_vert_coords(psmd->mesh_final, vertexCos);
BKE_mesh_calc_normals(psmd->mesh_final);
@@ -182,12 +177,7 @@ static void deformVerts(
/* Make a persistent copy of the mesh. We don't actually need
* all this data, just some topology for remapping. Could be
* optimized once. */
- BKE_id_copy_ex(NULL, &mesh_original->id, (ID **)&psmd->mesh_original,
- LIB_ID_CREATE_NO_MAIN |
- LIB_ID_CREATE_NO_USER_REFCOUNT |
- LIB_ID_CREATE_NO_DEG_TAG |
- LIB_ID_COPY_NO_PREVIEW,
- false);
+ psmd->mesh_original = BKE_mesh_copy_for_eval(mesh_original, false);
}
BKE_mesh_tessface_ensure(psmd->mesh_original);
diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c
index 0caeda0e426..b91358a8ab6 100644
--- a/source/blender/modifiers/intern/MOD_smoke.c
+++ b/source/blender/modifiers/intern/MOD_smoke.c
@@ -105,22 +105,20 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static DerivedMesh *applyModifier_DM(
+static Mesh *applyModifier(
ModifierData *md, const ModifierEvalContext *ctx,
- DerivedMesh *dm)
+ Mesh *me)
{
SmokeModifierData *smd = (SmokeModifierData *) md;
if (ctx->flag & MOD_APPLY_ORCO) {
- return dm;
+ return me;
}
Scene *scene = DEG_get_evaluated_scene(ctx->depsgraph);
- return smokeModifier_do(smd, ctx->depsgraph, scene, ctx->object, dm);
+ return smokeModifier_do(smd, ctx->depsgraph, scene, ctx->object, me);
}
-applyModifier_DM_wrapper(applyModifier, applyModifier_DM)
-
static bool dependsOnTime(ModifierData *UNUSED(md))
{
return true;