diff options
-rw-r--r-- | release/scripts/freestyle/modules/freestyle/chainingiterators.py | 24 | ||||
-rw-r--r-- | source/blender/freestyle/intern/stroke/ChainingIterators.cpp | 6 |
2 files changed, 20 insertions, 10 deletions
diff --git a/release/scripts/freestyle/modules/freestyle/chainingiterators.py b/release/scripts/freestyle/modules/freestyle/chainingiterators.py index 4b2cc9a832c..c4e22192a89 100644 --- a/release/scripts/freestyle/modules/freestyle/chainingiterators.py +++ b/release/scripts/freestyle/modules/freestyle/chainingiterators.py @@ -72,7 +72,8 @@ class pyChainSilhouetteIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.MATERIAL_BOUNDARY,Nature.EDGE_MARK, + Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for i in range(len(natures)): currentNature = self.current_edge.nature if (natures[i] & currentNature) != 0: @@ -130,7 +131,8 @@ class pyChainSilhouetteGenericIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.MATERIAL_BOUNDARY,Nature.EDGE_MARK, + Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for i in range(len(natures)): currentNature = self.current_edge.nature if (natures[i] & currentNature) != 0: @@ -243,7 +245,8 @@ class pySketchyChainSilhouetteIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.MATERIAL_BOUNDARY,Nature.EDGE_MARK, + Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for i in range(len(natures)): currentNature = self.current_edge.nature if (natures[i] & currentNature) != 0: @@ -352,7 +355,8 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.MATERIAL_BOUNDARY,Nature.EDGE_MARK, + Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for nat in natures: if (self.current_edge.nature & nat) != 0: count=0 @@ -448,7 +452,8 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.MATERIAL_BOUNDARY,Nature.EDGE_MARK, + Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for nat in natures: if (self.current_edge.nature & nat) != 0: count=0 @@ -520,7 +525,8 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.MATERIAL_BOUNDARY,Nature.EDGE_MARK, + Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for nat in natures: if (self.current_edge.nature & nat) != 0: count=0 @@ -622,7 +628,8 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.MATERIAL_BOUNDARY,Nature.EDGE_MARK, + Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for nat in natures: if (self.current_edge.nature & nat) != 0: count=0 @@ -744,7 +751,8 @@ class pyNoIdChainSilhouetteIterator(ChainingIterator): it.increment() else: ## case of NonTVertex - natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] + natures = [Nature.SILHOUETTE,Nature.BORDER,Nature.CREASE,Nature.MATERIAL_BOUNDARY,Nature.EDGE_MARK, + Nature.SUGGESTIVE_CONTOUR,Nature.VALLEY,Nature.RIDGE] for i in range(len(natures)): currentNature = self.current_edge.nature if (natures[i] & currentNature) != 0: diff --git a/source/blender/freestyle/intern/stroke/ChainingIterators.cpp b/source/blender/freestyle/intern/stroke/ChainingIterators.cpp index 4408f5cd796..2f193cee4b7 100644 --- a/source/blender/freestyle/intern/stroke/ChainingIterators.cpp +++ b/source/blender/freestyle/intern/stroke/ChainingIterators.cpp @@ -140,11 +140,13 @@ int ChainSilhouetteIterator::traverse(const AdjacencyIterator& ait) //soc NonTVertex *nontvertex = (NonTVertex*)nextVertex; ViewEdge *newEdge(0); // we'll try to chain the edges by keeping the same nature... - // the preseance order is : SILHOUETTE, BORDER, CREASE, SUGGESTIVE, VALLEY, RIDGE - Nature::EdgeNature natures[6] = { + // the preseance order is : SILHOUETTE, BORDER, CREASE, MATERIAL_BOUNDARY, EDGE_MARK, SUGGESTIVE, VALLEY, RIDGE + Nature::EdgeNature natures[8] = { Nature::SILHOUETTE, Nature::BORDER, Nature::CREASE, + Nature::MATERIAL_BOUNDARY, + Nature::EDGE_MARK, Nature::SUGGESTIVE_CONTOUR, Nature::VALLEY, Nature::RIDGE |