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@pandora.be>2011-05-26 14:21:09 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-05-26 14:21:09 +0400
commit0f1f6e448d0e02549a4ef7159eccf60f87ace219 (patch)
treee13110150395bd79cf83ef62ca31185882bfbd3c /source/blender/modifiers/intern/MOD_armature.c
parent042a3ff3822254e33371e1dd782dd721ce3d0ec9 (diff)
Fix #27480: armature multimodifier was not working in edit mode.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_armature.c')
-rw-r--r--source/blender/modifiers/intern/MOD_armature.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index 95579147dbb..a0ee047e319 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -127,8 +127,8 @@ static void deformVerts(ModifierData *md, Object *ob,
modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
armature_deform_verts(amd->object, ob, derivedData, vertexCos, NULL,
- numVerts, amd->deformflag,
- (float(*)[3])amd->prevCos, amd->defgrp_name);
+ numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);
+
/* free cache */
if(amd->prevCos) {
MEM_freeN(amd->prevCos);
@@ -145,8 +145,16 @@ static void deformVertsEM(
if(!derivedData) dm = CDDM_from_editmesh(editData, ob->data);
- armature_deform_verts(amd->object, ob, dm, vertexCos, NULL, numVerts,
- amd->deformflag, NULL, amd->defgrp_name);
+ modifier_vgroup_cache(md, vertexCos); /* if next modifier needs original vertices */
+
+ armature_deform_verts(amd->object, ob, dm, vertexCos, NULL,
+ numVerts, amd->deformflag, (float(*)[3])amd->prevCos, amd->defgrp_name);
+
+ /* free cache */
+ if(amd->prevCos) {
+ MEM_freeN(amd->prevCos);
+ amd->prevCos= NULL;
+ }
if(!derivedData) dm->release(dm);
}