[Bf-blender-cvs] [cebc7bb1980] master: Fix nan problem in previous bevel commit.

Howard Trickey noreply at git.blender.org
Mon Jan 29 16:02:37 CET 2018


Commit: cebc7bb1980dcc0864685036188aad4cd79f64c6
Author: Howard Trickey
Date:   Mon Jan 29 10:01:19 2018 -0500
Branches: master
https://developer.blender.org/rBcebc7bb1980dcc0864685036188aad4cd79f64c6

Fix nan problem in previous bevel commit.

For chains, access to g_prod[0] was undefined.
And two minor style (whitespace) changes.

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

M	release/datafiles/locale
M	release/scripts/addons
M	source/blender/bmesh/tools/bmesh_bevel.c
M	source/tools

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

diff --git a/release/datafiles/locale b/release/datafiles/locale
index cd65bc3277e..469c949d1ca 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit cd65bc3277eda27e1c0b9f20a25928f6586d89a8
+Subproject commit 469c949d1ca882be19daa128842f813b72a944d8
diff --git a/release/scripts/addons b/release/scripts/addons
index f5536e5e49c..c88411ff777 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit f5536e5e49c34dfc0a7b8990257cd393339e23c6
+Subproject commit c88411ff7776a2db5d6ef6117a1b2faa42a95611
diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c
index 35167835646..a18c4405a31 100644
--- a/source/blender/bmesh/tools/bmesh_bevel.c
+++ b/source/blender/bmesh/tools/bmesh_bevel.c
@@ -1985,6 +1985,7 @@ static bool adjust_the_cycle_or_chain_fast(BoundVert *vstart, int np, bool iscyc
 		g_prod[i] = gprod;
 		gprod_sum += gprod;
 	}
+	g_prod[0] = 1.0f;
 	if (iscycle) {
 		gprod *= g[0];
 		if (fabs(gprod - 1.0f) > BEVEL_EPSILON) {
@@ -1993,8 +1994,6 @@ static bool adjust_the_cycle_or_chain_fast(BoundVert *vstart, int np, bool iscyc
 			MEM_freeN(g_prod);
 			return false;
 		}
-		else
-			g_prod[0] = 1.0f;
 	}
 	if (gprod_sum == 0.0f) {
 		MEM_freeN(g);
@@ -2163,7 +2162,7 @@ static void adjust_offsets(BevelParams *bp)
 			/* first follow paired edges in left->right direction */
 			v = vchainstart = vanchor;
 			iscycle = false;
-			while(v->eon && !v->visited && !iscycle) {
+			while (v->eon && !v->visited && !iscycle) {
 				enext = find_other_end_edge_half(bp, v->efirst, &bvcur);
 				BLI_assert(enext != NULL);
 				vnext = enext->leftv;
@@ -2191,7 +2190,7 @@ static void adjust_offsets(BevelParams *bp)
 					vchainstart = vnext;
 					v->visited = true;
 					v = vnext;
-				} while(!v->visited && v->eon);
+				} while (!v->visited && v->eon);
 				adjust_the_cycle_or_chain(vchainstart, false);
 			}
 		} while ((vanchor = vanchor->next) != bv->vmesh->boundstart);
diff --git a/source/tools b/source/tools
index ccf20e08702..7695e14cfc5 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit ccf20e08702ee6424edbda01544bb9f8bc386de4
+Subproject commit 7695e14cfc5820ac66546e0e515914d85ab81af3



More information about the Bf-blender-cvs mailing list