diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-09 13:23:10 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2018-05-09 13:39:52 +0300 |
commit | 2862b58a3882fa403c0277d0da5804ba71915c12 (patch) | |
tree | 9b055284cc9978fe6a73701e7f6a031bc7f2ef08 /source | |
parent | b586c81fbc601440ad108aa8148a4c1da09e47d4 (diff) |
Mesh Deform modifier: also show result while editing the deformation mesh
There is still an issue with the modified mesh not being updated until you
disable and re-enable the modifier. However, after that it'll now also work
while editing the deformation mesh.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/modifiers/intern/MOD_meshdeform.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index e7db70f9f7c..2865b1d6646 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -302,12 +302,12 @@ static void meshdeformModifier_do( * We'll support this case once granular dependency graph is landed. */ if (mmd->object->mode & OB_MODE_EDIT) { - /* TODO(Sybren): do we need to check the modifier mode in this case? */ - /* TODO(Sybren): should we get from BMEditMesh *em = BKE_editmesh_from_object(mmd->object) instead? */ - cagemesh = get_mesh_eval_for_modifier(ob, md->mode & eModifierMode_Render ? MOD_APPLY_RENDER : 0); + BMEditMesh *em = BKE_editmesh_from_object(mmd->object); + cagemesh = BKE_bmesh_to_mesh_nomain(em->bm, &(struct BMeshToMeshParams){0}); + free_cagemesh = true; } else { - cagemesh = get_mesh_eval_for_modifier(ob, md->mode & eModifierMode_Render ? MOD_APPLY_RENDER : 0); + cagemesh = get_mesh_eval_for_modifier(mmd->object, md->mode & eModifierMode_Render ? MOD_APPLY_RENDER : 0); } /* if we don't have one computed, use derivedmesh from data |