Updated Freestyle API modules according to the new hierarchical package structure.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sun, 24 Nov 2013 22:18:38 +0000 (22:18 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Tue, 28 Jan 2014 14:33:58 +0000 (23:33 +0900)
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.

44 files changed:
release/scripts/freestyle/modules/freestyle/chainingiterators.py
release/scripts/freestyle/modules/freestyle/functions.py
release/scripts/freestyle/modules/freestyle/predicates.py
release/scripts/freestyle/modules/freestyle/shaders.py
release/scripts/freestyle/modules/parameter_editor.py
release/scripts/freestyle/styles/anisotropic_diffusion.py
release/scripts/freestyle/styles/apriori_and_causal_density.py
release/scripts/freestyle/styles/apriori_density.py
release/scripts/freestyle/styles/backbone_stretcher.py
release/scripts/freestyle/styles/blueprint_circles.py
release/scripts/freestyle/styles/blueprint_ellipses.py
release/scripts/freestyle/styles/blueprint_squares.py
release/scripts/freestyle/styles/cartoon.py
release/scripts/freestyle/styles/contour.py
release/scripts/freestyle/styles/curvature2d.py
release/scripts/freestyle/styles/external_contour.py
release/scripts/freestyle/styles/external_contour_sketchy.py
release/scripts/freestyle/styles/external_contour_smooth.py
release/scripts/freestyle/styles/haloing.py
release/scripts/freestyle/styles/ignore_small_occlusions.py
release/scripts/freestyle/styles/invisible_lines.py
release/scripts/freestyle/styles/japanese_bigbrush.py
release/scripts/freestyle/styles/long_anisotropically_dense.py
release/scripts/freestyle/styles/multiple_parameterization.py
release/scripts/freestyle/styles/nature.py
release/scripts/freestyle/styles/near_lines.py
release/scripts/freestyle/styles/occluded_by_specific_object.py
release/scripts/freestyle/styles/polygonalize.py
release/scripts/freestyle/styles/qi0.py
release/scripts/freestyle/styles/qi0_not_external_contour.py
release/scripts/freestyle/styles/qi1.py
release/scripts/freestyle/styles/qi2.py
release/scripts/freestyle/styles/sequentialsplit_sketchy.py
release/scripts/freestyle/styles/sketchy_multiple_parameterization.py
release/scripts/freestyle/styles/sketchy_topology_broken.py
release/scripts/freestyle/styles/sketchy_topology_preserved.py
release/scripts/freestyle/styles/split_at_highest_2d_curvatures.py
release/scripts/freestyle/styles/split_at_tvertices.py
release/scripts/freestyle/styles/stroke_texture.py
release/scripts/freestyle/styles/suggestive.py
release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py
release/scripts/freestyle/styles/tipremover.py
release/scripts/freestyle/styles/tvertex_remover.py
release/scripts/freestyle/styles/uniformpruning_zsort.py

index 1e8c1927432c684f5729a6342612c8e93c24ad17..07ce14495cc3429dde209edc6954bd19bf2df2ac 100644 (file)
@@ -26,6 +26,11 @@ from _freestyle import (
 from freestyle.types import (
     AdjacencyIterator,
     ChainingIterator,
+    Nature,
+    TVertex,
+    )
+from freestyle.predicates import (
+    ExternalContourUP1D,
     )
 from freestyle.utils import ContextFunctions as CF
 import bpy
@@ -283,7 +288,7 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
         self._length = 0
     def traverse(self, iter):
         winner = None
-        winnerOrientation = 0
+        winnerOrientation = False
         #print(self.current_edge.id.first, self.current_edge.id.second)
         it = AdjacencyIterator(iter)
         tvertex = self.next_vertex
@@ -294,9 +299,9 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
                 if ve.id == mateVE.id:
                     winner = ve
                     if not it.is_incoming:
-                        winnerOrientation = 1
+                        winnerOrientation = True
                     else:
-                        winnerOrientation = 0
+                        winnerOrientation = False
                     break
                 it.increment()
         else:
@@ -311,9 +316,9 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
                             count = count+1
                             winner = ve
                             if not it.is_incoming:
-                                winnerOrientation = 1
+                                winnerOrientation = True
                             else:
-                                winnerOrientation = 0
+                                winnerOrientation = False
                         it.increment()
                     if count != 1:
                         winner = None
@@ -328,7 +333,7 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
                 # Did we compute the prospective chain length already ?
                 if self._length == 0:
                     #if not, let's do it
-                    _it = pyChainSilhouetteGenericIterator(0,0)
+                    _it = pyChainSilhouetteGenericIterator(False, False)
                     _it.begin = winner
                     _it.current_edge = winner
                     _it.orientation = winnerOrientation
@@ -354,7 +359,7 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
                 # let's do the comparison:
                 # nw let's compute the length of this connex non selected part:
                 connexl = 0
-                _cit = pyChainSilhouetteGenericIterator(0,0)
+                _cit = pyChainSilhouetteGenericIterator(False, False)
                 _cit.begin = winner
                 _cit.current_edge = winner
                 _cit.orientation = winnerOrientation
@@ -380,7 +385,7 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
         pass
     def traverse(self, iter):
         winner = None
-        winnerOrientation = 0
+        winnerOrientation = False
         #print(self.current_edge.id.first, self.current_edge.id.second)
         it = AdjacencyIterator(iter)
         tvertex = self.next_vertex
@@ -391,9 +396,9 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
                 if ve.id == mateVE.id:
                     winner = ve
                     if not it.is_incoming:
-                        winnerOrientation = 1
+                        winnerOrientation = True
                     else:
-                        winnerOrientation = 0
+                        winnerOrientation = False
                     break
                 it.increment()
         else:
@@ -408,9 +413,9 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
                             count = count+1
                             winner = ve
                             if not it.is_incoming:
-                                winnerOrientation = 1
+                                winnerOrientation = True
                             else:
-                                winnerOrientation = 0
+                                winnerOrientation = False
                         it.increment()
                     if count != 1:
                         winner = None
@@ -421,7 +426,7 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
                 #print("---", winner.id.first, winner.id.second)
                 # nw let's compute the length of this connex non selected part:
                 connexl = 0
-                _cit = pyChainSilhouetteGenericIterator(0,0)
+                _cit = pyChainSilhouetteGenericIterator(False, False)
                 _cit.begin = winner
                 _cit.current_edge = winner
                 _cit.orientation = winnerOrientation
@@ -453,7 +458,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
         self._length = 0
     def traverse(self, iter):
         winner = None
-        winnerOrientation = 0
+        winnerOrientation = False
         #print(self.current_edge.id.first, self.current_edge.id.second)
         it = AdjacencyIterator(iter)
         tvertex = self.next_vertex
@@ -464,9 +469,9 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
                 if ve.id == mateVE.id:
                     winner = ve
                     if not it.is_incoming:
-                        winnerOrientation = 1
+                        winnerOrientation = True
                     else:
-                        winnerOrientation = 0
+                        winnerOrientation = False
                     break
                 it.increment()
         else:
@@ -481,9 +486,9 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
                             count = count+1
                             winner = ve
                             if not it.is_incoming:
-                                winnerOrientation = 1
+                                winnerOrientation = True
                             else:
-                                winnerOrientation = 0
+                                winnerOrientation = False
                         it.increment()
                     if count != 1:
                         winner = None
@@ -498,7 +503,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
                 # Did we compute the prospective chain length already ?
                 if self._length == 0:
                     #if not, let's do it
-                    _it = pyChainSilhouetteGenericIterator(0,0)
+                    _it = pyChainSilhouetteGenericIterator(False, False)
                     _it.begin = winner
                     _it.current_edge = winner
                     _it.orientation = winnerOrientation
@@ -524,7 +529,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
                 # let's do the comparison:
                 # nw let's compute the length of this connex non selected part:
                 connexl = 0
-                _cit = pyChainSilhouetteGenericIterator(0,0)
+                _cit = pyChainSilhouetteGenericIterator(False, False)
                 _cit.begin = winner
                 _cit.current_edge = winner
                 _cit.orientation = winnerOrientation
@@ -556,7 +561,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
         self._length = 0
     def traverse(self, iter):
         winner = None
-        winnerOrientation = 0
+        winnerOrientation = False
         #print(self.current_edge.id.first, self.current_edge.id.second)
         it = AdjacencyIterator(iter)
         tvertex = self.next_vertex
@@ -567,9 +572,9 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
                 if ve.id == mateVE.id:
                     winner = ve
                     if not it.is_incoming:
-                        winnerOrientation = 1
+                        winnerOrientation = True
                     else:
-                        winnerOrientation = 0
+                        winnerOrientation = False
                     break
                 it.increment()
         else:
@@ -584,9 +589,9 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
                             count = count+1
                             winner = ve
                             if not it.is_incoming:
-                                winnerOrientation = 1
+                                winnerOrientation = True
                             else:
-                                winnerOrientation = 0
+                                winnerOrientation = False
                         it.increment()
                     if count != 1:
                         winner = None
@@ -601,7 +606,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
                 # Did we compute the prospective chain length already ?
                 if self._length == 0:
                     #if not, let's do it
-                    _it = pyChainSilhouetteGenericIterator(0,0)
+                    _it = pyChainSilhouetteGenericIterator(False, False)
                     _it.begin = winner
                     _it.current_edge = winner
                     _it.orientation = winnerOrientation
@@ -627,7 +632,7 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
                 # let's do the comparison:
                 # nw let's compute the length of this connex non selected part:
                 connexl = 0
-                _cit = pyChainSilhouetteGenericIterator(0,0)
+                _cit = pyChainSilhouetteGenericIterator(False, False)
                 _cit.begin = winner
                 _cit.current_edge = winner
                 _cit.orientation = winnerOrientation
index 911030c3094e96386a85d3e773fead16ed19b212..3c67c843a7779323ea42247c0ab0e29d51bb55c1 100644 (file)
@@ -73,6 +73,7 @@ from _freestyle import (
 
 # modules for implementing functions
 from freestyle.types import (
+    CurvePoint,
     IntegrationType,
     UnaryFunction0DDouble,
     UnaryFunction0DMaterial,
@@ -80,6 +81,7 @@ from freestyle.types import (
     UnaryFunction1DDouble,
     )
 from freestyle.utils import ContextFunctions as CF
+from freestyle.utils import integrate
 import math
 import mathutils
 
@@ -183,7 +185,7 @@ class pyDensityAnisotropyF1D(UnaryFunction1DDouble):
         self._integration = integrationType
         self._sampling = sampling
     def __call__(self, inter):
-        v = integrate(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration)
+        v = integrate(self._func, inter.points_begin(self._sampling), inter.points_end(self._sampling), self._integration)
         return v
 
 class pyViewMapGradientNormF1D(UnaryFunction1DDouble):
@@ -193,5 +195,5 @@ class pyViewMapGradientNormF1D(UnaryFunction1DDouble):
         self._integration = integrationType
         self._sampling = sampling
     def __call__(self, inter):
-        v = integrate(self._func, inter.pointsBegin(self._sampling), inter.pointsEnd(self._sampling), self._integration)
+        v = integrate(self._func, inter.points_begin(self._sampling), inter.points_end(self._sampling), self._integration)
         return v
index ee6006c0ed4ce35cfbba0a813a3d4a3ac3bff393..236ff6c46b954a12f8fb9c6e9a958291f8270f36 100644 (file)
@@ -39,12 +39,27 @@ from _freestyle import (
 
 # modules for implementing predicates
 from freestyle.types import (
-    IntegrationType,
     BinaryPredicate1D,
+    IntegrationType,
+    Nature,
+    TVertex,
     UnaryPredicate0D,
     UnaryPredicate1D,
     )
 from freestyle.functions import (
+    Curvature2DAngleF0D,
+    CurveNatureF1D,
+    DensityF1D,
+    GetCompleteViewMapDensityF1D,
+    GetCurvilinearAbscissaF0D,
+    GetDirectionalViewMapDensityF1D,
+    GetOccludersF1D,
+    GetProjectedZF1D,
+    GetShapeF1D,
+    GetSteerableViewMapDensityF1D,
+    GetZF1D,
+    QuantitativeInvisibilityF0D,
+    ZDiscontinuityF1D,
     pyCurvilinearLengthF0D,
     pyDensityAnisotropyF1D,
     pyViewMapGradientNormF1D,
index 6b1609be709a076d008dc78ee2518fcf4f4ae5fa..edac96278a9b31f6a6a0be53223a4264f477db83 100644 (file)
@@ -48,8 +48,26 @@ from _freestyle import (
     )
 
 # modules for implementing shaders
-from freestyle.types import StrokeShader
-from freestyle.predicates import pyVertexNatureUP0D
+from freestyle.types import (
+    Interface0DIterator,
+    Nature,
+    Noise,
+    StrokeAttribute,
+    StrokeShader,
+    StrokeVertexIterator,
+    )
+from freestyle.functions import (
+    Curvature2DAngleF0D,
+    DensityF0D,
+    GetProjectedZF0D,
+    MaterialF0D,
+    Normal2DF0D,
+    Orientation2DF1D,
+    ZDiscontinuityF0D,
+    )
+from freestyle.predicates import (
+    pyVertexNatureUP0D,
+    )
 from freestyle.utils import ContextFunctions as CF
 import math
 import mathutils
index dd8a6aa63eefd09038b9be2c3724646b7702ea04..8065cfe5c12a5976b1807aa74476cefadd941c0b 100644 (file)
 #  Date     : 26/07/2010
 #  Purpose  : Interactive manipulation of stylization parameters
 
-import freestyle
+from freestyle import Operators
+from freestyle.types import (
+    BinaryPredicate1D,
+    Interface0DIterator,
+    Nature,
+    Noise,
+    StrokeAttribute,
+    UnaryPredicate0D,
+    UnaryPredicate1D,
+    TVertex,
+    )
+from freestyle.chainingiterators import (
+    ChainPredicateIterator,
+    ChainSilhouetteIterator,
+    pySketchyChainSilhouetteIterator,
+    pySketchyChainingIterator,
+    )
+from freestyle.functions import (
+    Curvature2DAngleF0D,
+    CurveMaterialF0D,
+    Normal2DF0D,
+    QuantitativeInvisibilityF1D,
+    VertexOrientation2DF0D,
+    )
+from freestyle.predicates import (
+    AndUP1D,
+    ContourUP1D,
+    ExternalContourUP1D,
+    FalseBP1D,
+    FalseUP1D,
+    NotUP1D,
+    OrUP1D,
+    QuantitativeInvisibilityUP1D,
+    TrueBP1D,
+    TrueUP1D,
+    WithinImageBoundaryUP1D,
+    pyNatureUP1D,
+    )
+from freestyle.shaders import (
+    BackboneStretcherShader,
+    BezierCurveShader,
+    ConstantColorShader,
+    GuidingLinesShader,
+    PolygonalizationShader,
+    SamplingShader,
+    SpatialNoiseShader,
+    StrokeShader,
+    TipRemoverShader,
+    pyBluePrintCirclesShader,
+    pyBluePrintEllipsesShader,
+    pyBluePrintSquaresShader,
+    )
+from freestyle.utils import (
+    ContextFunctions,
+    getCurrentScene,
+    )
+from _freestyle import (
+    blendRamp,
+    evaluateColorRamp,
+    evaluateCurveMappingF,
+    )
 import math
 import mathutils
 import time
 
-from _freestyle import blendRamp, evaluateColorRamp, evaluateCurveMappingF
-
-from ChainingIterators import pySketchyChainSilhouetteIterator, pySketchyChainingIterator
-from freestyle import BackboneStretcherShader, BezierCurveShader, BinaryPredicate1D, ChainPredicateIterator, \
-    ChainSilhouetteIterator, ConstantColorShader, ContourUP1D, Curvature2DAngleF0D, ExternalContourUP1D, \
-    FalseBP1D, FalseUP1D, GuidingLinesShader, Interface0DIterator, Nature, Noise, Normal2DF0D, Operators, \
-    PolygonalizationShader, QuantitativeInvisibilityF1D, QuantitativeInvisibilityUP1D, SamplingShader, \
-    SpatialNoiseShader, StrokeAttribute, StrokeShader, TipRemoverShader, TrueBP1D, TrueUP1D, UnaryPredicate0D, \
-    UnaryPredicate1D, VertexOrientation2DF0D, WithinImageBoundaryUP1D, ContextFunctions, TVertex
-from Functions0D import CurveMaterialF0D
-from PredicatesU1D import pyNatureUP1D
-from logical_operators import AndUP1D, NotUP1D, OrUP1D
-from shaders import pyBluePrintCirclesShader, pyBluePrintEllipsesShader, pyBluePrintSquaresShader
-
 
 class ColorRampModifier(StrokeShader):
     def __init__(self, blend, influence, ramp):
@@ -49,12 +95,12 @@ class ColorRampModifier(StrokeShader):
         self.__ramp = ramp
 
     def evaluate(self, t):
-        col = freestyle.evaluateColorRamp(self.__ramp, t)
+        col = evaluateColorRamp(self.__ramp, t)
         col = col.xyz  # omit alpha
         return col
 
     def blend_ramp(self, a, b):
-        return freestyle.blendRamp(self.__blend, a, self.__influence, b)
+        return blendRamp(self.__blend, a, self.__influence, b)
 
 
 class ScalarBlendModifier(StrokeShader):
@@ -106,7 +152,7 @@ class CurveMappingModifier(ScalarBlendModifier):
         return t
 
     def CURVE(self, t):
-        return freestyle.evaluateCurveMappingF(self.__curve, 0, t)
+        return evaluateCurveMappingF(self.__curve, 0, t)
 
     def evaluate(self, t):
         return self.__mapping(t)
@@ -114,7 +160,7 @@ class CurveMappingModifier(ScalarBlendModifier):
 
 class ThicknessModifierMixIn:
     def __init__(self):
-        scene = freestyle.getCurrentScene()
+        scene = getCurrentScene()
         self.__persp_camera = (scene.camera.data.type == 'PERSP')
 
     def set_thickness(self, sv, outer, inner):
@@ -312,7 +358,7 @@ class ThicknessDistanceFromCameraShader(ThicknessBlenderMixIn, CurveMappingModif
 # Distance from Object modifiers
 
 def iter_distance_from_object(stroke, object, range_min, range_max):
-    scene = freestyle.getCurrentScene()
+    scene = getCurrentScene()
     mv = scene.camera.matrix_world.copy()  # model-view matrix
     mv.invert()
     loc = mv * object.location  # loc in the camera coordinate
@@ -1114,7 +1160,7 @@ class StrokeCleaner(StrokeShader):
 # main function for parameter processing
 
 def process(layer_name, lineset_name):
-    scene = freestyle.getCurrentScene()
+    scene = getCurrentScene()
     layer = scene.render.layers[layer_name]
     lineset = layer.freestyle_settings.linesets[lineset_name]
     linestyle = lineset.linestyle
index 274381a9a89a6a70b4c6319acf9424aa192614b8..95eb2793210a4f2cb42a5e0490a7dbd987d42f46 100644 (file)
 #  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
index 501c5169be9fe1982e815a405658f4c99de4c625..b834cd300522fcbd8d7117f34977402f147db7af 100644 (file)
 #             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)
index f59dd5cd36d42290554602620a0676d83b473dbf..a247f5f6bac083b94be8195ee23f0b39509ec4df 100644 (file)
 #  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()
index c920d66328e5af2b6d0023d86223e6129060a947..9ab49b6d7dbfe4f6429e9fc0ac3d495330b3cbdd 100644 (file)
 #  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)))
index 8d80893a6c320a351d8c8033c58ef1aab97738c5..254649d85b48abedc4d1c83da97b1e2a38de0101 100644 (file)
 #  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()
index d5e9f385c1270fe0eba3f404247d82ed1b90dbd2..d14ff8711c687a501a1f98e920f7cf3c77d2a675 100644 (file)
 #  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()
index 35cfc33fd69b1eec29732a3d500017c3e6b605ca..ba1bdb5d6bf50219f10be0d729aab13e88822fee 100644 (file)
 #  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()
index de4a5dd6c5d651f36143b83f92545a1dea7319e2..4118b4e1552cc487815406a9d9bdc0003037df2f 100644 (file)
 #             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)))
index f7a42d9c906ccc21ce88bd60b9da144fcb59f9a8..3d754cc63cf48ad336e989e287ebed0a082ed72e 100644 (file)
 #  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()
index 4204951fbd5a8648a1dab213ca88f2660ed1c372..8f8292e663c8337cef9615983b844acf9d9e7cf5 100644 (file)
 #  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)))
index c7e51f1a16d33d55f54f4da138498cb57f100cc1..7556332fdf119c3d4fba4c843a17cd3d46751daa 100644 (file)
 #  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)
index b8d381ea24ece9735dcae4e3b6c11061000ab42d..2163ce4d52cfc764f2c9694509cfd646a80301ba 100644 (file)
 #             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),
index 045984ea4a5bc34cc2efec468479a83026eaaa89..b67193cb127920c9d64687172d98ec3345042c2d 100644 (file)
 #  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)
index feadb5dd1ee5e3340205819751c79528f0abddbe..5d162436b7f76bfd980bb62437ad216698682f5a 100644 (file)
 #             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)
index a9dc102a0bd10534be99c8c4a77ffbcb8a7366c1..86bcc2c2a5cf202cf5c70b04d6c2384ec06c11f1 100644 (file)
 #  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))
index b94d7b0a5fdc3af377b3167111e81094a21f58c4..fd038b6f715d3ef94cc3a3b08b9a23fa17a749a5 100644 (file)
 #  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)
index 4a5203fb31f05ab94e5357272d5f66ba513837c7..71aeb960287b1de2a892b1484c26bff40c9bce6f 100644 (file)
 #  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)))
index f181bcc23487ad7a0c4ef5ddc65cf950620ee43a..ca729562c2d9d84f9d6ee61733ade3ab7bf834de 100644 (file)
 #             ******** 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):
index 922a5ffa972b6f877e1bb361f0a05eca517344ae..da140c7514748c5588223c80839ec70fc632685c 100644 (file)
 #             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),
index fdc627ecadeef416259cc4baf0f573eec9297fc1..35b57399942060e77101de8ca9d6302562174e2b 100644 (file)
 #             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)))
index 977b99546bc1e4455eefd3c0387dd69695bd8dbf..3ae2e0930416043f8667035549266c0bf49e9ba6 100644 (file)
 #  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)
index 0ae0804f2a8d278915b4042c8e7b81f78e393a6f..89ef8692be52abed772b0008f8e991fc8caa1998 100644 (file)
 #  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)
index e570e15ca6c1445a599de4a353dbfd4c8d1d669b..7291f1450478ab1b12634c481f2692f58f5d531c 100644 (file)
 #  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)))
index 8386817754a227943243003be6e5344b434acb4a..41fd251c5d96edb6e24c50da8688d9b3a9cd85de 100644 (file)
 #  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)))
index 6315f1291d4c387660a2ddb637a1246a3778def9..9486f01d0e8ab76dac1ebc3a6c2efb853847667d 100644 (file)
 #  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)
index d5424b377480bb4877ac6e9e4137088980a68992..cae086cd73e97fa4781894a4fbe964e9a904604f 100644 (file)
 #             *** 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)))
index 367139de2e2d2774bf714ceed38c2cef9f8e7783..7375e80dd7225de22708885a859e285865e8aae6 100644 (file)
 #             *** 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)))
index 755098d96b6aa72c72a7543526623f4760925840..6f1e93953dd17a2452a91d4e05a0fb181326f258 100644 (file)
 #             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)
index c1cc4361f7f43338c4dee610aa254816ed393d70..0e92277ba0f851f3a099577bd3daa94198f479a7 100644 (file)
 #             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))
index 27669d20a4e3e1968e91b32c5b65fbf25a62046e..9b450f62f1dfb1f759fcaa8ea8655b3adffce924 100644 (file)
 #             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 
index 25e593b7c99437944d39ad326bed4f07b8a042e3..07cc615bb2cdcfba663057376a7ad8a932264fb6 100644 (file)
 #             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)
index 474183c38105d3563ed40cb7502542bf0e29a3b5..67b540865d5d223a301243369cf98b785ad2a12f 100644 (file)
 #  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)))
index 70446e0178ed356e412661df428257b593afe695..20d9b4ac3787991745667c6c4602493930f1a3ae 100644 (file)
 #  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)))
index c925633b5799ff703bb2d48b271329acd99bb2c8..046b7c186968d8d93921b92ad3d07c11c789c311 100644 (file)
 #  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)))
index bb5e20f2a2e52df50b8d84dcea6fcba7d2ac335c..e6559b2829480f990ce1cad0bd5840a0d04623fc 100644 (file)
 #             ***** 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)
index 20c8240b3cd98b6016782900f1f366568928dca2..c7b2d352e59c40834b41d306dd56bf0da5d1e1b8 100644 (file)
 #  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)))
index efcddb7321f283dfabee52d93117771ce36eb2c6..a80679fa9917a14c805185a5d4f56a8644fbed96 100644 (file)
 #  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)))
index 565962c1b0e4ba65ab8369764a359530823a625a..113f20a8fd3dd0a878afe5f1adc6cd453a5a2f94 100644 (file)
 #  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)))
index efa977ccf5fea19fe188a8f016bc3f487267f6b2..10a4d5ff1445867b35e5acebe26e8c7054fce01c 100644 (file)
 #  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())