Merge from trunk
[blender.git] / source / blender / blenkernel / intern / modifier.c
index c8a51e15049537fe455416aebf0695ec3f900c07..35219afdd6e31233d7f0fa0efcf1953b0c477c4d 100644 (file)
@@ -1249,7 +1249,8 @@ static DerivedMesh *arrayModifier_applyModifier(
 
        result = arrayModifier_doArray(amd, ob, derivedData, 0);
 
-       CDDM_calc_normals(result);
+       if(result != derivedData)
+               CDDM_calc_normals(result);
 
        return result;
 }
@@ -2675,7 +2676,8 @@ static DerivedMesh *edgesplitModifier_applyModifier(
 
        result = edgesplitModifier_do(emd, ob, derivedData);
 
-       CDDM_calc_normals(result);
+       if(result != derivedData)
+               CDDM_calc_normals(result);
 
        return result;
 }
@@ -6849,8 +6851,16 @@ static void meshdeformModifier_do(
        Mat3CpyMat4(icagemat, iobmat);
 
        /* bind weights if needed */
-       if(!mmd->bindcos)
-               harmonic_coordinates_bind(mmd, vertexCos, numVerts, cagemat);
+       if(!mmd->bindcos) {
+               static int recursive = 0;
+
+               /* progress bar redraw can make this recursive .. */
+               if(!recursive) {
+                       recursive = 1;
+                       harmonic_coordinates_bind(mmd, vertexCos, numVerts, cagemat);
+                       recursive = 0;
+               }
+       }
 
        /* verify we have compatible weights */
        totvert= numVerts;