diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-13 13:51:49 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-04-13 14:04:19 +0300 |
commit | f0a4c631bbac6247e3b3795681a3a31398f71c13 (patch) | |
tree | 11e4f4283284b186b5bad8cec9109de55ce52959 /source/blender/modifiers | |
parent | 1c85fb95b18e1be1e1c5807514b5cb83b4c24c6d (diff) |
Fix incorrect object in editmode tests in depsgraph eval.
These cases should not depend on the view layer.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshdeform.c | 2 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_surfacedeform.c | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index 6bf735e1e5c..d7f4af8df63 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -298,7 +298,7 @@ static void meshdeformModifier_do( * * We'll support this case once granular dependency graph is landed. */ - if (mmd->object == OBEDIT_FROM_VIEW_LAYER(eval_ctx->view_layer)) { + if (mmd->object->mode & OB_MODE_EDIT) { BMEditMesh *em = BKE_editmesh_from_object(mmd->object); tmpdm = editbmesh_get_derived_cage_and_final(eval_ctx, md->scene, mmd->object, em, 0, &cagedm); if (tmpdm) diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c index b5fd1e55839..30b569207db 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -1096,7 +1096,7 @@ static void deformVert( } static void surfacedeformModifier_do( - ModifierData *md, const EvaluationContext *eval_ctx, + ModifierData *md, float (*vertexCos)[3], unsigned int numverts, Object *ob) { SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md; @@ -1110,7 +1110,7 @@ static void surfacedeformModifier_do( } /* Handle target mesh both in and out of edit mode */ - if (smd->target == OBEDIT_FROM_VIEW_LAYER(eval_ctx->view_layer)) { + if (smd->target->mode & OB_MODE_EDIT) { BMEditMesh *em = BKE_editmesh_from_object(smd->target); tdm = em->derivedFinal; } @@ -1181,21 +1181,21 @@ static void surfacedeformModifier_do( } static void deformVerts( - ModifierData *md, const struct EvaluationContext *eval_ctx, + ModifierData *md, const struct EvaluationContext *UNUSED(eval_ctx), Object *ob, DerivedMesh *UNUSED(derivedData), float (*vertexCos)[3], int numVerts, ModifierApplyFlag UNUSED(flag)) { - surfacedeformModifier_do(md, eval_ctx, vertexCos, numVerts, ob); + surfacedeformModifier_do(md, vertexCos, numVerts, ob); } static void deformVertsEM( - ModifierData *md, const struct EvaluationContext *eval_ctx, + ModifierData *md, const struct EvaluationContext *UNUSED(eval_ctx), Object *ob, struct BMEditMesh *UNUSED(editData), DerivedMesh *UNUSED(derivedData), float (*vertexCos)[3], int numVerts) { - surfacedeformModifier_do(md, eval_ctx, vertexCos, numVerts, ob); + surfacedeformModifier_do(md, vertexCos, numVerts, ob); } static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) |