Merging revisions 14838-14945 of https://svn.blender.org/svnroot/bf-blender/trunk...
[blender.git] / source / blender / blenkernel / intern / modifier.c
index b481055ff16d55857822d6395155e550cc4e4b2e..fa54b0458d5b42dbb357035f84f6d08b6d53cfbe 100644 (file)
@@ -1250,7 +1250,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;
 }
@@ -2676,7 +2677,8 @@ static DerivedMesh *edgesplitModifier_applyModifier(
 
        result = edgesplitModifier_do(emd, ob, derivedData);
 
-       CDDM_calc_normals(result);
+       if(result != derivedData)
+               CDDM_calc_normals(result);
 
        return result;
 }
@@ -6931,8 +6933,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;