Freestyle: Fix for chaining operators not concatenating edges with Freestyle edge marks and at material boundaries.
Problem report by Postoman on the BlenderArtists.org Freestyle thread, thanks a lot!
This commit is contained in:
@@ -72,7 +72,8 @@ class pyChainSilhouetteIterator(ChainingIterator):
|
|||||||
it.increment()
|
it.increment()
|
||||||
else:
|
else:
|
||||||
## case of NonTVertex
|
## 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)):
|
for i in range(len(natures)):
|
||||||
currentNature = self.current_edge.nature
|
currentNature = self.current_edge.nature
|
||||||
if (natures[i] & currentNature) != 0:
|
if (natures[i] & currentNature) != 0:
|
||||||
@@ -130,7 +131,8 @@ class pyChainSilhouetteGenericIterator(ChainingIterator):
|
|||||||
it.increment()
|
it.increment()
|
||||||
else:
|
else:
|
||||||
## case of NonTVertex
|
## 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)):
|
for i in range(len(natures)):
|
||||||
currentNature = self.current_edge.nature
|
currentNature = self.current_edge.nature
|
||||||
if (natures[i] & currentNature) != 0:
|
if (natures[i] & currentNature) != 0:
|
||||||
@@ -243,7 +245,8 @@ class pySketchyChainSilhouetteIterator(ChainingIterator):
|
|||||||
it.increment()
|
it.increment()
|
||||||
else:
|
else:
|
||||||
## case of NonTVertex
|
## 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)):
|
for i in range(len(natures)):
|
||||||
currentNature = self.current_edge.nature
|
currentNature = self.current_edge.nature
|
||||||
if (natures[i] & currentNature) != 0:
|
if (natures[i] & currentNature) != 0:
|
||||||
@@ -352,7 +355,8 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
|
|||||||
it.increment()
|
it.increment()
|
||||||
else:
|
else:
|
||||||
## case of NonTVertex
|
## 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:
|
for nat in natures:
|
||||||
if (self.current_edge.nature & nat) != 0:
|
if (self.current_edge.nature & nat) != 0:
|
||||||
count=0
|
count=0
|
||||||
@@ -448,7 +452,8 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
|
|||||||
it.increment()
|
it.increment()
|
||||||
else:
|
else:
|
||||||
## case of NonTVertex
|
## 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:
|
for nat in natures:
|
||||||
if (self.current_edge.nature & nat) != 0:
|
if (self.current_edge.nature & nat) != 0:
|
||||||
count=0
|
count=0
|
||||||
@@ -520,7 +525,8 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
|
|||||||
it.increment()
|
it.increment()
|
||||||
else:
|
else:
|
||||||
## case of NonTVertex
|
## 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:
|
for nat in natures:
|
||||||
if (self.current_edge.nature & nat) != 0:
|
if (self.current_edge.nature & nat) != 0:
|
||||||
count=0
|
count=0
|
||||||
@@ -622,7 +628,8 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
|
|||||||
it.increment()
|
it.increment()
|
||||||
else:
|
else:
|
||||||
## case of NonTVertex
|
## 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:
|
for nat in natures:
|
||||||
if (self.current_edge.nature & nat) != 0:
|
if (self.current_edge.nature & nat) != 0:
|
||||||
count=0
|
count=0
|
||||||
@@ -744,7 +751,8 @@ class pyNoIdChainSilhouetteIterator(ChainingIterator):
|
|||||||
it.increment()
|
it.increment()
|
||||||
else:
|
else:
|
||||||
## case of NonTVertex
|
## 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)):
|
for i in range(len(natures)):
|
||||||
currentNature = self.current_edge.nature
|
currentNature = self.current_edge.nature
|
||||||
if (natures[i] & currentNature) != 0:
|
if (natures[i] & currentNature) != 0:
|
||||||
|
@@ -140,11 +140,13 @@ int ChainSilhouetteIterator::traverse(const AdjacencyIterator& ait)
|
|||||||
//soc NonTVertex *nontvertex = (NonTVertex*)nextVertex;
|
//soc NonTVertex *nontvertex = (NonTVertex*)nextVertex;
|
||||||
ViewEdge *newEdge(0);
|
ViewEdge *newEdge(0);
|
||||||
// we'll try to chain the edges by keeping the same nature...
|
// we'll try to chain the edges by keeping the same nature...
|
||||||
// the preseance order is : SILHOUETTE, BORDER, CREASE, SUGGESTIVE, VALLEY, RIDGE
|
// the preseance order is : SILHOUETTE, BORDER, CREASE, MATERIAL_BOUNDARY, EDGE_MARK, SUGGESTIVE, VALLEY, RIDGE
|
||||||
Nature::EdgeNature natures[6] = {
|
Nature::EdgeNature natures[8] = {
|
||||||
Nature::SILHOUETTE,
|
Nature::SILHOUETTE,
|
||||||
Nature::BORDER,
|
Nature::BORDER,
|
||||||
Nature::CREASE,
|
Nature::CREASE,
|
||||||
|
Nature::MATERIAL_BOUNDARY,
|
||||||
|
Nature::EDGE_MARK,
|
||||||
Nature::SUGGESTIVE_CONTOUR,
|
Nature::SUGGESTIVE_CONTOUR,
|
||||||
Nature::VALLEY,
|
Nature::VALLEY,
|
||||||
Nature::RIDGE
|
Nature::RIDGE
|
||||||
|
Reference in New Issue
Block a user