Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-11-25 02:18:38 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-01-28 18:33:58 +0400
commit54e90167704072f0105eb279e7431caa6c4d8e20 (patch)
treece17a581373aa05cd040b3423b4c112d47ba7e57 /release/scripts/freestyle/styles
parent6498b96ce7081db039354228213d72e8c70bd3aa (diff)
Updated Freestyle API modules according to the new hierarchical package structure.
Additional bug fixes were also done along with the code updates: * Fix for the use of old Interface1D.pointsBegin() and .pointsEnd() method names in the definition of pyDensityAnisotropyF1D and pyViewMapGradientNormF1D. * Fix for wrong data types (int instead of bool) for: - pyChainSilhouetteGenericIterator constructor and its .orientation property in modules/freestyle/chainingiterators.py. - SpatialNoiseShader constructor in styles/external_contour_sketchy.py. - ChainSilhouetteIterator constructor in styles/multiple_parameterization.py.
Diffstat (limited to 'release/scripts/freestyle/styles')
-rw-r--r--release/scripts/freestyle/styles/anisotropic_diffusion.py22
-rw-r--r--release/scripts/freestyle/styles/apriori_and_causal_density.py19
-rw-r--r--release/scripts/freestyle/styles/apriori_density.py18
-rw-r--r--release/scripts/freestyle/styles/backbone_stretcher.py15
-rw-r--r--release/scripts/freestyle/styles/blueprint_circles.py23
-rw-r--r--release/scripts/freestyle/styles/blueprint_ellipses.py23
-rw-r--r--release/scripts/freestyle/styles/blueprint_squares.py23
-rw-r--r--release/scripts/freestyle/styles/cartoon.py16
-rw-r--r--release/scripts/freestyle/styles/contour.py17
-rw-r--r--release/scripts/freestyle/styles/curvature2d.py17
-rw-r--r--release/scripts/freestyle/styles/external_contour.py17
-rw-r--r--release/scripts/freestyle/styles/external_contour_sketchy.py24
-rw-r--r--release/scripts/freestyle/styles/external_contour_smooth.py20
-rw-r--r--release/scripts/freestyle/styles/haloing.py22
-rw-r--r--release/scripts/freestyle/styles/ignore_small_occlusions.py14
-rw-r--r--release/scripts/freestyle/styles/invisible_lines.py15
-rw-r--r--release/scripts/freestyle/styles/japanese_bigbrush.py32
-rw-r--r--release/scripts/freestyle/styles/long_anisotropically_dense.py22
-rw-r--r--release/scripts/freestyle/styles/multiple_parameterization.py22
-rw-r--r--release/scripts/freestyle/styles/nature.py16
-rw-r--r--release/scripts/freestyle/styles/near_lines.py19
-rw-r--r--release/scripts/freestyle/styles/occluded_by_specific_object.py19
-rw-r--r--release/scripts/freestyle/styles/polygonalize.py16
-rw-r--r--release/scripts/freestyle/styles/qi0.py15
-rw-r--r--release/scripts/freestyle/styles/qi0_not_external_contour.py21
-rw-r--r--release/scripts/freestyle/styles/qi1.py15
-rw-r--r--release/scripts/freestyle/styles/qi2.py15
-rw-r--r--release/scripts/freestyle/styles/sequentialsplit_sketchy.py20
-rw-r--r--release/scripts/freestyle/styles/sketchy_multiple_parameterization.py20
-rw-r--r--release/scripts/freestyle/styles/sketchy_topology_broken.py20
-rw-r--r--release/scripts/freestyle/styles/sketchy_topology_preserved.py18
-rw-r--r--release/scripts/freestyle/styles/split_at_highest_2d_curvatures.py21
-rw-r--r--release/scripts/freestyle/styles/split_at_tvertices.py18
-rw-r--r--release/scripts/freestyle/styles/stroke_texture.py19
-rw-r--r--release/scripts/freestyle/styles/suggestive.py18
-rw-r--r--release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py17
-rw-r--r--release/scripts/freestyle/styles/tipremover.py16
-rw-r--r--release/scripts/freestyle/styles/tvertex_remover.py17
-rw-r--r--release/scripts/freestyle/styles/uniformpruning_zsort.py18
39 files changed, 575 insertions, 164 deletions
diff --git a/release/scripts/freestyle/styles/anisotropic_diffusion.py b/release/scripts/freestyle/styles/anisotropic_diffusion.py
index 274381a9a89..95eb2793210 100644
--- a/release/scripts/freestyle/styles/anisotropic_diffusion.py
+++ b/release/scripts/freestyle/styles/anisotropic_diffusion.py
@@ -21,10 +21,24 @@
# Date : 12/08/2004
# Purpose : Smoothes lines using an anisotropic diffusion scheme
-from freestyle import ChainPredicateIterator, ConstantThicknessShader, ExternalContourUP1D, IncreasingColorShader, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, Stroke, StrokeTextureShader, TrueBP1D, TrueUP1D
-from logical_operators import AndUP1D, NotUP1D
-from shaders import pyDiffusion2Shader
+from freestyle import Operators
+from freestyle.types import Stroke
+from freestyle.chainingiterators import ChainPredicateIterator
+from freestyle.predicates import (
+ AndUP1D,
+ ExternalContourUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueBP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantThicknessShader,
+ IncreasingColorShader,
+ SamplingShader,
+ StrokeTextureShader,
+ pyDiffusion2Shader,
+ )
# pyDiffusion2Shader parameters
offset = 0.25
diff --git a/release/scripts/freestyle/styles/apriori_and_causal_density.py b/release/scripts/freestyle/styles/apriori_and_causal_density.py
index 501c5169be9..b834cd30052 100644
--- a/release/scripts/freestyle/styles/apriori_and_causal_density.py
+++ b/release/scripts/freestyle/styles/apriori_and_causal_density.py
@@ -23,10 +23,21 @@
# subjects them to the causal density so as to avoid
# cluttering
-from freestyle import ChainPredicateIterator, ConstantColorShader, ConstantThicknessShader, IntegrationType, \
- Operators, QuantitativeInvisibilityUP1D, TrueBP1D
-from PredicatesU1D import pyDensityUP1D, pyHighViewMapDensityUP1D
-from logical_operators import AndUP1D, NotUP1D
+from freestyle import Operators
+from freestyle.types import IntegrationType
+from freestyle.chainingiterators import ChainPredicateIterator
+from freestyle.predicates import (
+ AndUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueBP1D,
+ pyDensityUP1D,
+ pyHighViewMapDensityUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ )
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.3, IntegrationType.LAST))
Operators.select(upred)
diff --git a/release/scripts/freestyle/styles/apriori_density.py b/release/scripts/freestyle/styles/apriori_density.py
index f59dd5cd36d..a247f5f6bac 100644
--- a/release/scripts/freestyle/styles/apriori_density.py
+++ b/release/scripts/freestyle/styles/apriori_density.py
@@ -21,10 +21,20 @@
# Date : 04/08/2005
# Purpose : Draws lines having a high a priori density
-from freestyle import ChainPredicateIterator, ConstantColorShader, ConstantThicknessShader, Operators, \
- QuantitativeInvisibilityUP1D, TrueBP1D, TrueUP1D
-from PredicatesU1D import pyHighViewMapDensityUP1D
-from logical_operators import AndUP1D, NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainPredicateIterator
+from freestyle.predicates import (
+ AndUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueBP1D,
+ TrueUP1D,
+ pyHighViewMapDensityUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ )
Operators.select(AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.1,5)))
bpred = TrueBP1D()
diff --git a/release/scripts/freestyle/styles/backbone_stretcher.py b/release/scripts/freestyle/styles/backbone_stretcher.py
index c920d66328e..9ab49b6d7db 100644
--- a/release/scripts/freestyle/styles/backbone_stretcher.py
+++ b/release/scripts/freestyle/styles/backbone_stretcher.py
@@ -21,9 +21,18 @@
# Date : 04/08/2005
# Purpose : Stretches the geometry of visible lines
-from freestyle import BackboneStretcherShader, ChainSilhouetteIterator, ConstantColorShader, \
- Operators, QuantitativeInvisibilityUP1D, TextureAssignerShader, TrueUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ BackboneStretcherShader,
+ ConstantColorShader,
+ TextureAssignerShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/blueprint_circles.py b/release/scripts/freestyle/styles/blueprint_circles.py
index 8d80893a6c3..254649d85b4 100644
--- a/release/scripts/freestyle/styles/blueprint_circles.py
+++ b/release/scripts/freestyle/styles/blueprint_circles.py
@@ -21,11 +21,24 @@
# Date : 04/08/2005
# Purpose : Produces a blueprint using circular contour strokes
-from freestyle import ChainPredicateIterator, ConstantThicknessShader, ContourUP1D, IncreasingColorShader, \
- Operators, QuantitativeInvisibilityUP1D, SameShapeIdBP1D, TextureAssignerShader, TrueUP1D
-from PredicatesU1D import pyHigherLengthUP1D
-from logical_operators import AndUP1D, NotUP1D
-from shaders import pyBluePrintCirclesShader, pyPerlinNoise1DShader
+from freestyle import Operators
+from freestyle.chainingiterators import ChainPredicateIterator
+from freestyle.predicates import (
+ AndUP1D,
+ ContourUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ SameShapeIdBP1D,
+ TrueUP1D,
+ pyHigherLengthUP1D,
+ )
+from freestyle.shaders import (
+ ConstantThicknessShader,
+ IncreasingColorShader,
+ TextureAssignerShader,
+ pyBluePrintCirclesShader,
+ pyPerlinNoise1DShader,
+ )
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
bpred = SameShapeIdBP1D()
diff --git a/release/scripts/freestyle/styles/blueprint_ellipses.py b/release/scripts/freestyle/styles/blueprint_ellipses.py
index d5e9f385c12..d14ff8711c6 100644
--- a/release/scripts/freestyle/styles/blueprint_ellipses.py
+++ b/release/scripts/freestyle/styles/blueprint_ellipses.py
@@ -21,11 +21,24 @@
# Date : 04/08/2005
# Purpose : Produces a blueprint using elliptic contour strokes
-from freestyle import ChainPredicateIterator, ConstantThicknessShader, ContourUP1D, IncreasingColorShader, \
- Operators, QuantitativeInvisibilityUP1D, SameShapeIdBP1D, TextureAssignerShader, TrueUP1D
-from PredicatesU1D import pyHigherLengthUP1D
-from logical_operators import AndUP1D, NotUP1D
-from shaders import pyBluePrintEllipsesShader, pyPerlinNoise1DShader
+from freestyle import Operators
+from freestyle.chainingiterators import ChainPredicateIterator
+from freestyle.predicates import (
+ AndUP1D,
+ ContourUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ SameShapeIdBP1D,
+ TrueUP1D,
+ pyHigherLengthUP1D,
+ )
+from freestyle.shaders import (
+ ConstantThicknessShader,
+ IncreasingColorShader,
+ TextureAssignerShader,
+ pyBluePrintEllipsesShader,
+ pyPerlinNoise1DShader,
+ )
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
bpred = SameShapeIdBP1D()
diff --git a/release/scripts/freestyle/styles/blueprint_squares.py b/release/scripts/freestyle/styles/blueprint_squares.py
index 35cfc33fd69..ba1bdb5d6bf 100644
--- a/release/scripts/freestyle/styles/blueprint_squares.py
+++ b/release/scripts/freestyle/styles/blueprint_squares.py
@@ -21,11 +21,24 @@
# Date : 04/08/2005
# Purpose : Produces a blueprint using square contour strokes
-from freestyle import ChainPredicateIterator, ConstantThicknessShader, ContourUP1D, IncreasingColorShader, \
- Operators, QuantitativeInvisibilityUP1D, SameShapeIdBP1D, TextureAssignerShader, TrueUP1D
-from PredicatesU1D import pyHigherLengthUP1D
-from logical_operators import AndUP1D, NotUP1D
-from shaders import pyBluePrintSquaresShader, pyPerlinNoise1DShader
+from freestyle import Operators
+from freestyle.chainingiterators import ChainPredicateIterator
+from freestyle.predicates import (
+ AndUP1D,
+ ContourUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ SameShapeIdBP1D,
+ TrueUP1D,
+ pyHigherLengthUP1D,
+ )
+from freestyle.shaders import (
+ ConstantThicknessShader,
+ IncreasingColorShader,
+ TextureAssignerShader,
+ pyBluePrintSquaresShader,
+ pyPerlinNoise1DShader,
+ )
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
bpred = SameShapeIdBP1D()
diff --git a/release/scripts/freestyle/styles/cartoon.py b/release/scripts/freestyle/styles/cartoon.py
index de4a5dd6c5d..4118b4e1552 100644
--- a/release/scripts/freestyle/styles/cartoon.py
+++ b/release/scripts/freestyle/styles/cartoon.py
@@ -23,10 +23,18 @@
# infered from each object's material in a cartoon-like
# fashion.
-from freestyle import BezierCurveShader, ChainSilhouetteIterator, ConstantThicknessShader, Operators, \
- QuantitativeInvisibilityUP1D, TrueUP1D
-from logical_operators import NotUP1D
-from shaders import pyMaterialColorShader
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ BezierCurveShader,
+ ConstantThicknessShader,
+ pyMaterialColorShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/contour.py b/release/scripts/freestyle/styles/contour.py
index f7a42d9c906..3d754cc63cf 100644
--- a/release/scripts/freestyle/styles/contour.py
+++ b/release/scripts/freestyle/styles/contour.py
@@ -21,9 +21,20 @@
# Date : 04/08/2005
# Purpose : Draws each object's visible contour
-from freestyle import ChainPredicateIterator, ConstantThicknessShader, ContourUP1D, IncreasingColorShader, \
- Operators, QuantitativeInvisibilityUP1D, SameShapeIdBP1D, TrueUP1D
-from logical_operators import AndUP1D, NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainPredicateIterator
+from freestyle.predicates import (
+ AndUP1D,
+ ContourUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ SameShapeIdBP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantThicknessShader,
+ IncreasingColorShader,
+ )
Operators.select(AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D()))
bpred = SameShapeIdBP1D()
diff --git a/release/scripts/freestyle/styles/curvature2d.py b/release/scripts/freestyle/styles/curvature2d.py
index 4204951fbd5..8f8292e663c 100644
--- a/release/scripts/freestyle/styles/curvature2d.py
+++ b/release/scripts/freestyle/styles/curvature2d.py
@@ -22,10 +22,19 @@
# Purpose : The stroke points are colored in gray levels and depending
# on the 2d curvature value
-from freestyle import ChainSilhouetteIterator, ConstantThicknessShader, Operators, \
- QuantitativeInvisibilityUP1D, Stroke, StrokeTextureShader, TrueUP1D
-from logical_operators import NotUP1D
-from shaders import py2DCurvatureColorShader
+from freestyle import Operators
+from freestyle.types import Stroke
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantThicknessShader,
+ StrokeTextureShader,
+ py2DCurvatureColorShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/external_contour.py b/release/scripts/freestyle/styles/external_contour.py
index c7e51f1a16d..7556332fdf1 100644
--- a/release/scripts/freestyle/styles/external_contour.py
+++ b/release/scripts/freestyle/styles/external_contour.py
@@ -21,9 +21,20 @@
# Date : 04/08/2005
# Purpose : Draws the external contour of the scene
-from freestyle import ChainPredicateIterator, ConstantColorShader, ConstantThicknessShader, \
- ExternalContourUP1D, Operators, QuantitativeInvisibilityUP1D, TrueBP1D, TrueUP1D
-from logical_operators import AndUP1D, NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainPredicateIterator
+from freestyle.predicates import (
+ AndUP1D,
+ ExternalContourUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueBP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ )
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
Operators.select(upred)
diff --git a/release/scripts/freestyle/styles/external_contour_sketchy.py b/release/scripts/freestyle/styles/external_contour_sketchy.py
index b8d381ea24e..2163ce4d52c 100644
--- a/release/scripts/freestyle/styles/external_contour_sketchy.py
+++ b/release/scripts/freestyle/styles/external_contour_sketchy.py
@@ -23,18 +23,30 @@
# chaining iterator (in particular each ViewEdge can be drawn
# several times
-from ChainingIterators import pySketchyChainingIterator
-from freestyle import ExternalContourUP1D, IncreasingColorShader, IncreasingThicknessShader, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, SmoothingShader, SpatialNoiseShader, \
- TextureAssignerShader, TrueUP1D
-from logical_operators import AndUP1D, NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import pySketchyChainingIterator
+from freestyle.predicates import (
+ AndUP1D,
+ ExternalContourUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ IncreasingColorShader,
+ IncreasingThicknessShader,
+ SamplingShader,
+ SmoothingShader,
+ SpatialNoiseShader,
+ TextureAssignerShader,
+ )
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
Operators.select(upred)
Operators.bidirectional_chain(pySketchyChainingIterator(), NotUP1D(upred))
shaders_list = [
SamplingShader(4),
- SpatialNoiseShader(10, 150, 2, 1, 1),
+ SpatialNoiseShader(10, 150, 2, True, True),
IncreasingThicknessShader(4, 10),
SmoothingShader(400, 0.1, 0, 0.2, 0, 0, 0, 1),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
diff --git a/release/scripts/freestyle/styles/external_contour_smooth.py b/release/scripts/freestyle/styles/external_contour_smooth.py
index 045984ea4a5..b67193cb127 100644
--- a/release/scripts/freestyle/styles/external_contour_smooth.py
+++ b/release/scripts/freestyle/styles/external_contour_smooth.py
@@ -21,10 +21,22 @@
# Date : 04/08/2005
# Purpose : Draws a smooth external contour
-from freestyle import ChainPredicateIterator, ExternalContourUP1D, IncreasingColorShader, \
- IncreasingThicknessShader, Operators, QuantitativeInvisibilityUP1D, SamplingShader, \
- SmoothingShader, TrueBP1D, TrueUP1D
-from logical_operators import AndUP1D, NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainPredicateIterator
+from freestyle.predicates import (
+ AndUP1D,
+ ExternalContourUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueBP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ IncreasingColorShader,
+ IncreasingThicknessShader,
+ SamplingShader,
+ SmoothingShader,
+ )
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
Operators.select(upred)
diff --git a/release/scripts/freestyle/styles/haloing.py b/release/scripts/freestyle/styles/haloing.py
index feadb5dd1ee..5d162436b7f 100644
--- a/release/scripts/freestyle/styles/haloing.py
+++ b/release/scripts/freestyle/styles/haloing.py
@@ -24,11 +24,23 @@
# object and trims them in order to produce
# a haloing effect around the target shape
-from freestyle import ChainSilhouetteIterator, Id, IncreasingColorShader, IncreasingThicknessShader, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, TipRemoverShader, TrueUP1D
-from PredicatesU1D import pyIsOccludedByUP1D
-from logical_operators import AndUP1D, NotUP1D
-from shaders import pyTVertexRemoverShader
+from freestyle import Operators
+from freestyle.types import Id
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ AndUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ pyIsOccludedByUP1D,
+ )
+from freestyle.shaders import (
+ IncreasingColorShader,
+ IncreasingThicknessShader,
+ SamplingShader,
+ TipRemoverShader,
+ pyTVertexRemoverShader,
+ )
# id corresponds to the id of the target object
# (accessed by SHIFT+click)
diff --git a/release/scripts/freestyle/styles/ignore_small_occlusions.py b/release/scripts/freestyle/styles/ignore_small_occlusions.py
index a9dc102a0bd..86bcc2c2a5c 100644
--- a/release/scripts/freestyle/styles/ignore_small_occlusions.py
+++ b/release/scripts/freestyle/styles/ignore_small_occlusions.py
@@ -21,9 +21,17 @@
# Date : 04/08/2005
# Purpose : The strokes are drawn through small occlusions
-from ChainingIterators import pyFillOcclusionsAbsoluteChainingIterator
-from freestyle import ConstantColorShader, ConstantThicknessShader, Operators, \
- QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import pyFillOcclusionsAbsoluteChainingIterator
+from freestyle.predicates import (
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
#Operators.bidirectional_chain(pyFillOcclusionsChainingIterator(0.1))
diff --git a/release/scripts/freestyle/styles/invisible_lines.py b/release/scripts/freestyle/styles/invisible_lines.py
index b94d7b0a5fd..fd038b6f715 100644
--- a/release/scripts/freestyle/styles/invisible_lines.py
+++ b/release/scripts/freestyle/styles/invisible_lines.py
@@ -22,9 +22,18 @@
# Purpose : Draws all lines whose Quantitative Invisibility
# is different from 0
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ )
upred = NotUP1D(QuantitativeInvisibilityUP1D(0))
Operators.select(upred)
diff --git a/release/scripts/freestyle/styles/japanese_bigbrush.py b/release/scripts/freestyle/styles/japanese_bigbrush.py
index 4a5203fb31f..71aeb960287 100644
--- a/release/scripts/freestyle/styles/japanese_bigbrush.py
+++ b/release/scripts/freestyle/styles/japanese_bigbrush.py
@@ -21,15 +21,29 @@
# Date : 04/08/2005
# Purpose : Simulates a big brush fr oriental painting
-from freestyle import BezierCurveShader, ChainSilhouetteIterator, ConstantColorShader, \
- ConstantThicknessShader, IntegrationType, Operators, QuantitativeInvisibilityUP1D, \
- SamplingShader, TextureAssignerShader, TipRemoverShader
-from Functions0D import pyInverseCurvature2DAngleF0D
-from PredicatesB1D import pyLengthBP1D
-from PredicatesU0D import pyParameterUP0D
-from PredicatesU1D import pyDensityUP1D, pyHigherLengthUP1D, pyHigherNumberOfTurnsUP1D
-from logical_operators import NotUP1D
-from shaders import pyNonLinearVaryingThicknessShader, pySamplingShader
+from freestyle import Operators
+from freestyle.types import IntegrationType
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.functions import pyInverseCurvature2DAngleF0D
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ pyDensityUP1D,
+ pyHigherLengthUP1D,
+ pyHigherNumberOfTurnsUP1D,
+ pyLengthBP1D,
+ pyParameterUP0D,
+ )
+from freestyle.shaders import (
+ BezierCurveShader,
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ TextureAssignerShader,
+ TipRemoverShader,
+ pyNonLinearVaryingThicknessShader,
+ pySamplingShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/long_anisotropically_dense.py b/release/scripts/freestyle/styles/long_anisotropically_dense.py
index f181bcc2348..ca729562c2d 100644
--- a/release/scripts/freestyle/styles/long_anisotropically_dense.py
+++ b/release/scripts/freestyle/styles/long_anisotropically_dense.py
@@ -28,11 +28,23 @@
# ******** The Directional a priori density maps must ******
# ******** have been computed prior to using this style module ******
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, DensityF1D, \
- IntegrationType, Operators, QuantitativeInvisibilityUP1D, SamplingShader, UnaryPredicate1D
-from PredicatesB1D import pyLengthBP1D
-from PredicatesU1D import pyHighDensityAnisotropyUP1D, pyHigherLengthUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.types import IntegrationType
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.functions import DensityF1D
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ UnaryPredicate1D,
+ pyHighDensityAnisotropyUP1D,
+ pyHigherLengthUP1D,
+ pyLengthBP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ )
## custom density predicate
class pyDensityUP1D(UnaryPredicate1D):
diff --git a/release/scripts/freestyle/styles/multiple_parameterization.py b/release/scripts/freestyle/styles/multiple_parameterization.py
index 922a5ffa972..da140c75147 100644
--- a/release/scripts/freestyle/styles/multiple_parameterization.py
+++ b/release/scripts/freestyle/styles/multiple_parameterization.py
@@ -27,15 +27,25 @@
# the strokes using a second parameterization that only
# covers the visible portions.
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, IncreasingColorShader, \
- IncreasingThicknessShader, Operators, QuantitativeInvisibilityUP1D, SamplingShader, \
- TextureAssignerShader, TrueUP1D
-from shaders import pyHLRShader
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ IncreasingColorShader,
+ IncreasingThicknessShader,
+ SamplingShader,
+ TextureAssignerShader,
+ pyHLRShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
## Chain following the same nature, but without the restriction
-## of staying inside the selection (0).
-Operators.bidirectional_chain(ChainSilhouetteIterator(0))
+## of staying inside the selection (False).
+Operators.bidirectional_chain(ChainSilhouetteIterator(False))
shaders_list = [
SamplingShader(20),
IncreasingThicknessShader(1.5, 30),
diff --git a/release/scripts/freestyle/styles/nature.py b/release/scripts/freestyle/styles/nature.py
index fdc627ecade..35b57399942 100644
--- a/release/scripts/freestyle/styles/nature.py
+++ b/release/scripts/freestyle/styles/nature.py
@@ -25,10 +25,18 @@
# The suggestive contours must have been enabled in the
# options dialog to appear in the View Map.
-from freestyle import ChainSilhouetteIterator, IncreasingColorShader, \
- IncreasingThicknessShader, Nature, Operators, TrueUP1D
-from PredicatesU1D import pyNatureUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.types import Nature
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ TrueUP1D,
+ pyNatureUP1D,
+ )
+from freestyle.shaders import (
+ IncreasingColorShader,
+ IncreasingThicknessShader,
+ )
Operators.select(pyNatureUP1D(Nature.SILHOUETTE))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(pyNatureUP1D(Nature.SILHOUETTE)))
diff --git a/release/scripts/freestyle/styles/near_lines.py b/release/scripts/freestyle/styles/near_lines.py
index 977b99546bc..3ae2e093041 100644
--- a/release/scripts/freestyle/styles/near_lines.py
+++ b/release/scripts/freestyle/styles/near_lines.py
@@ -22,10 +22,21 @@
# Purpose : Draws the lines that are "closer" than a threshold
# (between 0 and 1)
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
- IntegrationType, Operators, QuantitativeInvisibilityUP1D, TextureAssignerShader, TrueUP1D
-from PredicatesU1D import pyZSmallerUP1D
-from logical_operators import AndUP1D, NotUP1D
+from freestyle import Operators
+from freestyle.types import IntegrationType
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ AndUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ pyZSmallerUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ TextureAssignerShader,
+ )
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyZSmallerUP1D(0.5, IntegrationType.MEAN))
Operators.select(upred)
diff --git a/release/scripts/freestyle/styles/occluded_by_specific_object.py b/release/scripts/freestyle/styles/occluded_by_specific_object.py
index 0ae0804f2a8..89ef8692be5 100644
--- a/release/scripts/freestyle/styles/occluded_by_specific_object.py
+++ b/release/scripts/freestyle/styles/occluded_by_specific_object.py
@@ -21,10 +21,21 @@
# Date : 04/08/2005
# Purpose : Draws only the lines that are occluded by a given object
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
- Id, Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
-from PredicatesU1D import pyIsInOccludersListUP1D
-from logical_operators import AndUP1D, NotUP1D
+from freestyle import Operators
+from freestyle.types import Id
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ AndUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ pyIsInOccludersListUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ )
## the id of the occluder (use SHIFT+click on the ViewMap to
## retrieve ids)
diff --git a/release/scripts/freestyle/styles/polygonalize.py b/release/scripts/freestyle/styles/polygonalize.py
index e570e15ca6c..7291f145047 100644
--- a/release/scripts/freestyle/styles/polygonalize.py
+++ b/release/scripts/freestyle/styles/polygonalize.py
@@ -21,9 +21,19 @@
# Date : 04/08/2005
# Purpose : Make the strokes more "polygonal"
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
- Operators, PolygonalizationShader, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ PolygonalizationShader,
+ SamplingShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/qi0.py b/release/scripts/freestyle/styles/qi0.py
index 8386817754a..41fd251c5d9 100644
--- a/release/scripts/freestyle/styles/qi0.py
+++ b/release/scripts/freestyle/styles/qi0.py
@@ -22,9 +22,18 @@
# Purpose : Draws the visible lines (chaining follows same nature lines)
# (most basic style module)
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/qi0_not_external_contour.py b/release/scripts/freestyle/styles/qi0_not_external_contour.py
index 6315f1291d4..9486f01d0e8 100644
--- a/release/scripts/freestyle/styles/qi0_not_external_contour.py
+++ b/release/scripts/freestyle/styles/qi0_not_external_contour.py
@@ -22,10 +22,23 @@
# Purpose : Draws the visible lines (chaining follows same nature lines)
# that do not belong to the external contour of the scene
-from freestyle import BackboneStretcherShader, ChainSilhouetteIterator, ExternalContourUP1D, \
- IncreasingColorShader, IncreasingThicknessShader, Operators, QuantitativeInvisibilityUP1D, \
- SamplingShader, SpatialNoiseShader, TextureAssignerShader, TrueUP1D
-from logical_operators import AndUP1D, NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ AndUP1D,
+ ExternalContourUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ BackboneStretcherShader,
+ IncreasingColorShader,
+ IncreasingThicknessShader,
+ SamplingShader,
+ SpatialNoiseShader,
+ TextureAssignerShader,
+ )
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
Operators.select(upred)
diff --git a/release/scripts/freestyle/styles/qi1.py b/release/scripts/freestyle/styles/qi1.py
index d5424b37748..cae086cd73e 100644
--- a/release/scripts/freestyle/styles/qi1.py
+++ b/release/scripts/freestyle/styles/qi1.py
@@ -23,9 +23,18 @@
# *** Quantitative Invisibility must have been
# enabled in the options dialog to use this style module ****
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(1))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(1)))
diff --git a/release/scripts/freestyle/styles/qi2.py b/release/scripts/freestyle/styles/qi2.py
index 367139de2e2..7375e80dd72 100644
--- a/release/scripts/freestyle/styles/qi2.py
+++ b/release/scripts/freestyle/styles/qi2.py
@@ -23,9 +23,18 @@
# *** Quantitative Invisibility must have been
# enabled in the options dialog to use this style module ****
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(2))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(2)))
diff --git a/release/scripts/freestyle/styles/sequentialsplit_sketchy.py b/release/scripts/freestyle/styles/sequentialsplit_sketchy.py
index 755098d96b6..6f1e93953dd 100644
--- a/release/scripts/freestyle/styles/sequentialsplit_sketchy.py
+++ b/release/scripts/freestyle/styles/sequentialsplit_sketchy.py
@@ -23,10 +23,22 @@
# predicates to specify respectively the starting and
# the stopping extremities for strokes
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, IncreasingThicknessShader, Nature, \
- Operators, QuantitativeInvisibilityUP1D, SpatialNoiseShader, TextureAssignerShader, TrueUP1D
-from PredicatesU0D import pyBackTVertexUP0D, pyVertexNatureUP0D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.types import Nature
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ pyBackTVertexUP0D,
+ pyVertexNatureUP0D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ IncreasingThicknessShader,
+ SpatialNoiseShader,
+ TextureAssignerShader,
+ )
upred = QuantitativeInvisibilityUP1D(0)
Operators.select(upred)
diff --git a/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py b/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py
index c1cc4361f7f..0e92277ba0f 100644
--- a/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py
+++ b/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py
@@ -23,11 +23,21 @@
# parameterization that covers the complete lines (visible+invisible)
# whereas only the visible portions are actually drawn
-from ChainingIterators import pySketchyChainSilhouetteIterator
-from freestyle import IncreasingColorShader, IncreasingThicknessShader, Operators, \
- QuantitativeInvisibilityUP1D, SamplingShader, SmoothingShader, SpatialNoiseShader, \
- TextureAssignerShader, TrueUP1D
-from shaders import pyHLRShader
+from freestyle import Operators
+from freestyle.chainingiterators import pySketchyChainSilhouetteIterator
+from freestyle.predicates import (
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ IncreasingColorShader,
+ IncreasingThicknessShader,
+ SamplingShader,
+ SmoothingShader,
+ SpatialNoiseShader,
+ TextureAssignerShader,
+ pyHLRShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(pySketchyChainSilhouetteIterator(3, False))
diff --git a/release/scripts/freestyle/styles/sketchy_topology_broken.py b/release/scripts/freestyle/styles/sketchy_topology_broken.py
index 27669d20a4e..9b450f62f1d 100644
--- a/release/scripts/freestyle/styles/sketchy_topology_broken.py
+++ b/release/scripts/freestyle/styles/sketchy_topology_broken.py
@@ -23,11 +23,21 @@
# independantly from the 3D topology of objects,
# and, second, so as to chain several times the same ViewEdge.
-from ChainingIterators import pySketchyChainingIterator
-from freestyle import IncreasingColorShader, IncreasingThicknessShader, Operators, \
- QuantitativeInvisibilityUP1D, SamplingShader, SmoothingShader, SpatialNoiseShader, \
- TextureAssignerShader, TrueUP1D
-from shaders import pyBackboneStretcherNoCuspShader
+from freestyle import Operators
+from freestyle.chainingiterators import pySketchyChainingIterator
+from freestyle.predicates import (
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ IncreasingColorShader,
+ IncreasingThicknessShader,
+ SamplingShader,
+ SmoothingShader,
+ SpatialNoiseShader,
+ TextureAssignerShader,
+ pyBackboneStretcherNoCuspShader
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
## Chain 3 times each ViewEdge indpendantly from the
diff --git a/release/scripts/freestyle/styles/sketchy_topology_preserved.py b/release/scripts/freestyle/styles/sketchy_topology_preserved.py
index 25e593b7c99..07cc615bb2c 100644
--- a/release/scripts/freestyle/styles/sketchy_topology_preserved.py
+++ b/release/scripts/freestyle/styles/sketchy_topology_preserved.py
@@ -23,10 +23,20 @@
# so as to chain several times the same ViewEdge.
# The topology of the objects is preserved
-from ChainingIterators import pySketchyChainSilhouetteIterator
-from freestyle import ConstantColorShader, IncreasingThicknessShader, Operators, \
- QuantitativeInvisibilityUP1D, SamplingShader, SmoothingShader, SpatialNoiseShader, \
- TextureAssignerShader, TrueUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import pySketchyChainSilhouetteIterator
+from freestyle.predicates import (
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ IncreasingThicknessShader,
+ SamplingShader,
+ SmoothingShader,
+ SpatialNoiseShader,
+ TextureAssignerShader,
+ )
upred = QuantitativeInvisibilityUP1D(0)
Operators.select(upred)
diff --git a/release/scripts/freestyle/styles/split_at_highest_2d_curvatures.py b/release/scripts/freestyle/styles/split_at_highest_2d_curvatures.py
index 474183c3810..67b540865d5 100644
--- a/release/scripts/freestyle/styles/split_at_highest_2d_curvatures.py
+++ b/release/scripts/freestyle/styles/split_at_highest_2d_curvatures.py
@@ -22,12 +22,21 @@
# Purpose : Draws the visible lines (chaining follows same nature lines)
# (most basic style module)
-from freestyle import ChainSilhouetteIterator, ConstantThicknessShader, IncreasingColorShader, \
- Operators, QuantitativeInvisibilityUP1D, TextureAssignerShader, TrueUP1D
-from Functions0D import pyInverseCurvature2DAngleF0D
-from PredicatesU0D import pyParameterUP0D
-from PredicatesU1D import pyHigherLengthUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.functions import pyInverseCurvature2DAngleF0D
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ pyHigherLengthUP1D,
+ pyParameterUP0D,
+ )
+from freestyle.shaders import (
+ ConstantThicknessShader,
+ IncreasingColorShader,
+ TextureAssignerShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/split_at_tvertices.py b/release/scripts/freestyle/styles/split_at_tvertices.py
index 70446e0178e..20d9b4ac378 100644
--- a/release/scripts/freestyle/styles/split_at_tvertices.py
+++ b/release/scripts/freestyle/styles/split_at_tvertices.py
@@ -21,10 +21,20 @@
# Date : 04/08/2005
# Purpose : Draws strokes that starts and stops at Tvertices (visible or not)
-from freestyle import ChainSilhouetteIterator, ConstantThicknessShader, IncreasingColorShader, \
- Nature, Operators, QuantitativeInvisibilityUP1D, TextureAssignerShader, TrueUP1D
-from PredicatesU0D import pyVertexNatureUP0D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.types import Nature
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ pyVertexNatureUP0D,
+ )
+from freestyle.shaders import (
+ ConstantThicknessShader,
+ IncreasingColorShader,
+ TextureAssignerShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/stroke_texture.py b/release/scripts/freestyle/styles/stroke_texture.py
index c925633b579..046b7c18696 100644
--- a/release/scripts/freestyle/styles/stroke_texture.py
+++ b/release/scripts/freestyle/styles/stroke_texture.py
@@ -21,10 +21,21 @@
# Date : 04/08/2005
# Purpose : Draws textured strokes (illustrate the StrokeTextureShader shader)
-from freestyle import BezierCurveShader, ChainSilhouetteIterator, ConstantColorShader, \
- ConstantThicknessShader, Operators, QuantitativeInvisibilityUP1D, SamplingShader, \
- Stroke, StrokeTextureShader, TrueUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.types import Stroke
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ BezierCurveShader,
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ StrokeTextureShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/suggestive.py b/release/scripts/freestyle/styles/suggestive.py
index bb5e20f2a2e..e6559b28294 100644
--- a/release/scripts/freestyle/styles/suggestive.py
+++ b/release/scripts/freestyle/styles/suggestive.py
@@ -23,10 +23,20 @@
# ***** The suggestive contours must be enabled
# in the options dialog *****
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, IncreasingThicknessShader, \
- Nature, Operators, QuantitativeInvisibilityUP1D, TrueUP1D
-from PredicatesU1D import pyNatureUP1D
-from logical_operators import AndUP1D, NotUP1D
+from freestyle import Operators
+from freestyle.types import Nature
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ AndUP1D,
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ pyNatureUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ IncreasingThicknessShader,
+ )
upred = AndUP1D(pyNatureUP1D(Nature.SUGGESTIVE_CONTOUR), QuantitativeInvisibilityUP1D(0))
Operators.select(upred)
diff --git a/release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py b/release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py
index 20c8240b3cd..c7b2d352e59 100644
--- a/release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py
+++ b/release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py
@@ -21,10 +21,19 @@
# Date : 04/08/2005
# Purpose : Assigns to strokes a thickness that depends on the depth discontinuity
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
-from logical_operators import NotUP1D
-from shaders import pyDepthDiscontinuityThicknessShader
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ pyDepthDiscontinuityThicknessShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/tipremover.py b/release/scripts/freestyle/styles/tipremover.py
index efcddb7321f..a80679fa991 100644
--- a/release/scripts/freestyle/styles/tipremover.py
+++ b/release/scripts/freestyle/styles/tipremover.py
@@ -21,9 +21,19 @@
# Date : 04/08/2005
# Purpose : Removes strokes extremities
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, TipRemoverShader, TrueUP1D
-from logical_operators import NotUP1D
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ TipRemoverShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/tvertex_remover.py b/release/scripts/freestyle/styles/tvertex_remover.py
index 565962c1b0e..113f20a8fd3 100644
--- a/release/scripts/freestyle/styles/tvertex_remover.py
+++ b/release/scripts/freestyle/styles/tvertex_remover.py
@@ -21,10 +21,19 @@
# Date : 04/08/2005
# Purpose : Removes TVertices
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, IncreasingThicknessShader, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, TrueUP1D
-from logical_operators import NotUP1D
-from shaders import pyTVertexRemoverShader
+from freestyle import Operators
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ NotUP1D,
+ QuantitativeInvisibilityUP1D,
+ TrueUP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ IncreasingThicknessShader,
+ SamplingShader,
+ pyTVertexRemoverShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
diff --git a/release/scripts/freestyle/styles/uniformpruning_zsort.py b/release/scripts/freestyle/styles/uniformpruning_zsort.py
index efa977ccf5f..10a4d5ff144 100644
--- a/release/scripts/freestyle/styles/uniformpruning_zsort.py
+++ b/release/scripts/freestyle/styles/uniformpruning_zsort.py
@@ -20,10 +20,20 @@
# Authors : Fredo Durand, Stephane Grabli, Francois Sillion, Emmanuel Turquin
# Date : 08/04/2005
-from freestyle import ChainSilhouetteIterator, ConstantColorShader, ConstantThicknessShader, IntegrationType, \
- Operators, QuantitativeInvisibilityUP1D, SamplingShader, Stroke, StrokeTextureShader
-from PredicatesB1D import pyZBP1D
-from PredicatesU1D import pyDensityUP1D
+from freestyle import Operators
+from freestyle.types import IntegrationType, Stroke
+from freestyle.chainingiterators import ChainSilhouetteIterator
+from freestyle.predicates import (
+ QuantitativeInvisibilityUP1D,
+ pyDensityUP1D,
+ pyZBP1D,
+ )
+from freestyle.shaders import (
+ ConstantColorShader,
+ ConstantThicknessShader,
+ SamplingShader,
+ StrokeTextureShader,
+ )
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator())