diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-06 13:07:27 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-16 20:55:33 +0300 |
commit | 34ab90f546f097cada951b2c9ca22bf271996980 (patch) | |
tree | ebcdb3d37120ac1d8fb16462b9104badd1800329 /source/blender/blenkernel/intern/modifier.c | |
parent | 0c495005dd83913864acb510c1d4194a2275dbb0 (diff) |
Depsgraph: remove EvaluationContext, pass Depsgraph instead.
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.
This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.
Differential Revision: https://developer.blender.org/D3152
Diffstat (limited to 'source/blender/blenkernel/intern/modifier.c')
-rw-r--r-- | source/blender/blenkernel/intern/modifier.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c index 5eb5272f3e5..c15ae9e4a7c 100644 --- a/source/blender/blenkernel/intern/modifier.c +++ b/source/blender/blenkernel/intern/modifier.c @@ -786,7 +786,7 @@ void modifier_path_init(char *path, int path_maxlen, const char *name) /* wrapper around ModifierTypeInfo.applyModifier that ensures valid normals */ struct DerivedMesh *modwrap_applyModifier( - ModifierData *md, const struct EvaluationContext *eval_ctx, + ModifierData *md, struct Depsgraph *depsgraph, Object *ob, struct DerivedMesh *dm, ModifierApplyFlag flag) { @@ -796,11 +796,11 @@ struct DerivedMesh *modwrap_applyModifier( if (mti->dependsOnNormals && mti->dependsOnNormals(md)) { DM_ensure_normals(dm); } - return mti->applyModifier(md, eval_ctx, ob, dm, flag); + return mti->applyModifier(md, depsgraph, ob, dm, flag); } struct DerivedMesh *modwrap_applyModifierEM( - ModifierData *md, const struct EvaluationContext *eval_ctx, + ModifierData *md, struct Depsgraph *depsgraph, Object *ob, struct BMEditMesh *em, DerivedMesh *dm, ModifierApplyFlag flag) @@ -811,11 +811,11 @@ struct DerivedMesh *modwrap_applyModifierEM( if (mti->dependsOnNormals && mti->dependsOnNormals(md)) { DM_ensure_normals(dm); } - return mti->applyModifierEM(md, eval_ctx, ob, em, dm, flag); + return mti->applyModifierEM(md, depsgraph, ob, em, dm, flag); } void modwrap_deformVerts( - ModifierData *md, const struct EvaluationContext *eval_ctx, + ModifierData *md, struct Depsgraph *depsgraph, Object *ob, DerivedMesh *dm, float (*vertexCos)[3], int numVerts, ModifierApplyFlag flag) @@ -826,11 +826,11 @@ void modwrap_deformVerts( if (dm && mti->dependsOnNormals && mti->dependsOnNormals(md)) { DM_ensure_normals(dm); } - mti->deformVerts(md, eval_ctx, ob, dm, vertexCos, numVerts, flag); + mti->deformVerts(md, depsgraph, ob, dm, vertexCos, numVerts, flag); } void modwrap_deformVertsEM( - ModifierData *md, const struct EvaluationContext *eval_ctx, Object *ob, + ModifierData *md, struct Depsgraph *depsgraph, Object *ob, struct BMEditMesh *em, DerivedMesh *dm, float (*vertexCos)[3], int numVerts) { @@ -840,6 +840,6 @@ void modwrap_deformVertsEM( if (dm && mti->dependsOnNormals && mti->dependsOnNormals(md)) { DM_ensure_normals(dm); } - mti->deformVertsEM(md, eval_ctx, ob, em, dm, vertexCos, numVerts); + mti->deformVertsEM(md, depsgraph, ob, em, dm, vertexCos, numVerts); } /* end modifier callback wrappers */ |