- orco fix for build effect, didn't copy input vertex cos over (duh!)
[blender.git] / source / blender / blenkernel / intern / modifier.c
index 8c214864880e81c2faff5c0b10a69e3318e8237e..49c6c5186b27c27a902408dd8cfcacfedda3068d 100644 (file)
@@ -221,6 +221,8 @@ static void *buildModifier_applyModifier(ModifierData *md, Object *ob, DerivedMe
                ndlm->mvert = MEM_mallocN(sizeof(*ndlm->mvert)*totvert, "build_mvert");
                memcpy(ndlm->mvert, mvert, sizeof(*mvert)*totvert);
                for (i=0; i<totvert; i++) {
+                       if (vertexCos)
+                               VECCOPY(ndlm->mvert[i].co, vertexCos[i]);
                        ndlm->mvert[i].flag = 0;
                }
 
@@ -312,6 +314,8 @@ static void *buildModifier_applyModifier(ModifierData *md, Object *ob, DerivedMe
                ndlm->mvert = MEM_mallocN(sizeof(*ndlm->mvert)*totvert, "build_mvert");
                memcpy(ndlm->mvert, mvert, sizeof(*mvert)*totvert);
                for (i=0; i<totvert; i++) {
+                       if (vertexCos)
+                               VECCOPY(ndlm->mvert[i].co, vertexCos[i]);
                        ndlm->mvert[i].flag = 0;
                }
 
@@ -362,6 +366,11 @@ static void *buildModifier_applyModifier(ModifierData *md, Object *ob, DerivedMe
 
                ndlm->mvert = MEM_mallocN(sizeof(*ndlm->mvert)*ndlm->totvert, "build_mvert");
                memcpy(ndlm->mvert, mvert, sizeof(*mvert)*ndlm->totvert);
+               if (vertexCos) {
+                       for (i=0; i<ndlm->totvert; i++) {
+                               VECCOPY(ndlm->mvert[i].co, vertexCos[i]);
+                       }
+               }
        }
 
        if (dm) dm->release(dm);