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:
authorCampbell Barton <ideasman42@gmail.com>2020-10-02 03:15:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-10-02 04:59:16 +0300
commit41d2d6da0c96d351b47acb64d3e0decdba16cb16 (patch)
tree8f955ed71d907ab9f7ee97627a9a7c91192d139a /release/scripts/freestyle
parentbab9de2a52929fe2b45ecddb1eb09da3378e303b (diff)
Cleanup: pep8 (indentation, spacing, long lines)
Diffstat (limited to 'release/scripts/freestyle')
-rw-r--r--release/scripts/freestyle/modules/freestyle/chainingiterators.py116
-rw-r--r--release/scripts/freestyle/modules/freestyle/predicates.py22
-rw-r--r--release/scripts/freestyle/modules/freestyle/types.py2
-rw-r--r--release/scripts/freestyle/modules/freestyle/utils.py9
-rw-r--r--release/scripts/freestyle/modules/parameter_editor.py18
-rw-r--r--release/scripts/freestyle/styles/anisotropic_diffusion.py6
-rw-r--r--release/scripts/freestyle/styles/apriori_and_causal_density.py6
-rw-r--r--release/scripts/freestyle/styles/apriori_density.py8
-rw-r--r--release/scripts/freestyle/styles/blueprint_circles.py8
-rw-r--r--release/scripts/freestyle/styles/blueprint_ellipses.py6
-rw-r--r--release/scripts/freestyle/styles/blueprint_squares.py6
-rw-r--r--release/scripts/freestyle/styles/cartoon.py6
-rw-r--r--release/scripts/freestyle/styles/contour.py8
-rw-r--r--release/scripts/freestyle/styles/curvature2d.py6
-rw-r--r--release/scripts/freestyle/styles/external_contour.py6
-rw-r--r--release/scripts/freestyle/styles/external_contour_sketchy.py6
-rw-r--r--release/scripts/freestyle/styles/external_contour_smooth.py10
-rw-r--r--release/scripts/freestyle/styles/haloing.py10
-rw-r--r--release/scripts/freestyle/styles/ignore_small_occlusions.py8
-rw-r--r--release/scripts/freestyle/styles/invisible_lines.py6
-rw-r--r--release/scripts/freestyle/styles/japanese_bigbrush.py20
-rw-r--r--release/scripts/freestyle/styles/long_anisotropically_dense.py25
-rw-r--r--release/scripts/freestyle/styles/multiple_parameterization.py12
-rw-r--r--release/scripts/freestyle/styles/nature.py6
-rw-r--r--release/scripts/freestyle/styles/near_lines.py6
-rw-r--r--release/scripts/freestyle/styles/occluded_by_specific_object.py12
-rw-r--r--release/scripts/freestyle/styles/polygonalize.py6
-rw-r--r--release/scripts/freestyle/styles/qi0.py6
-rw-r--r--release/scripts/freestyle/styles/qi0_not_external_contour.py6
-rw-r--r--release/scripts/freestyle/styles/qi1.py6
-rw-r--r--release/scripts/freestyle/styles/qi2.py6
-rw-r--r--release/scripts/freestyle/styles/sequentialsplit_sketchy.py8
-rw-r--r--release/scripts/freestyle/styles/sketchy_multiple_parameterization.py6
-rw-r--r--release/scripts/freestyle/styles/sketchy_topology_broken.py10
-rw-r--r--release/scripts/freestyle/styles/sketchy_topology_preserved.py6
-rw-r--r--release/scripts/freestyle/styles/split_at_tvertices.py10
-rw-r--r--release/scripts/freestyle/styles/suggestive.py6
-rw-r--r--release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py6
-rw-r--r--release/scripts/freestyle/styles/tipremover.py6
-rw-r--r--release/scripts/freestyle/styles/tvertex_remover.py6
-rw-r--r--release/scripts/freestyle/styles/uniformpruning_zsort.py6
41 files changed, 233 insertions, 221 deletions
diff --git a/release/scripts/freestyle/modules/freestyle/chainingiterators.py b/release/scripts/freestyle/modules/freestyle/chainingiterators.py
index 990a97db3f2..be9a25d1a57 100644
--- a/release/scripts/freestyle/modules/freestyle/chainingiterators.py
+++ b/release/scripts/freestyle/modules/freestyle/chainingiterators.py
@@ -36,14 +36,14 @@ __all__ = (
"pyFillOcclusionsAbsoluteAndRelativeChainingIterator",
"pyFillQi0AbsoluteAndRelativeChainingIterator",
"pyNoIdChainSilhouetteIterator",
- )
+)
# module members
from _freestyle import (
ChainPredicateIterator,
ChainSilhouetteIterator,
- )
+)
# constructs for predicate definition in Python
from freestyle.types import (
@@ -51,15 +51,15 @@ from freestyle.types import (
ChainingIterator,
Nature,
TVertex,
- )
+)
from freestyle.predicates import (
ExternalContourUP1D,
- )
+)
from freestyle.utils import (
ContextFunctions as CF,
get_chain_length,
find_matching_vertex,
- )
+)
import bpy
@@ -73,7 +73,7 @@ NATURES = (
Nature.SUGGESTIVE_CONTOUR,
Nature.VALLEY,
Nature.RIDGE
- )
+)
def nature_in_preceding(nature, index):
@@ -97,12 +97,12 @@ class pyChainSilhouetteIterator(ChainingIterator):
def traverse(self, iter):
it = AdjacencyIterator(iter)
- ## case of TVertex
+ # case of TVertex
vertex = self.next_vertex
if type(vertex) is TVertex:
mate = vertex.get_mate(self.current_edge)
return find_matching_vertex(mate.id, it)
- ## case of NonTVertex
+ # case of NonTVertex
winner = None
for i, nat in enumerate(NATURES):
if (nat & self.current_edge.nature):
@@ -145,12 +145,12 @@ class pyChainSilhouetteGenericIterator(ChainingIterator):
def traverse(self, iter):
it = AdjacencyIterator(iter)
- ## case of TVertex
+ # case of TVertex
vertex = self.next_vertex
if type(vertex) is TVertex:
mate = vertex.get_mate(self.current_edge)
return find_matching_vertex(mate.id, it)
- ## case of NonTVertex
+ # case of NonTVertex
winner = None
for i, nat in enumerate(NATURES):
if (nat & self.current_edge.nature):
@@ -227,7 +227,7 @@ class pySketchyChainSilhouetteIterator(ChainingIterator):
:type stayInSelection: bool
"""
- def __init__(self, nRounds=3,stayInSelection=True):
+ def __init__(self, nRounds=3, stayInSelection=True):
ChainingIterator.__init__(self, stayInSelection, False, None, True)
self._timeStamp = CF.get_time_stamp() + nRounds
self._nRounds = nRounds
@@ -249,12 +249,12 @@ class pySketchyChainSilhouetteIterator(ChainingIterator):
def traverse(self, iter):
it = AdjacencyIterator(iter)
- ## case of TVertex
+ # case of TVertex
vertex = self.next_vertex
if type(vertex) is TVertex:
mate = vertex.get_mate(self.current_edge)
return self.make_sketchy(find_matching_vertex(mate.id, it))
- ## case of NonTVertex
+ # case of NonTVertex
winner = None
for i, nat in enumerate(NATURES):
if (nat & self.current_edge.nature):
@@ -342,13 +342,13 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
winner = None
winnerOrientation = False
it = AdjacencyIterator(iter)
- ## case of TVertex
+ # case of TVertex
vertex = self.next_vertex
if type(vertex) is TVertex:
mate = vertex.get_mate(self.current_edge)
winner = find_matching_vertex(mate.id, it)
winnerOrientation = not it.is_incoming if not it.is_end else False
- ## case of NonTVertex
+ # case of NonTVertex
else:
for nat in NATURES:
if (self.current_edge.nature & nat):
@@ -379,7 +379,8 @@ class pyFillOcclusionsRelativeChainingIterator(ChainingIterator):
while (not _cit.is_end) and _cit.object.time_stamp != self.timestamp:
connexl += _cit.object.length_2d
_cit.increment()
- if _cit.is_begin: break
+ if _cit.is_begin:
+ break
if connexl > self._percent * self._length:
return None
@@ -411,13 +412,13 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
winner = None
winnerOrientation = False
it = AdjacencyIterator(iter)
- ## case of TVertex
+ # case of TVertex
vertex = self.next_vertex
if type(vertex) is TVertex:
mate = vertex.get_mate(self.current_edge)
winner = find_matching_vertex(mate.id, it)
winnerOrientation = not it.is_incoming if not it.is_end else False
- ## case of NonTVertex
+ # case of NonTVertex
else:
for nat in NATURES:
if (self.current_edge.nature & nat):
@@ -440,7 +441,8 @@ class pyFillOcclusionsAbsoluteChainingIterator(ChainingIterator):
while (not _cit.is_end) and _cit.object.time_stamp != self.timestamp:
connexl += _cit.object.length_2d
_cit.increment()
- if _cit.is_begin: break
+ if _cit.is_begin:
+ break
if connexl > self._length:
return None
@@ -463,6 +465,7 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
:arg l: Absolute length.
:type l: float
"""
+
def __init__(self, percent, l):
ChainingIterator.__init__(self, False, True, None, True)
self._length = 0.0
@@ -479,13 +482,13 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
winner = None
winnerOrientation = False
it = AdjacencyIterator(iter)
- ## case of TVertex
+ # case of TVertex
vertex = self.next_vertex
if type(vertex) is TVertex:
mate = vertex.get_mate(self.current_edge)
winner = find_matching_vertex(mate.id, it)
winnerOrientation = not it.is_incoming if not it.is_end else False
- ## case of NonTVertex
+ # case of NonTVertex
else:
for nat in NATURES:
if (self.current_edge.nature & nat):
@@ -499,22 +502,23 @@ class pyFillOcclusionsAbsoluteAndRelativeChainingIterator(ChainingIterator):
if winner is not None and winner.time_stamp != CF.get_time_stamp():
- if self._length == 0.0:
- self._length = get_chain_length(winner, winnerOrientation)
-
- connexl = 0.0
- _cit = pyChainSilhouetteGenericIterator(False, False)
- _cit.begin = winner
- _cit.current_edge = winner
- _cit.orientation = winnerOrientation
- _cit.init()
- while (not _cit.is_end) and _cit.object.time_stamp != CF.get_time_stamp():
- connexl += _cit.object.length_2d
- _cit.increment()
- if _cit.is_begin: break
-
- if (connexl > self._percent * self._length) or (connexl > self._absLength):
- return None
+ if self._length == 0.0:
+ self._length = get_chain_length(winner, winnerOrientation)
+
+ connexl = 0.0
+ _cit = pyChainSilhouetteGenericIterator(False, False)
+ _cit.begin = winner
+ _cit.current_edge = winner
+ _cit.orientation = winnerOrientation
+ _cit.init()
+ while (not _cit.is_end) and _cit.object.time_stamp != CF.get_time_stamp():
+ connexl += _cit.object.length_2d
+ _cit.increment()
+ if _cit.is_begin:
+ break
+
+ if (connexl > self._percent * self._length) or (connexl > self._absLength):
+ return None
return winner
@@ -549,13 +553,13 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
winner = None
winnerOrientation = False
it = AdjacencyIterator(iter)
- ## case of TVertex
+ # case of TVertex
vertex = self.next_vertex
if type(vertex) is TVertex:
mate = vertex.get_mate(self.current_edge)
winner = find_matching_vertex(mate.id, it)
winnerOrientation = not it.is_incoming if not it.is_end else False
- ## case of NonTVertex
+ # case of NonTVertex
else:
for nat in NATURES:
if (self.current_edge.nature & nat):
@@ -569,22 +573,22 @@ class pyFillQi0AbsoluteAndRelativeChainingIterator(ChainingIterator):
if winner is not None and winner.qi:
+ if self._length == 0.0:
+ self._length = get_chain_length(winner, winnerOrientation)
- if self._length == 0.0:
- self._length = get_chain_length(winner, winnerOrientation)
-
- connexl = 0
- _cit = pyChainSilhouetteGenericIterator(False, False)
- _cit.begin = winner
- _cit.current_edge = winner
- _cit.orientation = winnerOrientation
- _cit.init()
- while (not _cit.is_end) and _cit.object.qi != 0:
- connexl += _cit.object.length_2d
- _cit.increment()
- if _cit.is_begin: break
- if (connexl > self._percent * self._length) or (connexl > self._absLength):
- return None
+ connexl = 0
+ _cit = pyChainSilhouetteGenericIterator(False, False)
+ _cit.begin = winner
+ _cit.current_edge = winner
+ _cit.orientation = winnerOrientation
+ _cit.init()
+ while (not _cit.is_end) and _cit.object.qi != 0:
+ connexl += _cit.object.length_2d
+ _cit.increment()
+ if _cit.is_begin:
+ break
+ if (connexl > self._percent * self._length) or (connexl > self._absLength):
+ return None
return winner
@@ -637,10 +641,10 @@ class pyNoIdChainSilhouetteIterator(ChainingIterator):
if vA.id.first == vB.id.first:
return ve
return None
- ## case of NonTVertex
+ # case of NonTVertex
else:
for i, nat in enumerate(NATURES):
- if (nat & self.current_edge.nature):
+ if (nat & self.current_edge.nature):
for ve in it:
ve_nat = ve.nature
if (ve_nat & nat):
diff --git a/release/scripts/freestyle/modules/freestyle/predicates.py b/release/scripts/freestyle/modules/freestyle/predicates.py
index 5cbe577b956..656b6952591 100644
--- a/release/scripts/freestyle/modules/freestyle/predicates.py
+++ b/release/scripts/freestyle/modules/freestyle/predicates.py
@@ -95,7 +95,7 @@ __all__ = (
"pyZBP1D",
"pyZDiscontinuityBP1D",
"pyZSmallerUP1D",
- )
+)
# module members
@@ -117,7 +117,7 @@ from _freestyle import (
TrueUP1D,
ViewMapGradientNormBP1D,
WithinImageBoundaryUP1D,
- )
+)
# constructs for predicate definition in Python
from freestyle.types import (
@@ -129,7 +129,7 @@ from freestyle.types import (
TVertex,
UnaryPredicate0D,
UnaryPredicate1D,
- )
+)
from freestyle.functions import (
Curvature2DAngleF0D,
CurveNatureF1D,
@@ -149,7 +149,7 @@ from freestyle.functions import (
pyCurvilinearLengthF0D,
pyDensityAnisotropyF1D,
pyViewMapGradientNormF1D,
- )
+)
from freestyle.utils import material_from_fedge
@@ -194,6 +194,7 @@ class pyBackTVertexUP0D(UnaryPredicate0D):
Check whether an Interface0DIterator references a TVertex and is
the one that is hidden (inferred from the context).
"""
+
def __init__(self):
UnaryPredicate0D.__init__(self)
self._getQI = QuantitativeInvisibilityF0D()
@@ -239,7 +240,7 @@ class AndUP1D(UnaryPredicate1D):
correct_types = all(isinstance(p, UnaryPredicate1D) for p in self.predicates)
if not (correct_types and predicates):
raise TypeError("%s: Expected one or more UnaryPredicate1D, got %r" %
- (self.__class__.__name__, self.predicates))
+ (self.__class__.__name__, self.predicates))
def __call__(self, inter):
return all(pred(inter) for pred in self.predicates)
@@ -252,7 +253,7 @@ class OrUP1D(UnaryPredicate1D):
correct_types = all(isinstance(p, UnaryPredicate1D) for p in self.predicates)
if not (correct_types and predicates):
raise TypeError("%s: Expected one or more UnaryPredicate1D, got %r" %
- (self.__class__.__name__, self.predicates))
+ (self.__class__.__name__, self.predicates))
def __call__(self, inter):
return any(pred(inter) for pred in self.predicates)
@@ -533,7 +534,8 @@ class pyHighViewMapGradientNormUP1D(UnaryPredicate1D):
class pyDensityVariableSigmaUP1D(UnaryPredicate1D):
- def __init__(self, functor, sigmaMin, sigmaMax, lmin, lmax, tmin, tmax, integration=IntegrationType.MEAN, sampling=2.0):
+ def __init__(self, functor, sigmaMin, sigmaMax, lmin, lmax, tmin,
+ tmax, integration=IntegrationType.MEAN, sampling=2.0):
UnaryPredicate1D.__init__(self)
self._functor = functor
self._sigmaMin = float(sigmaMin)
@@ -571,7 +573,7 @@ class AndBP1D(BinaryPredicate1D):
correct_types = all(isinstance(p, BinaryPredicate1D) for p in self.predicates)
if not (correct_types and predicates):
raise TypeError("%s: Expected one or more BinaryPredicate1D, got %r" %
- (self.__class__.__name__, self.predicates))
+ (self.__class__.__name__, self.predicates))
def __call__(self, i1, i2):
return all(pred(i1, i2) for pred in self.predicates)
@@ -584,7 +586,7 @@ class OrBP1D(BinaryPredicate1D):
correct_types = all(isinstance(p, BinaryPredicate1D) for p in self.predicates)
if not (correct_types and predicates):
raise TypeError("%s: Expected one or more BinaryPredicate1D, got %r" %
- (self.__class__.__name__, self.predicates))
+ (self.__class__.__name__, self.predicates))
def __call__(self, i1, i2):
return any(pred(i1, i2) for pred in self.predicates)
@@ -672,8 +674,10 @@ class pyShuffleBP1D(BinaryPredicate1D):
def __call__(self, inter1, inter2):
return (random.uniform(0, 1) < random.uniform(0, 1))
+
class MaterialBP1D(BinaryPredicate1D):
"""Checks whether the two supplied ViewEdges have the same material."""
+
def __call__(self, i1, i2):
fedges = (fe for ve in (i1, i2) for fe in (ve.first_fedge, ve.last_fedge))
materials = {material_from_fedge(fe) for fe in fedges}
diff --git a/release/scripts/freestyle/modules/freestyle/types.py b/release/scripts/freestyle/modules/freestyle/types.py
index 22f80f41dfc..72d263b26a3 100644
--- a/release/scripts/freestyle/modules/freestyle/types.py
+++ b/release/scripts/freestyle/modules/freestyle/types.py
@@ -170,4 +170,4 @@ from _freestyle import (
ViewShape,
ViewVertex,
orientedViewEdgeIterator,
- )
+)
diff --git a/release/scripts/freestyle/modules/freestyle/utils.py b/release/scripts/freestyle/modules/freestyle/utils.py
index 2d47995d474..d129de66221 100644
--- a/release/scripts/freestyle/modules/freestyle/utils.py
+++ b/release/scripts/freestyle/modules/freestyle/utils.py
@@ -51,14 +51,14 @@ __all__ = (
"stroke_normal",
"StrokeCollector",
"tripplewise",
- )
+)
# module members
from _freestyle import (
ContextFunctions,
getCurrentScene,
integrate,
- )
+)
# constructs for helper functions in Python
from freestyle.types import (
@@ -66,7 +66,7 @@ from freestyle.types import (
Stroke,
StrokeShader,
StrokeVertexIterator,
- )
+)
from mathutils import Vector
from functools import lru_cache, namedtuple
@@ -288,7 +288,7 @@ class BoundingBox:
"maximum",
"size",
"corners",
- )
+ )
def __init__(self, minimum: Vector, maximum: Vector):
self.minimum = minimum
@@ -319,6 +319,7 @@ class BoundingBox:
class StrokeCollector(StrokeShader):
"""Collects and Stores stroke objects"""
+
def __init__(self):
StrokeShader.__init__(self)
self.strokes = []
diff --git a/release/scripts/freestyle/modules/parameter_editor.py b/release/scripts/freestyle/modules/parameter_editor.py
index 0b8ccf387fd..65eee93c871 100644
--- a/release/scripts/freestyle/modules/parameter_editor.py
+++ b/release/scripts/freestyle/modules/parameter_editor.py
@@ -34,20 +34,20 @@ from freestyle.types import (
TVertex,
Material,
ViewEdge,
- )
+)
from freestyle.chainingiterators import (
ChainPredicateIterator,
ChainSilhouetteIterator,
pySketchyChainSilhouetteIterator,
pySketchyChainingIterator,
- )
+)
from freestyle.functions import (
Curvature2DAngleF0D,
Normal2DF0D,
QuantitativeInvisibilityF1D,
VertexOrientation2DF0D,
CurveMaterialF0D,
- )
+)
from freestyle.predicates import (
AndUP1D,
ContourUP1D,
@@ -67,7 +67,7 @@ from freestyle.predicates import (
pyProjectedXBP1D,
pyProjectedYBP1D,
pyZBP1D,
- )
+)
from freestyle.shaders import (
BackboneStretcherShader,
BezierCurveShader,
@@ -86,7 +86,7 @@ from freestyle.shaders import (
StrokeTextureStepShader,
ThicknessNoiseShader as thickness_noise,
TipRemoverShader,
- )
+)
from freestyle.utils import (
angle_x_normal,
bound,
@@ -103,12 +103,12 @@ from freestyle.utils import (
pairwise,
simplify,
stroke_normal,
- )
+)
from _freestyle import (
blendRamp,
evaluateColorRamp,
evaluateCurveMappingF,
- )
+)
import time
import bpy
@@ -608,7 +608,9 @@ class NoiseShader:
class ThicknessNoiseShader(ThicknessBlenderMixIn, ScalarBlendModifier, NoiseShader):
"""Thickness based on pseudo-noise"""
- def __init__(self, thickness_position, thickness_ratio, blend_type, influence, amplitude, period, seed=512, asymmetric=True):
+
+ def __init__(self, thickness_position, thickness_ratio, blend_type,
+ influence, amplitude, period, seed=512, asymmetric=True):
ScalarBlendModifier.__init__(self, blend_type, influence)
ThicknessBlenderMixIn.__init__(self, thickness_position, thickness_ratio)
NoiseShader.__init__(self, amplitude, period, seed)
diff --git a/release/scripts/freestyle/styles/anisotropic_diffusion.py b/release/scripts/freestyle/styles/anisotropic_diffusion.py
index fc136b23d82..48de802ba1b 100644
--- a/release/scripts/freestyle/styles/anisotropic_diffusion.py
+++ b/release/scripts/freestyle/styles/anisotropic_diffusion.py
@@ -29,13 +29,13 @@ from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueBP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
SamplingShader,
pyDiffusion2Shader,
- )
+)
from freestyle.types import Operators, Stroke
@@ -52,5 +52,5 @@ shaders_list = [
SamplingShader(2),
pyDiffusion2Shader(offset, nbIter),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/apriori_and_causal_density.py b/release/scripts/freestyle/styles/apriori_and_causal_density.py
index 42fc3370488..d19a1cda0bc 100644
--- a/release/scripts/freestyle/styles/apriori_and_causal_density.py
+++ b/release/scripts/freestyle/styles/apriori_and_causal_density.py
@@ -31,11 +31,11 @@ from freestyle.predicates import (
TrueBP1D,
pyDensityUP1D,
pyHighViewMapDensityUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
- )
+)
from freestyle.types import IntegrationType, Operators
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.3, IntegrationType.LAST))
@@ -45,5 +45,5 @@ Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(Quan
shaders_list = [
ConstantThicknessShader(2),
ConstantColorShader(0, 0, 0, 1),
- ]
+]
Operators.create(pyDensityUP1D(1, 0.1, IntegrationType.MEAN), shaders_list)
diff --git a/release/scripts/freestyle/styles/apriori_density.py b/release/scripts/freestyle/styles/apriori_density.py
index ad5e610e422..833f04d487c 100644
--- a/release/scripts/freestyle/styles/apriori_density.py
+++ b/release/scripts/freestyle/styles/apriori_density.py
@@ -29,17 +29,17 @@ from freestyle.predicates import (
TrueBP1D,
TrueUP1D,
pyHighViewMapDensityUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
- )
+)
from freestyle.types import Operators
-Operators.select(AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.1,5)))
+Operators.select(AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.1, 5)))
bpred = TrueBP1D()
-upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.0007,5))
+upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyHighViewMapDensityUP1D(0.0007, 5))
Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(QuantitativeInvisibilityUP1D(0)))
shaders_list = [
ConstantThicknessShader(2),
diff --git a/release/scripts/freestyle/styles/blueprint_circles.py b/release/scripts/freestyle/styles/blueprint_circles.py
index f39cda5cff9..891d1b90c28 100644
--- a/release/scripts/freestyle/styles/blueprint_circles.py
+++ b/release/scripts/freestyle/styles/blueprint_circles.py
@@ -30,25 +30,25 @@ from freestyle.predicates import (
SameShapeIdBP1D,
TrueUP1D,
pyHigherLengthUP1D,
- )
+)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
pyBluePrintCirclesShader,
pyPerlinNoise1DShader,
- )
+)
from freestyle.types import Operators
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
bpred = SameShapeIdBP1D()
Operators.select(upred)
-Operators.bidirectional_chain(ChainPredicateIterator(upred,bpred), NotUP1D(upred))
+Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(upred))
Operators.select(pyHigherLengthUP1D(200))
shaders_list = [
ConstantThicknessShader(5),
pyBluePrintCirclesShader(3),
pyPerlinNoise1DShader(0.1, 15, 8),
IncreasingColorShader(0.8, 0.8, 0.3, 0.4, 0.3, 0.3, 0.3, 0.1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/blueprint_ellipses.py b/release/scripts/freestyle/styles/blueprint_ellipses.py
index 3d977a10d1c..4186c69ff20 100644
--- a/release/scripts/freestyle/styles/blueprint_ellipses.py
+++ b/release/scripts/freestyle/styles/blueprint_ellipses.py
@@ -30,13 +30,13 @@ from freestyle.predicates import (
SameShapeIdBP1D,
TrueUP1D,
pyHigherLengthUP1D,
- )
+)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
pyBluePrintEllipsesShader,
pyPerlinNoise1DShader,
- )
+)
from freestyle.types import Operators
@@ -50,5 +50,5 @@ shaders_list = [
pyBluePrintEllipsesShader(3),
pyPerlinNoise1DShader(0.1, 10, 8),
IncreasingColorShader(0.6, 0.3, 0.3, 0.7, 0.3, 0.3, 0.3, 0.1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/blueprint_squares.py b/release/scripts/freestyle/styles/blueprint_squares.py
index 7110fe413fc..cba53d8065c 100644
--- a/release/scripts/freestyle/styles/blueprint_squares.py
+++ b/release/scripts/freestyle/styles/blueprint_squares.py
@@ -30,13 +30,13 @@ from freestyle.predicates import (
SameShapeIdBP1D,
TrueUP1D,
pyHigherLengthUP1D,
- )
+)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
pyBluePrintSquaresShader,
pyPerlinNoise1DShader,
- )
+)
from freestyle.types import Operators
@@ -51,5 +51,5 @@ shaders_list = [
pyPerlinNoise1DShader(0.07, 10, 8),
IncreasingColorShader(0.6, 0.3, 0.3, 0.7, 0.6, 0.3, 0.3, 0.3),
ConstantThicknessShader(4),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/cartoon.py b/release/scripts/freestyle/styles/cartoon.py
index 87518bb832e..e8244803dd6 100644
--- a/release/scripts/freestyle/styles/cartoon.py
+++ b/release/scripts/freestyle/styles/cartoon.py
@@ -28,12 +28,12 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
BezierCurveShader,
ConstantThicknessShader,
pyMaterialColorShader,
- )
+)
from freestyle.types import Operators
@@ -43,5 +43,5 @@ shaders_list = [
BezierCurveShader(3),
ConstantThicknessShader(4),
pyMaterialColorShader(0.8),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/contour.py b/release/scripts/freestyle/styles/contour.py
index c57d7d0d23a..eabd38abc20 100644
--- a/release/scripts/freestyle/styles/contour.py
+++ b/release/scripts/freestyle/styles/contour.py
@@ -29,11 +29,11 @@ from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
SameShapeIdBP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
- )
+)
from freestyle.types import Operators
@@ -43,6 +43,6 @@ upred = AndUP1D(QuantitativeInvisibilityUP1D(0), ContourUP1D())
Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(QuantitativeInvisibilityUP1D(0)))
shaders_list = [
ConstantThicknessShader(5.0),
- IncreasingColorShader(0.8,0,0,1,0.1,0,0,1),
- ]
+ IncreasingColorShader(0.8, 0, 0, 1, 0.1, 0, 0, 1),
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/curvature2d.py b/release/scripts/freestyle/styles/curvature2d.py
index faf1223b735..84ee544242a 100644
--- a/release/scripts/freestyle/styles/curvature2d.py
+++ b/release/scripts/freestyle/styles/curvature2d.py
@@ -27,11 +27,11 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantThicknessShader,
py2DCurvatureColorShader,
- )
+)
from freestyle.types import Operators, Stroke
@@ -40,5 +40,5 @@ Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInv
shaders_list = [
ConstantThicknessShader(5),
py2DCurvatureColorShader()
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/external_contour.py b/release/scripts/freestyle/styles/external_contour.py
index 4d6c751cbfe..37d60dda827 100644
--- a/release/scripts/freestyle/styles/external_contour.py
+++ b/release/scripts/freestyle/styles/external_contour.py
@@ -29,11 +29,11 @@ from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueBP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
- )
+)
from freestyle.types import Operators
@@ -44,5 +44,5 @@ Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(upre
shaders_list = [
ConstantThicknessShader(3),
ConstantColorShader(0.0, 0.0, 0.0, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/external_contour_sketchy.py b/release/scripts/freestyle/styles/external_contour_sketchy.py
index 6bccf23ac8d..c0efe8912dc 100644
--- a/release/scripts/freestyle/styles/external_contour_sketchy.py
+++ b/release/scripts/freestyle/styles/external_contour_sketchy.py
@@ -30,14 +30,14 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
SmoothingShader,
SpatialNoiseShader,
- )
+)
from freestyle.types import Operators
@@ -50,5 +50,5 @@ shaders_list = [
IncreasingThicknessShader(4, 10),
SmoothingShader(400, 0.1, 0, 0.2, 0, 0, 0, 1),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/external_contour_smooth.py b/release/scripts/freestyle/styles/external_contour_smooth.py
index 6cd73326a71..63e530e3aa0 100644
--- a/release/scripts/freestyle/styles/external_contour_smooth.py
+++ b/release/scripts/freestyle/styles/external_contour_smooth.py
@@ -29,13 +29,13 @@ from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueBP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
SmoothingShader,
- )
+)
from freestyle.types import Operators
@@ -45,8 +45,8 @@ bpred = TrueBP1D()
Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(upred))
shaders_list = [
SamplingShader(2),
- IncreasingThicknessShader(4,20),
- IncreasingColorShader(1.0, 0.0, 0.5,1, 0.5,1, 0.3, 1),
+ IncreasingThicknessShader(4, 20),
+ IncreasingColorShader(1.0, 0.0, 0.5, 1, 0.5, 1, 0.3, 1),
SmoothingShader(100, 0.05, 0, 0.2, 0, 0, 0, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/haloing.py b/release/scripts/freestyle/styles/haloing.py
index 34e4f65cf91..5f8a419b999 100644
--- a/release/scripts/freestyle/styles/haloing.py
+++ b/release/scripts/freestyle/styles/haloing.py
@@ -31,28 +31,28 @@ from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyIsOccludedByUP1D,
- )
+)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
TipRemoverShader,
pyTVertexRemoverShader,
- )
+)
from freestyle.types import Id, Operators
# id corresponds to the id of the target object
# (accessed by SHIFT+click)
-id = Id(3,0)
+id = Id(3, 0)
upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyIsOccludedByUP1D(id))
Operators.select(upred)
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(upred))
shaders_list = [
IncreasingThicknessShader(3, 5),
- IncreasingColorShader(1,0,0, 1,0,1,0,1),
+ IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
SamplingShader(1.0),
pyTVertexRemoverShader(),
TipRemoverShader(3.0),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/ignore_small_occlusions.py b/release/scripts/freestyle/styles/ignore_small_occlusions.py
index a01e9e5574f..efa228f4663 100644
--- a/release/scripts/freestyle/styles/ignore_small_occlusions.py
+++ b/release/scripts/freestyle/styles/ignore_small_occlusions.py
@@ -25,21 +25,21 @@ from freestyle.chainingiterators import pyFillOcclusionsAbsoluteChainingIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
- )
+)
from freestyle.types import Operators
Operators.select(QuantitativeInvisibilityUP1D(0))
-#Operators.bidirectional_chain(pyFillOcclusionsChainingIterator(0.1))
+# Operators.bidirectional_chain(pyFillOcclusionsChainingIterator(0.1))
Operators.bidirectional_chain(pyFillOcclusionsAbsoluteChainingIterator(12))
shaders_list = [
SamplingShader(5.0),
ConstantThicknessShader(3),
ConstantColorShader(0.0, 0.0, 0.0),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/invisible_lines.py b/release/scripts/freestyle/styles/invisible_lines.py
index 5506f4ef11f..8b23d346f62 100644
--- a/release/scripts/freestyle/styles/invisible_lines.py
+++ b/release/scripts/freestyle/styles/invisible_lines.py
@@ -27,12 +27,12 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
- )
+)
from freestyle.types import Operators
@@ -43,5 +43,5 @@ shaders_list = [
SamplingShader(5.0),
ConstantThicknessShader(3.0),
ConstantColorShader(0.7, 0.7, 0.7),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/japanese_bigbrush.py b/release/scripts/freestyle/styles/japanese_bigbrush.py
index a312bcd4358..b81a06daf0d 100644
--- a/release/scripts/freestyle/styles/japanese_bigbrush.py
+++ b/release/scripts/freestyle/styles/japanese_bigbrush.py
@@ -31,7 +31,7 @@ from freestyle.predicates import (
pyHigherNumberOfTurnsUP1D,
pyLengthBP1D,
pyParameterUP0D,
- )
+)
from freestyle.shaders import (
BezierCurveShader,
ConstantColorShader,
@@ -40,20 +40,20 @@ from freestyle.shaders import (
TipRemoverShader,
pyNonLinearVaryingThicknessShader,
pySamplingShader,
- )
+)
from freestyle.types import IntegrationType, Operators
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
-## Splits strokes at points of highest 2D curvature
-## when there are too many abrupt turns in it
+# Splits strokes at points of highest 2D curvature
+# when there are too many abrupt turns in it
func = pyInverseCurvature2DAngleF0D()
Operators.recursive_split(func, pyParameterUP0D(0.2, 0.8), NotUP1D(pyHigherNumberOfTurnsUP1D(3, 0.5)), 2)
-## Keeps only long enough strokes
+# Keeps only long enough strokes
Operators.select(pyHigherLengthUP1D(100))
-## Sorts so as to draw the longest strokes first
-## (this will be done using the causal density)
+# Sorts so as to draw the longest strokes first
+# (this will be done using the causal density)
Operators.sort(pyLengthBP1D())
shaders_list = [
pySamplingShader(10),
@@ -61,8 +61,8 @@ shaders_list = [
SamplingShader(50),
ConstantThicknessShader(10),
pyNonLinearVaryingThicknessShader(4, 25, 0.6),
- ConstantColorShader(0.2, 0.2, 0.2,1.0),
+ ConstantColorShader(0.2, 0.2, 0.2, 1.0),
TipRemoverShader(10),
- ]
-## Use the causal density to avoid cluttering
+]
+# Use the causal density to avoid cluttering
Operators.create(pyDensityUP1D(8, 0.4, IntegrationType.MEAN), shaders_list)
diff --git a/release/scripts/freestyle/styles/long_anisotropically_dense.py b/release/scripts/freestyle/styles/long_anisotropically_dense.py
index bfd5910cefe..2e720416632 100644
--- a/release/scripts/freestyle/styles/long_anisotropically_dense.py
+++ b/release/scripts/freestyle/styles/long_anisotropically_dense.py
@@ -37,16 +37,16 @@ from freestyle.predicates import (
pyHighDensityAnisotropyUP1D,
pyHigherLengthUP1D,
pyLengthBP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
- )
+)
from freestyle.types import IntegrationType, Operators
-## custom density predicate
+# custom density predicate
class pyDensityUP1D(UnaryPredicate1D):
def __init__(self, wsize, threshold, integration=IntegrationType.MEAN, sampling=2.0):
UnaryPredicate1D.__init__(self)
@@ -61,21 +61,22 @@ class pyDensityUP1D(UnaryPredicate1D):
m = self._func2(inter)
if c < self._threshold:
return 1
- if m > 4*c:
- if c < 1.5*self._threshold:
+ if m > 4 * c:
+ if c < 1.5 * self._threshold:
return 1
return 0
+
Operators.select(QuantitativeInvisibilityUP1D(0))
-Operators.bidirectional_chain(ChainSilhouetteIterator(),NotUP1D(QuantitativeInvisibilityUP1D(0)))
+Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
Operators.select(pyHigherLengthUP1D(40))
-## selects lines having a high anisotropic a priori density
-Operators.select(pyHighDensityAnisotropyUP1D(0.3,4))
+# selects lines having a high anisotropic a priori density
+Operators.select(pyHighDensityAnisotropyUP1D(0.3, 4))
Operators.sort(pyLengthBP1D())
shaders_list = [
SamplingShader(2.0),
ConstantThicknessShader(2),
- ConstantColorShader(0.2,0.2,0.25,1),
- ]
-## uniform culling
-Operators.create(pyDensityUP1D(3.0,2.0e-2, IntegrationType.MEAN, 0.1), shaders_list)
+ ConstantColorShader(0.2, 0.2, 0.25, 1),
+]
+# uniform culling
+Operators.create(pyDensityUP1D(3.0, 2.0e-2, IntegrationType.MEAN, 0.1), shaders_list)
diff --git a/release/scripts/freestyle/styles/multiple_parameterization.py b/release/scripts/freestyle/styles/multiple_parameterization.py
index c03a61c9a81..98ed65d0bd1 100644
--- a/release/scripts/freestyle/styles/multiple_parameterization.py
+++ b/release/scripts/freestyle/styles/multiple_parameterization.py
@@ -31,26 +31,26 @@ from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
pyHLRShader,
- )
+)
from freestyle.types import Operators
Operators.select(QuantitativeInvisibilityUP1D(0))
-## Chain following the same nature, but without the restriction
-## of staying inside the selection (False).
+# Chain following the same nature, but without the restriction
+# of staying inside the selection (False).
Operators.bidirectional_chain(ChainSilhouetteIterator(False))
shaders_list = [
SamplingShader(20),
IncreasingThicknessShader(1.5, 30),
ConstantColorShader(0.0, 0.0, 0.0),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
- pyHLRShader(), ## this shader draws only visible portions
- ]
+ pyHLRShader(), # this shader draws only visible portions
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/nature.py b/release/scripts/freestyle/styles/nature.py
index 1061f22017a..e8c4f4508b1 100644
--- a/release/scripts/freestyle/styles/nature.py
+++ b/release/scripts/freestyle/styles/nature.py
@@ -30,11 +30,11 @@ from freestyle.predicates import (
NotUP1D,
TrueUP1D,
pyNatureUP1D,
- )
+)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
- )
+)
from freestyle.types import Operators, Nature
@@ -43,5 +43,5 @@ Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(pyNatureUP1D(Na
shaders_list = [
IncreasingThicknessShader(3, 10),
IncreasingColorShader(0.0, 0.0, 0.0, 1, 0.8, 0, 0, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/near_lines.py b/release/scripts/freestyle/styles/near_lines.py
index 14c8d2f9e01..57de57347e7 100644
--- a/release/scripts/freestyle/styles/near_lines.py
+++ b/release/scripts/freestyle/styles/near_lines.py
@@ -29,11 +29,11 @@ from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyZSmallerUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
- )
+)
from freestyle.types import IntegrationType, Operators
@@ -43,5 +43,5 @@ Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(upred))
shaders_list = [
ConstantThicknessShader(5),
ConstantColorShader(0.0, 0.0, 0.0),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/occluded_by_specific_object.py b/release/scripts/freestyle/styles/occluded_by_specific_object.py
index d6f85aed0ac..0f12195eb14 100644
--- a/release/scripts/freestyle/styles/occluded_by_specific_object.py
+++ b/release/scripts/freestyle/styles/occluded_by_specific_object.py
@@ -28,18 +28,18 @@ from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyIsInOccludersListUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
- )
+)
from freestyle.types import Id, Operators
-## the id of the occluder (use SHIFT+click on the ViewMap to
-## retrieve ids)
-id = Id(3,0)
+# the id of the occluder (use SHIFT+click on the ViewMap to
+# retrieve ids)
+id = Id(3, 0)
upred = AndUP1D(NotUP1D(QuantitativeInvisibilityUP1D(0)), pyIsInOccludersListUP1D(id))
Operators.select(upred)
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(upred))
@@ -47,5 +47,5 @@ shaders_list = [
SamplingShader(5),
ConstantThicknessShader(3),
ConstantColorShader(0.3, 0.3, 0.3, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/polygonalize.py b/release/scripts/freestyle/styles/polygonalize.py
index 8eb6e5d56ee..b31cad8d7d5 100644
--- a/release/scripts/freestyle/styles/polygonalize.py
+++ b/release/scripts/freestyle/styles/polygonalize.py
@@ -26,13 +26,13 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
PolygonalizationShader,
SamplingShader,
- )
+)
from freestyle.types import Operators
@@ -43,5 +43,5 @@ shaders_list = [
ConstantThicknessShader(3),
ConstantColorShader(0.0, 0.0, 0.0),
PolygonalizationShader(8),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/qi0.py b/release/scripts/freestyle/styles/qi0.py
index 53840f25e0f..a1e8a071236 100644
--- a/release/scripts/freestyle/styles/qi0.py
+++ b/release/scripts/freestyle/styles/qi0.py
@@ -27,12 +27,12 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
- )
+)
from freestyle.types import Operators
@@ -42,5 +42,5 @@ shaders_list = [
SamplingShader(5.0),
ConstantThicknessShader(4.0),
ConstantColorShader(0.0, 0.0, 0.0)
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/qi0_not_external_contour.py b/release/scripts/freestyle/styles/qi0_not_external_contour.py
index 3c9b8873485..1b3fb0644ad 100644
--- a/release/scripts/freestyle/styles/qi0_not_external_contour.py
+++ b/release/scripts/freestyle/styles/qi0_not_external_contour.py
@@ -29,14 +29,14 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
BackboneStretcherShader,
IncreasingColorShader,
IncreasingThicknessShader,
SamplingShader,
SpatialNoiseShader,
- )
+)
from freestyle.types import Operators
@@ -49,5 +49,5 @@ shaders_list = [
IncreasingThicknessShader(2, 5),
BackboneStretcherShader(20),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/qi1.py b/release/scripts/freestyle/styles/qi1.py
index 4d87055eafb..60d210cd134 100644
--- a/release/scripts/freestyle/styles/qi1.py
+++ b/release/scripts/freestyle/styles/qi1.py
@@ -28,12 +28,12 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
- )
+)
from freestyle.types import Operators
@@ -43,5 +43,5 @@ shaders_list = [
SamplingShader(5.0),
ConstantThicknessShader(3),
ConstantColorShader(0.5, 0.5, 0.5, 1)
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/qi2.py b/release/scripts/freestyle/styles/qi2.py
index 937b5db590a..f2508241cad 100644
--- a/release/scripts/freestyle/styles/qi2.py
+++ b/release/scripts/freestyle/styles/qi2.py
@@ -28,12 +28,12 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
- )
+)
from freestyle.types import Operators
@@ -43,5 +43,5 @@ shaders_list = [
SamplingShader(10),
ConstantThicknessShader(1.5),
ConstantColorShader(0.7, 0.7, 0.7, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/sequentialsplit_sketchy.py b/release/scripts/freestyle/styles/sequentialsplit_sketchy.py
index 5755fd3b845..a128787b839 100644
--- a/release/scripts/freestyle/styles/sequentialsplit_sketchy.py
+++ b/release/scripts/freestyle/styles/sequentialsplit_sketchy.py
@@ -30,19 +30,19 @@ from freestyle.predicates import (
TrueUP1D,
pyBackTVertexUP0D,
pyVertexNatureUP0D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
IncreasingThicknessShader,
SpatialNoiseShader,
- )
+)
from freestyle.types import Nature, Operators
upred = QuantitativeInvisibilityUP1D(0)
Operators.select(upred)
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(upred))
-## starting and stopping predicates:
+# starting and stopping predicates:
start = pyVertexNatureUP0D(Nature.NON_T_VERTEX)
stop = pyBackTVertexUP0D()
Operators.sequential_split(start, stop, 10)
@@ -50,5 +50,5 @@ shaders_list = [
SpatialNoiseShader(7, 120, 2, True, True),
IncreasingThicknessShader(5, 8),
ConstantColorShader(0.2, 0.2, 0.2, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py b/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py
index 8302ec8e4c3..c3bf7b12bcb 100644
--- a/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py
+++ b/release/scripts/freestyle/styles/sketchy_multiple_parameterization.py
@@ -27,7 +27,7 @@ from freestyle.chainingiterators import pySketchyChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
@@ -35,7 +35,7 @@ from freestyle.shaders import (
SmoothingShader,
SpatialNoiseShader,
pyHLRShader,
- )
+)
from freestyle.types import Operators
@@ -48,5 +48,5 @@ shaders_list = [
SmoothingShader(100, 0.05, 0, 0.2, 0, 0, 0, 1),
IncreasingColorShader(0, 0.2, 0, 1, 0.2, 0.7, 0.2, 1),
pyHLRShader(),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/sketchy_topology_broken.py b/release/scripts/freestyle/styles/sketchy_topology_broken.py
index 191d2d8bcbe..d0b66ff1f51 100644
--- a/release/scripts/freestyle/styles/sketchy_topology_broken.py
+++ b/release/scripts/freestyle/styles/sketchy_topology_broken.py
@@ -27,7 +27,7 @@ from freestyle.chainingiterators import pySketchyChainingIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
IncreasingColorShader,
IncreasingThicknessShader,
@@ -35,13 +35,13 @@ from freestyle.shaders import (
SmoothingShader,
SpatialNoiseShader,
pyBackboneStretcherNoCuspShader,
- )
+)
from freestyle.types import Operators
Operators.select(QuantitativeInvisibilityUP1D(0))
-## Chain 3 times each ViewEdge independently from the
-## initial objects topology
+# Chain 3 times each ViewEdge independently from the
+# initial objects topology
Operators.bidirectional_chain(pySketchyChainingIterator(3))
shaders_list = [
SamplingShader(4),
@@ -50,5 +50,5 @@ shaders_list = [
SmoothingShader(100, 0.1, 0, 0.2, 0, 0, 0, 1),
pyBackboneStretcherNoCuspShader(20),
IncreasingColorShader(0.2, 0.2, 0.2, 1, 0.5, 0.5, 0.5, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/sketchy_topology_preserved.py b/release/scripts/freestyle/styles/sketchy_topology_preserved.py
index 26c7fd37964..3f5f6acc9a8 100644
--- a/release/scripts/freestyle/styles/sketchy_topology_preserved.py
+++ b/release/scripts/freestyle/styles/sketchy_topology_preserved.py
@@ -27,14 +27,14 @@ from freestyle.chainingiterators import pySketchyChainSilhouetteIterator
from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
IncreasingThicknessShader,
SamplingShader,
SmoothingShader,
SpatialNoiseShader,
- )
+)
from freestyle.types import Operators
@@ -47,5 +47,5 @@ shaders_list = [
IncreasingThicknessShader(4, 8),
SmoothingShader(300, 0.05, 0, 0.2, 0, 0, 0, 0.5),
ConstantColorShader(0.6, 0.2, 0.0),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/split_at_tvertices.py b/release/scripts/freestyle/styles/split_at_tvertices.py
index 8978b98f56b..84a51eb936b 100644
--- a/release/scripts/freestyle/styles/split_at_tvertices.py
+++ b/release/scripts/freestyle/styles/split_at_tvertices.py
@@ -27,22 +27,22 @@ from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyVertexNatureUP0D,
- )
+)
from freestyle.shaders import (
ConstantThicknessShader,
IncreasingColorShader,
- )
+)
from freestyle.types import Nature, Operators
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
start = pyVertexNatureUP0D(Nature.T_VERTEX)
-## use the same predicate to decide where to start and where to stop
-## the strokes:
+# use the same predicate to decide where to start and where to stop
+# the strokes:
Operators.sequential_split(start, start, 10)
shaders_list = [
ConstantThicknessShader(5),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/suggestive.py b/release/scripts/freestyle/styles/suggestive.py
index 8a97cc0139b..b7cf5b8bc88 100644
--- a/release/scripts/freestyle/styles/suggestive.py
+++ b/release/scripts/freestyle/styles/suggestive.py
@@ -30,11 +30,11 @@ from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
TrueUP1D,
pyNatureUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
IncreasingThicknessShader,
- )
+)
from freestyle.types import Nature, Operators
@@ -44,5 +44,5 @@ Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(upred))
shaders_list = [
IncreasingThicknessShader(1, 3),
ConstantColorShader(0.2, 0.2, 0.2, 1),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py b/release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py
index 25c196d4919..03738b268d1 100644
--- a/release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py
+++ b/release/scripts/freestyle/styles/thickness_fof_depth_discontinuity.py
@@ -26,13 +26,13 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
pyDepthDiscontinuityThicknessShader,
- )
+)
from freestyle.types import Operators
@@ -43,5 +43,5 @@ shaders_list = [
ConstantThicknessShader(3),
ConstantColorShader(0.0, 0.0, 0.0),
pyDepthDiscontinuityThicknessShader(0.8, 6),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/tipremover.py b/release/scripts/freestyle/styles/tipremover.py
index bb070b11464..e5cea57845b 100644
--- a/release/scripts/freestyle/styles/tipremover.py
+++ b/release/scripts/freestyle/styles/tipremover.py
@@ -26,13 +26,13 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
TipRemoverShader,
- )
+)
from freestyle.types import Operators
@@ -43,5 +43,5 @@ shaders_list = [
ConstantThicknessShader(3),
ConstantColorShader(0, 0, 0),
TipRemoverShader(20),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/tvertex_remover.py b/release/scripts/freestyle/styles/tvertex_remover.py
index d05e4dfc375..0756e7bab5f 100644
--- a/release/scripts/freestyle/styles/tvertex_remover.py
+++ b/release/scripts/freestyle/styles/tvertex_remover.py
@@ -26,13 +26,13 @@ from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
IncreasingThicknessShader,
SamplingShader,
pyTVertexRemoverShader,
- )
+)
from freestyle.types import Operators
@@ -43,5 +43,5 @@ shaders_list = [
ConstantColorShader(0.2, 0.2, 0.2, 1),
SamplingShader(10.0),
pyTVertexRemoverShader(),
- ]
+]
Operators.create(TrueUP1D(), shaders_list)
diff --git a/release/scripts/freestyle/styles/uniformpruning_zsort.py b/release/scripts/freestyle/styles/uniformpruning_zsort.py
index 64e808d9f8a..3ce2743c576 100644
--- a/release/scripts/freestyle/styles/uniformpruning_zsort.py
+++ b/release/scripts/freestyle/styles/uniformpruning_zsort.py
@@ -25,12 +25,12 @@ from freestyle.predicates import (
QuantitativeInvisibilityUP1D,
pyDensityUP1D,
pyZBP1D,
- )
+)
from freestyle.shaders import (
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
- )
+)
from freestyle.types import IntegrationType, Operators, Stroke
@@ -42,5 +42,5 @@ shaders_list = [
ConstantThicknessShader(3),
SamplingShader(5.0),
ConstantColorShader(0, 0, 0, 1),
- ]
+]
Operators.create(pyDensityUP1D(2, 0.05, IntegrationType.MEAN, 4), shaders_list)