[Bf-blender-cvs] [fdcdd5e] master: Freestyle: Follow-up fix for the chaining operation bug in the previous commit.

Tamito Kajiyama noreply at git.blender.org
Thu Feb 13 01:57:54 CET 2014


Commit: fdcdd5e52efcbc893cbf251fe0090af9e04aa090
Author: Tamito Kajiyama
Date:   Thu Feb 13 09:52:28 2014 +0900
https://developer.blender.org/rBfdcdd5e52efcbc893cbf251fe0090af9e04aa090

Freestyle: Follow-up fix for the chaining operation bug in the previous commit.

Many thanks to flokkievids for identifying the inconsistency.

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

M	source/blender/freestyle/intern/stroke/ChainingIterators.cpp

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

diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.cpp b/source/blender/freestyle/intern/stroke/ChainingIterators.cpp
index 2f193ce..66575fd 100644
--- a/source/blender/freestyle/intern/stroke/ChainingIterators.cpp
+++ b/source/blender/freestyle/intern/stroke/ChainingIterators.cpp
@@ -151,7 +151,8 @@ int ChainSilhouetteIterator::traverse(const AdjacencyIterator& ait)
 			Nature::VALLEY,
 			Nature::RIDGE
 		};
-		for (unsigned int i = 0; i < 6; ++i) {
+		int numNatures = sizeof(natures) / sizeof(Nature::EdgeNature);
+		for (unsigned int i = 0; i < numNatures; ++i) {
 			if (getCurrentEdge()->getNature() & natures[i]) {
 				int n = 0;
 				while (!it.isEnd()) {




More information about the Bf-blender-cvs mailing list