[Bf-blender-cvs] [6de8ff57969] master: Merge branch 'blender2.7'

Sergey Sharybin noreply at git.blender.org
Thu Dec 27 11:43:37 CET 2018


Commit: 6de8ff579695f7c831684f1355ff4b1f9494a32b
Author: Sergey Sharybin
Date:   Thu Dec 27 11:43:06 2018 +0100
Branches: master
https://developer.blender.org/rB6de8ff579695f7c831684f1355ff4b1f9494a32b

Merge branch 'blender2.7'

===================================================================



===================================================================

diff --cc source/blender/blenkernel/intern/cloth.c
index 75e1884f9a3,5396a1905b9..30b5d92bdb7
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@@ -1341,23 -1280,18 +1341,28 @@@ static int cloth_build_springs ( ClothM
  	cloth->springs = NULL;
  	cloth->edgeset = NULL;
  
 -	edgelist = MEM_callocN(sizeof(*edgelist) * mvert_num, "cloth_edgelist_alloc" );
 +	if (clmd->sim_parms->bending_model == CLOTH_BENDING_ANGULAR) {
 +		spring_ref = MEM_callocN(sizeof(*spring_ref) * numedges, "temp bend spring reference");
  
 -	if (!edgelist)
 -		return 0;
 +		if (!spring_ref) {
 +			return 0;
 +		}
 +	}
 +	else {
 +		edgelist = MEM_callocN(sizeof(*edgelist) * mvert_num, "cloth_edgelist_alloc" );
 +
 +		if (!edgelist) {
 +			return 0;
 +		}
 +	}
  
+ 	clmd->sim_parms->avg_spring_len = 0.0f;
 -	for (i = 0; i < mvert_num; i++) {
++	for (int i = 0; i < mvert_num; i++) {
+ 		cloth->verts[i].avg_spring_len = 0.0f;
+ 	}
+ 
 -	// structural springs
 -	for ( i = 0; i < numedges; i++ ) {
 +	/* Structural springs. */
 +	for (int i = 0; i < numedges; i++) {
  		spring = (ClothSpring *)MEM_callocN ( sizeof ( ClothSpring ), "cloth spring" );
  
  		if ( spring ) {



More information about the Bf-blender-cvs mailing list