diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-13 12:35:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-13 12:55:12 +0300 |
commit | c8597a465f22e020b1c0ce6fcfbb7b7308efdad1 (patch) | |
tree | bdff87671b2f24ce7f393534e4325fb9e66eeda8 /source/blender/modifiers/intern | |
parent | 754d3a2fe626fbe57bb6ef47581368e3859f6390 (diff) |
Object Mode: remove Scene.obedit
Add ED_screen_window_find, BKE_workspace_edit_object
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshdeform.c | 4 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_surfacedeform.c | 30 |
2 files changed, 21 insertions, 13 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index da233a18d0a..e8fc832b597 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -49,6 +49,8 @@ #include "MEM_guardedalloc.h" +#include "DEG_depsgraph.h" + #include "MOD_util.h" #ifdef __SSE2__ @@ -300,7 +302,7 @@ static void meshdeformModifier_do( * * We'll support this case once granular dependency graph is landed. */ - if (mmd->object == md->scene->obedit) { + if (mmd->object == OBEDIT_FROM_EVAL_CTX(eval_ctx)) { 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 046a0ab27bf..85347288872 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -11,6 +11,8 @@ #include "BKE_library_query.h" #include "BKE_modifier.h" +#include "DEG_depsgraph.h" + #include "MEM_guardedalloc.h" #include "MOD_util.h" @@ -1097,7 +1099,9 @@ static void deformVert( } } -static void surfacedeformModifier_do(ModifierData *md, float (*vertexCos)[3], unsigned int numverts, Object *ob) +static void surfacedeformModifier_do( + ModifierData *md, const EvaluationContext *eval_ctx, + float (*vertexCos)[3], unsigned int numverts, Object *ob) { SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md; DerivedMesh *tdm; @@ -1110,7 +1114,7 @@ static void surfacedeformModifier_do(ModifierData *md, float (*vertexCos)[3], un } /* Handle target mesh both in and out of edit mode */ - if (smd->target == md->scene->obedit) { + if (smd->target == OBEDIT_FROM_EVAL_CTX(eval_ctx)) { BMEditMesh *em = BKE_editmesh_from_object(smd->target); tdm = em->derivedFinal; } @@ -1180,20 +1184,22 @@ static void surfacedeformModifier_do(ModifierData *md, float (*vertexCos)[3], un } } -static void deformVerts(ModifierData *md, const struct EvaluationContext *UNUSED(eval_ctx), - Object *ob, DerivedMesh *UNUSED(derivedData), - float (*vertexCos)[3], int numVerts, - ModifierApplyFlag UNUSED(flag)) +static void deformVerts( + ModifierData *md, const struct EvaluationContext *eval_ctx, + Object *ob, DerivedMesh *UNUSED(derivedData), + float (*vertexCos)[3], int numVerts, + ModifierApplyFlag UNUSED(flag)) { - surfacedeformModifier_do(md, vertexCos, numVerts, ob); + surfacedeformModifier_do(md, eval_ctx, vertexCos, numVerts, ob); } -static void deformVertsEM(ModifierData *md, const struct EvaluationContext *UNUSED(eval_ctx), - Object *ob, struct BMEditMesh *UNUSED(editData), - DerivedMesh *UNUSED(derivedData), - float (*vertexCos)[3], int numVerts) +static void deformVertsEM( + ModifierData *md, const struct EvaluationContext *eval_ctx, + Object *ob, struct BMEditMesh *UNUSED(editData), + DerivedMesh *UNUSED(derivedData), + float (*vertexCos)[3], int numVerts) { - surfacedeformModifier_do(md, vertexCos, numVerts, ob); + surfacedeformModifier_do(md, eval_ctx, vertexCos, numVerts, ob); } static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) |