Merge branch 'blender2.7'
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 27 Dec 2018 10:43:06 +0000 (11:43 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 27 Dec 2018 10:43:06 +0000 (11:43 +0100)
source/blender/blenkernel/intern/cloth.c

index 75e1884..30b5d92 100644 (file)
@@ -1356,6 +1356,11 @@ static int cloth_build_springs ( ClothModifierData *clmd, Mesh *mesh )
                }
        }
 
+       clmd->sim_parms->avg_spring_len = 0.0f;
+       for (int i = 0; i < mvert_num; i++) {
+               cloth->verts[i].avg_spring_len = 0.0f;
+       }
+
        /* Structural springs. */
        for (int i = 0; i < numedges; i++) {
                spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );