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:
Diffstat (limited to 'release/scripts/freestyle')
-rw-r--r--release/scripts/freestyle/modules/freestyle/__init__.py1
-rw-r--r--release/scripts/freestyle/modules/freestyle/types.py3
-rw-r--r--release/scripts/freestyle/modules/parameter_editor.py2
-rw-r--r--release/scripts/freestyle/styles/anisotropic_diffusion.py5
-rw-r--r--release/scripts/freestyle/styles/apriori_and_causal_density.py3
-rw-r--r--release/scripts/freestyle/styles/apriori_density.py3
-rw-r--r--release/scripts/freestyle/styles/backbone_stretcher.py3
-rw-r--r--release/scripts/freestyle/styles/blueprint_circles.py3
-rw-r--r--release/scripts/freestyle/styles/blueprint_ellipses.py3
-rw-r--r--release/scripts/freestyle/styles/blueprint_squares.py3
-rw-r--r--release/scripts/freestyle/styles/cartoon.py3
-rw-r--r--release/scripts/freestyle/styles/contour.py3
-rw-r--r--release/scripts/freestyle/styles/curvature2d.py4
-rw-r--r--release/scripts/freestyle/styles/external_contour.py3
-rw-r--r--release/scripts/freestyle/styles/external_contour_sketchy.py3
-rw-r--r--release/scripts/freestyle/styles/external_contour_smooth.py3
-rw-r--r--release/scripts/freestyle/styles/haloing.py4
-rw-r--r--release/scripts/freestyle/styles/ignore_small_occlusions.py3
-rw-r--r--release/scripts/freestyle/styles/invisible_lines.py3
-rw-r--r--release/scripts/freestyle/styles/japanese_bigbrush.py4
-rw-r--r--release/scripts/freestyle/styles/long_anisotropically_dense.py4
-rw-r--r--release/scripts/freestyle/styles/multiple_parameterization.py3
-rw-r--r--release/scripts/freestyle/styles/nature.py4
-rw-r--r--release/scripts/freestyle/styles/near_lines.py4
-rw-r--r--release/scripts/freestyle/styles/occluded_by_specific_object.py4
-rw-r--r--release/scripts/freestyle/styles/polygonalize.py3
-rw-r--r--release/scripts/freestyle/styles/qi0.py3
-rw-r--r--release/scripts/freestyle/styles/qi0_not_external_contour.py3
-rw-r--r--release/scripts/freestyle/styles/qi1.py3
-rw-r--r--release/scripts/freestyle/styles/qi2.py3
-rw-r--r--release/scripts/freestyle/styles/sequentialsplit_sketchy.py4
-rw-r--r--release/scripts/freestyle/styles/sketchy_multiple_parameterization.py3
-rw-r--r--release/scripts/freestyle/styles/sketchy_topology_broken.py3
-rw-r--r--release/scripts/freestyle/styles/sketchy_topology_preserved.py3
-rw-r--r--release/scripts/freestyle/styles/split_at_highest_2d_curvatures.py3
-rw-r--r--release/scripts/freestyle/styles/split_at_tvertices.py4
-rw-r--r--release/scripts/freestyle/styles/stroke_texture.py4
-rw-r--r--release/scripts/freestyle/styles/suggestive.py4
-rw-r--r--release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py3
-rw-r--r--release/scripts/freestyle/styles/tipremover.py3
-rw-r--r--release/scripts/freestyle/styles/tvertex_remover.py3
-rw-r--r--release/scripts/freestyle/styles/uniformpruning_zsort.py4
42 files changed, 81 insertions, 56 deletions
diff --git a/release/scripts/freestyle/modules/freestyle/__init__.py b/release/scripts/freestyle/modules/freestyle/__init__.py
index dc98a2660ad..5874488f684 100644
--- a/release/scripts/freestyle/modules/freestyle/__init__.py
+++ b/release/scripts/freestyle/modules/freestyle/__init__.py
@@ -21,5 +21,4 @@ Top-level module containing all Freestyle stylization constructs
"""
# module members
-from _freestyle import Operators
from . import chainingiterators, functions, predicates, shaders, types, utils
diff --git a/release/scripts/freestyle/modules/freestyle/types.py b/release/scripts/freestyle/modules/freestyle/types.py
index 8fdacf14c23..470b7ae14d6 100644
--- a/release/scripts/freestyle/modules/freestyle/types.py
+++ b/release/scripts/freestyle/modules/freestyle/types.py
@@ -45,12 +45,13 @@ from _freestyle import (
Nature,
Noise,
NonTVertex,
+ Operators,
SShape,
SVertex,
SVertexIterator,
Stroke,
- StrokeShader,
StrokeAttribute,
+ StrokeShader,
StrokeVertex,
StrokeVertexIterator,
TVertex,
diff --git a/release/scripts/freestyle/modules/parameter_editor.py b/release/scripts/freestyle/modules/parameter_editor.py
index 8065cfe5c12..80a8740145f 100644
--- a/release/scripts/freestyle/modules/parameter_editor.py
+++ b/release/scripts/freestyle/modules/parameter_editor.py
@@ -21,12 +21,12 @@
# Date : 26/07/2010
# Purpose : Interactive manipulation of stylization parameters
-from freestyle import Operators
from freestyle.types import (
BinaryPredicate1D,
Interface0DIterator,
Nature,
Noise,
+ Operators,
StrokeAttribute,
UnaryPredicate0D,
UnaryPredicate1D,
diff --git a/release/scripts/freestyle/styles/anisotropic_diffusion.py b/release/scripts/freestyle/styles/anisotropic_diffusion.py
index 95eb2793210..f241f72fefe 100644
--- a/release/scripts/freestyle/styles/anisotropic_diffusion.py
+++ b/release/scripts/freestyle/styles/anisotropic_diffusion.py
@@ -21,13 +21,12 @@
# Date : 12/08/2004
# Purpose : Smoothes lines using an anisotropic diffusion scheme
-from freestyle import Operators
-from freestyle.types import Stroke
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
ExternalContourUP1D,
NotUP1D,
+ Operators,
QuantitativeInvisibilityUP1D,
TrueBP1D,
TrueUP1D,
@@ -39,6 +38,8 @@ from freestyle.shaders import (
StrokeTextureShader,
pyDiffusion2Shader,
)
+from freestyle.types import Operators, Stroke
+
# 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 b834cd30052..2ba768af835 100644
--- a/release/scripts/freestyle/styles/apriori_and_causal_density.py
+++ b/release/scripts/freestyle/styles/apriori_and_causal_density.py
@@ -23,8 +23,6 @@
# subjects them to the causal density so as to avoid
# cluttering
-from freestyle import Operators
-from freestyle.types import IntegrationType
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
@@ -38,6 +36,7 @@ from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
)
+from freestyle.types import IntegrationType, Operators
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 a247f5f6bac..22f924d8e98 100644
--- a/release/scripts/freestyle/styles/apriori_density.py
+++ b/release/scripts/freestyle/styles/apriori_density.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Draws lines having a high a priori density
-from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
@@ -35,6 +34,8 @@ from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
)
+from freestyle.types import Operators
+
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 9ab49b6d7db..3eb921ddb34 100644
--- a/release/scripts/freestyle/styles/backbone_stretcher.py
+++ b/release/scripts/freestyle/styles/backbone_stretcher.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Stretches the geometry of visible lines
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -33,6 +32,8 @@ from freestyle.shaders import (
ConstantColorShader,
TextureAssignerShader,
)
+from freestyle.types import Operators
+
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 254649d85b4..aade164698a 100644
--- a/release/scripts/freestyle/styles/blueprint_circles.py
+++ b/release/scripts/freestyle/styles/blueprint_circles.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Produces a blueprint using circular contour strokes
-from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
@@ -39,6 +38,8 @@ from freestyle.shaders import (
pyBluePrintCirclesShader,
pyPerlinNoise1DShader,
)
+from freestyle.types import Operators
+
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 d14ff8711c6..d0bd0c45c6c 100644
--- a/release/scripts/freestyle/styles/blueprint_ellipses.py
+++ b/release/scripts/freestyle/styles/blueprint_ellipses.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Produces a blueprint using elliptic contour strokes
-from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
@@ -39,6 +38,8 @@ from freestyle.shaders import (
pyBluePrintEllipsesShader,
pyPerlinNoise1DShader,
)
+from freestyle.types import Operators
+
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 ba1bdb5d6bf..82ab6a80dd7 100644
--- a/release/scripts/freestyle/styles/blueprint_squares.py
+++ b/release/scripts/freestyle/styles/blueprint_squares.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Produces a blueprint using square contour strokes
-from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
@@ -39,6 +38,8 @@ from freestyle.shaders import (
pyBluePrintSquaresShader,
pyPerlinNoise1DShader,
)
+from freestyle.types import Operators
+
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
bpred = SameShapeIdBP1D()
diff --git a/release/scripts/freestyle/styles/cartoon.py b/release/scripts/freestyle/styles/cartoon.py
index 4118b4e1552..2e2962cefe5 100644
--- a/release/scripts/freestyle/styles/cartoon.py
+++ b/release/scripts/freestyle/styles/cartoon.py
@@ -23,7 +23,6 @@
# infered from each object's material in a cartoon-like
# fashion.
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -35,6 +34,8 @@ from freestyle.shaders import (
ConstantThicknessShader,
pyMaterialColorShader,
)
+from freestyle.types import Operators
+
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 3d754cc63cf..c57d7d0d23a 100644
--- a/release/scripts/freestyle/styles/contour.py
+++ b/release/scripts/freestyle/styles/contour.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Draws each object's visible contour
-from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
@@ -35,6 +34,8 @@ from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
)
+from freestyle.types import Operators
+
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 8f8292e663c..66c8a6c6544 100644
--- a/release/scripts/freestyle/styles/curvature2d.py
+++ b/release/scripts/freestyle/styles/curvature2d.py
@@ -22,8 +22,6 @@
# Purpose : The stroke points are colored in gray levels and depending
# on the 2d curvature value
-from freestyle import Operators
-from freestyle.types import Stroke
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -35,6 +33,8 @@ from freestyle.shaders import (
StrokeTextureShader,
py2DCurvatureColorShader,
)
+from freestyle.types import Operators, Stroke
+
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 7556332fdf1..4d6c751cbfe 100644
--- a/release/scripts/freestyle/styles/external_contour.py
+++ b/release/scripts/freestyle/styles/external_contour.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Draws the external contour of the scene
-from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
@@ -35,6 +34,8 @@ from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
)
+from freestyle.types import Operators
+
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 2163ce4d52c..6a7a2333bb5 100644
--- a/release/scripts/freestyle/styles/external_contour_sketchy.py
+++ b/release/scripts/freestyle/styles/external_contour_sketchy.py
@@ -23,7 +23,6 @@
# chaining iterator (in particular each ViewEdge can be drawn
# several times
-from freestyle import Operators
from freestyle.chainingiterators import pySketchyChainingIterator
from freestyle.predicates import (
AndUP1D,
@@ -40,6 +39,8 @@ from freestyle.shaders import (
SpatialNoiseShader,
TextureAssignerShader,
)
+from freestyle.types import Operators
+
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ExternalContourUP1D())
Operators.select(upred)
diff --git a/release/scripts/freestyle/styles/external_contour_smooth.py b/release/scripts/freestyle/styles/external_contour_smooth.py
index b67193cb127..6cd73326a71 100644
--- a/release/scripts/freestyle/styles/external_contour_smooth.py
+++ b/release/scripts/freestyle/styles/external_contour_smooth.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Draws a smooth external contour
-from freestyle import Operators
from freestyle.chainingiterators import ChainPredicateIterator
from freestyle.predicates import (
AndUP1D,
@@ -37,6 +36,8 @@ from freestyle.shaders import (
SamplingShader,
SmoothingShader,
)
+from freestyle.types import Operators
+
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 5d162436b7f..6cd37779a42 100644
--- a/release/scripts/freestyle/styles/haloing.py
+++ b/release/scripts/freestyle/styles/haloing.py
@@ -24,8 +24,6 @@
# object and trims them in order to produce
# a haloing effect around the target shape
-from freestyle import Operators
-from freestyle.types import Id
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
AndUP1D,
@@ -41,6 +39,8 @@ from freestyle.shaders import (
TipRemoverShader,
pyTVertexRemoverShader,
)
+from freestyle.types import Id, Operators
+
# 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 86bcc2c2a5c..a01e9e5574f 100644
--- a/release/scripts/freestyle/styles/ignore_small_occlusions.py
+++ b/release/scripts/freestyle/styles/ignore_small_occlusions.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : The strokes are drawn through small occlusions
-from freestyle import Operators
from freestyle.chainingiterators import pyFillOcclusionsAbsoluteChainingIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
@@ -32,6 +31,8 @@ from freestyle.shaders import (
ConstantThicknessShader,
SamplingShader,
)
+from freestyle.types import Operators
+
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 fd038b6f715..461429b6437 100644
--- a/release/scripts/freestyle/styles/invisible_lines.py
+++ b/release/scripts/freestyle/styles/invisible_lines.py
@@ -22,7 +22,6 @@
# Purpose : Draws all lines whose Quantitative Invisibility
# is different from 0
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -34,6 +33,8 @@ from freestyle.shaders import (
ConstantThicknessShader,
SamplingShader,
)
+from freestyle.types import Operators
+
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 71aeb960287..80afeff48d0 100644
--- a/release/scripts/freestyle/styles/japanese_bigbrush.py
+++ b/release/scripts/freestyle/styles/japanese_bigbrush.py
@@ -21,8 +21,6 @@
# Date : 04/08/2005
# Purpose : Simulates a big brush fr oriental painting
-from freestyle import Operators
-from freestyle.types import IntegrationType
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.functions import pyInverseCurvature2DAngleF0D
from freestyle.predicates import (
@@ -44,6 +42,8 @@ from freestyle.shaders import (
pyNonLinearVaryingThicknessShader,
pySamplingShader,
)
+from freestyle.types import IntegrationType, Operators
+
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 ca729562c2d..890696d7779 100644
--- a/release/scripts/freestyle/styles/long_anisotropically_dense.py
+++ b/release/scripts/freestyle/styles/long_anisotropically_dense.py
@@ -28,8 +28,6 @@
# ******** The Directional a priori density maps must ******
# ******** have been computed prior to using this style module ******
-from freestyle import Operators
-from freestyle.types import IntegrationType
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.functions import DensityF1D
from freestyle.predicates import (
@@ -45,6 +43,8 @@ from freestyle.shaders import (
ConstantThicknessShader,
SamplingShader,
)
+from freestyle.types import IntegrationType, Operators
+
## 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 da140c75147..482d8bd94f7 100644
--- a/release/scripts/freestyle/styles/multiple_parameterization.py
+++ b/release/scripts/freestyle/styles/multiple_parameterization.py
@@ -27,7 +27,6 @@
# the strokes using a second parameterization that only
# covers the visible portions.
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
@@ -41,6 +40,8 @@ from freestyle.shaders import (
TextureAssignerShader,
pyHLRShader,
)
+from freestyle.types import Operators
+
Operators.select(QuantitativeInvisibilityUP1D(0))
## Chain following the same nature, but without the restriction
diff --git a/release/scripts/freestyle/styles/nature.py b/release/scripts/freestyle/styles/nature.py
index 35b57399942..74a42e6b2e5 100644
--- a/release/scripts/freestyle/styles/nature.py
+++ b/release/scripts/freestyle/styles/nature.py
@@ -25,8 +25,6 @@
# The suggestive contours must have been enabled in the
# options dialog to appear in the View Map.
-from freestyle import Operators
-from freestyle.types import Nature
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -37,6 +35,8 @@ from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
)
+from freestyle.types import Operators, Nature
+
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 3ae2e093041..b91eaea4023 100644
--- a/release/scripts/freestyle/styles/near_lines.py
+++ b/release/scripts/freestyle/styles/near_lines.py
@@ -22,8 +22,6 @@
# Purpose : Draws the lines that are "closer" than a threshold
# (between 0 and 1)
-from freestyle import Operators
-from freestyle.types import IntegrationType
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
AndUP1D,
@@ -37,6 +35,8 @@ from freestyle.shaders import (
ConstantThicknessShader,
TextureAssignerShader,
)
+from freestyle.types import IntegrationType, Operators
+
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 89ef8692be5..d6f85aed0ac 100644
--- a/release/scripts/freestyle/styles/occluded_by_specific_object.py
+++ b/release/scripts/freestyle/styles/occluded_by_specific_object.py
@@ -21,8 +21,6 @@
# Date : 04/08/2005
# Purpose : Draws only the lines that are occluded by a given object
-from freestyle import Operators
-from freestyle.types import Id
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
AndUP1D,
@@ -36,6 +34,8 @@ from freestyle.shaders import (
ConstantThicknessShader,
SamplingShader,
)
+from freestyle.types import Id, Operators
+
## 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 7291f145047..8eb6e5d56ee 100644
--- a/release/scripts/freestyle/styles/polygonalize.py
+++ b/release/scripts/freestyle/styles/polygonalize.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Make the strokes more "polygonal"
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -34,6 +33,8 @@ from freestyle.shaders import (
PolygonalizationShader,
SamplingShader,
)
+from freestyle.types import Operators
+
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 41fd251c5d9..53840f25e0f 100644
--- a/release/scripts/freestyle/styles/qi0.py
+++ b/release/scripts/freestyle/styles/qi0.py
@@ -22,7 +22,6 @@
# Purpose : Draws the visible lines (chaining follows same nature lines)
# (most basic style module)
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -34,6 +33,8 @@ from freestyle.shaders import (
ConstantThicknessShader,
SamplingShader,
)
+from freestyle.types import Operators
+
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 9486f01d0e8..fb3e3279b6c 100644
--- a/release/scripts/freestyle/styles/qi0_not_external_contour.py
+++ b/release/scripts/freestyle/styles/qi0_not_external_contour.py
@@ -22,7 +22,6 @@
# Purpose : Draws the visible lines (chaining follows same nature lines)
# that do not belong to the external contour of the scene
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
AndUP1D,
@@ -39,6 +38,8 @@ from freestyle.shaders import (
SpatialNoiseShader,
TextureAssignerShader,
)
+from freestyle.types import Operators
+
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 cae086cd73e..d70e56d401a 100644
--- a/release/scripts/freestyle/styles/qi1.py
+++ b/release/scripts/freestyle/styles/qi1.py
@@ -23,7 +23,6 @@
# *** Quantitative Invisibility must have been
# enabled in the options dialog to use this style module ****
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -35,6 +34,8 @@ from freestyle.shaders import (
ConstantThicknessShader,
SamplingShader,
)
+from freestyle.types import Operators
+
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 7375e80dd72..6ac933ecc05 100644
--- a/release/scripts/freestyle/styles/qi2.py
+++ b/release/scripts/freestyle/styles/qi2.py
@@ -23,7 +23,6 @@
# *** Quantitative Invisibility must have been
# enabled in the options dialog to use this style module ****
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -35,6 +34,8 @@ from freestyle.shaders import (
ConstantThicknessShader,
SamplingShader,
)
+from freestyle.types import Operators
+
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 6f1e93953dd..e97e8f6da39 100644
--- a/release/scripts/freestyle/styles/sequentialsplit_sketchy.py
+++ b/release/scripts/freestyle/styles/sequentialsplit_sketchy.py
@@ -23,8 +23,6 @@
# predicates to specify respectively the starting and
# the stopping extremities for strokes
-from freestyle import Operators
-from freestyle.types import Nature
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -39,6 +37,8 @@ from freestyle.shaders import (
SpatialNoiseShader,
TextureAssignerShader,
)
+from freestyle.types import Nature, Operators
+
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 0e92277ba0f..0beb6e37c21 100644
--- a/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py
+++ b/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py
@@ -23,7 +23,6 @@
# parameterization that covers the complete lines (visible+invisible)
# whereas only the visible portions are actually drawn
-from freestyle import Operators
from freestyle.chainingiterators import pySketchyChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
@@ -38,6 +37,8 @@ from freestyle.shaders import (
TextureAssignerShader,
pyHLRShader,
)
+from freestyle.types import Operators
+
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 9b450f62f1d..671bc2b1592 100644
--- a/release/scripts/freestyle/styles/sketchy_topology_broken.py
+++ b/release/scripts/freestyle/styles/sketchy_topology_broken.py
@@ -23,7 +23,6 @@
# independantly from the 3D topology of objects,
# and, second, so as to chain several times the same ViewEdge.
-from freestyle import Operators
from freestyle.chainingiterators import pySketchyChainingIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
@@ -38,6 +37,8 @@ from freestyle.shaders import (
TextureAssignerShader,
pyBackboneStretcherNoCuspShader
)
+from freestyle.types import Operators
+
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 07cc615bb2c..161654f1f97 100644
--- a/release/scripts/freestyle/styles/sketchy_topology_preserved.py
+++ b/release/scripts/freestyle/styles/sketchy_topology_preserved.py
@@ -23,7 +23,6 @@
# so as to chain several times the same ViewEdge.
# The topology of the objects is preserved
-from freestyle import Operators
from freestyle.chainingiterators import pySketchyChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
@@ -37,6 +36,8 @@ from freestyle.shaders import (
SpatialNoiseShader,
TextureAssignerShader,
)
+from freestyle.types import Operators
+
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 67b540865d5..3bfdb05a2db 100644
--- a/release/scripts/freestyle/styles/split_at_highest_2d_curvatures.py
+++ b/release/scripts/freestyle/styles/split_at_highest_2d_curvatures.py
@@ -22,7 +22,6 @@
# Purpose : Draws the visible lines (chaining follows same nature lines)
# (most basic style module)
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.functions import pyInverseCurvature2DAngleF0D
from freestyle.predicates import (
@@ -37,6 +36,8 @@ from freestyle.shaders import (
IncreasingColorShader,
TextureAssignerShader,
)
+from freestyle.types import Operators
+
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 20d9b4ac378..213922a03b1 100644
--- a/release/scripts/freestyle/styles/split_at_tvertices.py
+++ b/release/scripts/freestyle/styles/split_at_tvertices.py
@@ -21,8 +21,6 @@
# Date : 04/08/2005
# Purpose : Draws strokes that starts and stops at Tvertices (visible or not)
-from freestyle import Operators
-from freestyle.types import Nature
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -35,6 +33,8 @@ from freestyle.shaders import (
IncreasingColorShader,
TextureAssignerShader,
)
+from freestyle.types import Nature, Operators
+
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 046b7c18696..614c34a6654 100644
--- a/release/scripts/freestyle/styles/stroke_texture.py
+++ b/release/scripts/freestyle/styles/stroke_texture.py
@@ -21,8 +21,6 @@
# Date : 04/08/2005
# Purpose : Draws textured strokes (illustrate the StrokeTextureShader shader)
-from freestyle import Operators
-from freestyle.types import Stroke
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -36,6 +34,8 @@ from freestyle.shaders import (
SamplingShader,
StrokeTextureShader,
)
+from freestyle.types import Operators, Stroke
+
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 e6559b28294..8a97cc0139b 100644
--- a/release/scripts/freestyle/styles/suggestive.py
+++ b/release/scripts/freestyle/styles/suggestive.py
@@ -23,8 +23,6 @@
# ***** The suggestive contours must be enabled
# in the options dialog *****
-from freestyle import Operators
-from freestyle.types import Nature
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
AndUP1D,
@@ -37,6 +35,8 @@ from freestyle.shaders import (
ConstantColorShader,
IncreasingThicknessShader,
)
+from freestyle.types import Nature, Operators
+
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 c7b2d352e59..25c196d4919 100644
--- a/release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py
+++ b/release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Assigns to strokes a thickness that depends on the depth discontinuity
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -34,6 +33,8 @@ from freestyle.shaders import (
SamplingShader,
pyDepthDiscontinuityThicknessShader,
)
+from freestyle.types import Operators
+
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 a80679fa991..bb070b11464 100644
--- a/release/scripts/freestyle/styles/tipremover.py
+++ b/release/scripts/freestyle/styles/tipremover.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Removes strokes extremities
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -34,6 +33,8 @@ from freestyle.shaders import (
SamplingShader,
TipRemoverShader,
)
+from freestyle.types import Operators
+
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 113f20a8fd3..d05e4dfc375 100644
--- a/release/scripts/freestyle/styles/tvertex_remover.py
+++ b/release/scripts/freestyle/styles/tvertex_remover.py
@@ -21,7 +21,6 @@
# Date : 04/08/2005
# Purpose : Removes TVertices
-from freestyle import Operators
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
@@ -34,6 +33,8 @@ from freestyle.shaders import (
SamplingShader,
pyTVertexRemoverShader,
)
+from freestyle.types import Operators
+
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 10a4d5ff144..29b634b765b 100644
--- a/release/scripts/freestyle/styles/uniformpruning_zsort.py
+++ b/release/scripts/freestyle/styles/uniformpruning_zsort.py
@@ -20,8 +20,6 @@
# Authors : Fredo Durand, Stephane Grabli, Francois Sillion, Emmanuel Turquin
# Date : 08/04/2005
-from freestyle import Operators
-from freestyle.types import IntegrationType, Stroke
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
@@ -34,6 +32,8 @@ from freestyle.shaders import (
SamplingShader,
StrokeTextureShader,
)
+from freestyle.types import IntegrationType, Operators, Stroke
+
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator())