diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-09-20 02:40:44 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-09-20 02:40:44 +0400 |
commit | 38f24637d49f6d8742883d50fbae4738de56cd4c (patch) | |
tree | 2130195835b7ace773664538006364c21774b675 /release/scripts/freestyle/style_modules/parameter_editor.py | |
parent | 513293a2566016f6e2f1aba00f73910d14e71780 (diff) |
Added new line style options for sketchy chaining of feature edges.
The default chaining option is now called "Natural", while the new chaining options
are "Sketchy: Topology Preserved" and "Sketchy: Topology broken". The latter two
options allow for generating chains of feature edges with a sketchy multiple touch.
The "Sketchy: Topology Preserved" option takes account of the topology of objects
in the view map, while the "Sketchy: Topology broken" ignores the edge topology.
The "rounds" option specifies the number of rounds in sketchy strokes.
Diffstat (limited to 'release/scripts/freestyle/style_modules/parameter_editor.py')
-rw-r--r-- | release/scripts/freestyle/style_modules/parameter_editor.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/release/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py index 45c242fec8e..0324586b135 100644 --- a/release/scripts/freestyle/style_modules/parameter_editor.py +++ b/release/scripts/freestyle/style_modules/parameter_editor.py @@ -881,10 +881,15 @@ def process(layer_name, lineset_name): upred = TrueUP1D() Operators.select(upred) # join feature edges to form chains - bpred = AngleLargerThanBP1D(1.0) # XXX temporary fix for occasional unexpected long lines - if linestyle.same_object: - bpred = AndBP1D(bpred, SameShapeIdBP1D()) - Operators.bidirectionalChain(ChainPredicateIterator(upred, bpred), NotUP1D(upred)) + if linestyle.chaining == "NATURAL": + bpred = AngleLargerThanBP1D(1.0) # XXX temporary fix for occasional unexpected long lines + if linestyle.same_object: + bpred = AndBP1D(bpred, SameShapeIdBP1D()) + Operators.bidirectionalChain(ChainPredicateIterator(upred, bpred), NotUP1D(upred)) + elif linestyle.chaining == "SKETCHY_TOPOLOGY_PRESERVED": + Operators.bidirectionalChain(pySketchyChainSilhouetteIterator(linestyle.rounds)) + elif linestyle.chaining == "SKETCHY_TOPOLOGY_BROKEN": + Operators.bidirectionalChain(pySketchyChainingIterator(linestyle.rounds)) # split chains if linestyle.material_boundary: Operators.sequentialSplit(MaterialBoundaryUP0D()) |