Freestyle: Fix for references of deprecated texture stroke shaders.

Removed all references of deprecated texture shader.  Also deleted
several lines of dead code.

Since texture_shader.py no longer does what it was supposed to do,
the file itself was removed.

Patch reviewed by Tamito Kajiyama (kjym3).
This commit is contained in:
Folkert de Vries
2015-01-27 23:11:31 +01:00
committed by Tamito Kajiyama
parent a0fa3de267
commit 7d38d85340
19 changed files with 1 additions and 89 deletions

View File

@@ -34,7 +34,6 @@ from freestyle.shaders import (
ConstantThicknessShader, ConstantThicknessShader,
IncreasingColorShader, IncreasingColorShader,
SamplingShader, SamplingShader,
StrokeTextureShader,
pyDiffusion2Shader, pyDiffusion2Shader,
) )
from freestyle.types import Operators, Stroke from freestyle.types import Operators, Stroke
@@ -50,7 +49,6 @@ bpred = TrueBP1D()
Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(upred)) Operators.bidirectional_chain(ChainPredicateIterator(upred, bpred), NotUP1D(upred))
shaders_list = [ shaders_list = [
ConstantThicknessShader(4), ConstantThicknessShader(4),
StrokeTextureShader("smoothAlpha.bmp", Stroke.OPAQUE_MEDIUM, False),
SamplingShader(2), SamplingShader(2),
pyDiffusion2Shader(offset, nbIter), pyDiffusion2Shader(offset, nbIter),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1), IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),

View File

@@ -30,7 +30,6 @@ from freestyle.predicates import (
from freestyle.shaders import ( from freestyle.shaders import (
BackboneStretcherShader, BackboneStretcherShader,
ConstantColorShader, ConstantColorShader,
TextureAssignerShader,
) )
from freestyle.types import Operators from freestyle.types import Operators
@@ -38,7 +37,6 @@ from freestyle.types import Operators
Operators.select(QuantitativeInvisibilityUP1D(0)) Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
shaders_list = [ shaders_list = [
TextureAssignerShader(4),
ConstantColorShader(0.5, 0.5, 0.5), ConstantColorShader(0.5, 0.5, 0.5),
BackboneStretcherShader(20), BackboneStretcherShader(20),
] ]

View File

@@ -34,7 +34,6 @@ from freestyle.predicates import (
from freestyle.shaders import ( from freestyle.shaders import (
ConstantThicknessShader, ConstantThicknessShader,
IncreasingColorShader, IncreasingColorShader,
TextureAssignerShader,
pyBluePrintCirclesShader, pyBluePrintCirclesShader,
pyPerlinNoise1DShader, pyPerlinNoise1DShader,
) )
@@ -50,7 +49,6 @@ shaders_list = [
ConstantThicknessShader(5), ConstantThicknessShader(5),
pyBluePrintCirclesShader(3), pyBluePrintCirclesShader(3),
pyPerlinNoise1DShader(0.1, 15, 8), pyPerlinNoise1DShader(0.1, 15, 8),
TextureAssignerShader(4),
IncreasingColorShader(0.8, 0.8, 0.3, 0.4, 0.3, 0.3, 0.3, 0.1), IncreasingColorShader(0.8, 0.8, 0.3, 0.4, 0.3, 0.3, 0.3, 0.1),
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -34,7 +34,6 @@ from freestyle.predicates import (
from freestyle.shaders import ( from freestyle.shaders import (
ConstantThicknessShader, ConstantThicknessShader,
IncreasingColorShader, IncreasingColorShader,
TextureAssignerShader,
pyBluePrintEllipsesShader, pyBluePrintEllipsesShader,
pyPerlinNoise1DShader, pyPerlinNoise1DShader,
) )
@@ -50,7 +49,6 @@ shaders_list = [
ConstantThicknessShader(5), ConstantThicknessShader(5),
pyBluePrintEllipsesShader(3), pyBluePrintEllipsesShader(3),
pyPerlinNoise1DShader(0.1, 10, 8), pyPerlinNoise1DShader(0.1, 10, 8),
TextureAssignerShader(4),
IncreasingColorShader(0.6, 0.3, 0.3, 0.7, 0.3, 0.3, 0.3, 0.1), IncreasingColorShader(0.6, 0.3, 0.3, 0.7, 0.3, 0.3, 0.3, 0.1),
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -34,7 +34,6 @@ from freestyle.predicates import (
from freestyle.shaders import ( from freestyle.shaders import (
ConstantThicknessShader, ConstantThicknessShader,
IncreasingColorShader, IncreasingColorShader,
TextureAssignerShader,
pyBluePrintSquaresShader, pyBluePrintSquaresShader,
pyPerlinNoise1DShader, pyPerlinNoise1DShader,
) )
@@ -50,7 +49,6 @@ shaders_list = [
ConstantThicknessShader(8), ConstantThicknessShader(8),
pyBluePrintSquaresShader(2, 20), pyBluePrintSquaresShader(2, 20),
pyPerlinNoise1DShader(0.07, 10, 8), pyPerlinNoise1DShader(0.07, 10, 8),
TextureAssignerShader(4),
IncreasingColorShader(0.6, 0.3, 0.3, 0.7, 0.6, 0.3, 0.3, 0.3), IncreasingColorShader(0.6, 0.3, 0.3, 0.7, 0.6, 0.3, 0.3, 0.3),
ConstantThicknessShader(4), ConstantThicknessShader(4),
] ]

View File

@@ -30,7 +30,6 @@ from freestyle.predicates import (
) )
from freestyle.shaders import ( from freestyle.shaders import (
ConstantThicknessShader, ConstantThicknessShader,
StrokeTextureShader,
py2DCurvatureColorShader, py2DCurvatureColorShader,
) )
from freestyle.types import Operators, Stroke from freestyle.types import Operators, Stroke
@@ -39,7 +38,6 @@ from freestyle.types import Operators, Stroke
Operators.select(QuantitativeInvisibilityUP1D(0)) Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0))) Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
shaders_list = [ shaders_list = [
StrokeTextureShader("smoothAlpha.bmp", Stroke.OPAQUE_MEDIUM, False),
ConstantThicknessShader(5), ConstantThicknessShader(5),
py2DCurvatureColorShader() py2DCurvatureColorShader()
] ]

View File

@@ -37,7 +37,6 @@ from freestyle.shaders import (
SamplingShader, SamplingShader,
SmoothingShader, SmoothingShader,
SpatialNoiseShader, SpatialNoiseShader,
TextureAssignerShader,
) )
from freestyle.types import Operators from freestyle.types import Operators
@@ -51,6 +50,5 @@ shaders_list = [
IncreasingThicknessShader(4, 10), IncreasingThicknessShader(4, 10),
SmoothingShader(400, 0.1, 0, 0.2, 0, 0, 0, 1), SmoothingShader(400, 0.1, 0, 0.2, 0, 0, 0, 1),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1), IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
TextureAssignerShader(4),
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -37,7 +37,6 @@ from freestyle.shaders import (
ConstantColorShader, ConstantColorShader,
ConstantThicknessShader, ConstantThicknessShader,
SamplingShader, SamplingShader,
TextureAssignerShader,
TipRemoverShader, TipRemoverShader,
pyNonLinearVaryingThicknessShader, pyNonLinearVaryingThicknessShader,
pySamplingShader, pySamplingShader,
@@ -62,7 +61,6 @@ shaders_list = [
SamplingShader(50), SamplingShader(50),
ConstantThicknessShader(10), ConstantThicknessShader(10),
pyNonLinearVaryingThicknessShader(4, 25, 0.6), pyNonLinearVaryingThicknessShader(4, 25, 0.6),
TextureAssignerShader(6),
ConstantColorShader(0.2, 0.2, 0.2,1.0), ConstantColorShader(0.2, 0.2, 0.2,1.0),
TipRemoverShader(10), TipRemoverShader(10),
] ]

View File

@@ -37,7 +37,6 @@ from freestyle.shaders import (
IncreasingColorShader, IncreasingColorShader,
IncreasingThicknessShader, IncreasingThicknessShader,
SamplingShader, SamplingShader,
TextureAssignerShader,
pyHLRShader, pyHLRShader,
) )
from freestyle.types import Operators from freestyle.types import Operators
@@ -52,7 +51,6 @@ shaders_list = [
IncreasingThicknessShader(1.5, 30), IncreasingThicknessShader(1.5, 30),
ConstantColorShader(0.0, 0.0, 0.0), ConstantColorShader(0.0, 0.0, 0.0),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1), IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
TextureAssignerShader(-1),
pyHLRShader(), ## this shader draws only visible portions pyHLRShader(), ## this shader draws only visible portions
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -33,7 +33,6 @@ from freestyle.predicates import (
from freestyle.shaders import ( from freestyle.shaders import (
ConstantColorShader, ConstantColorShader,
ConstantThicknessShader, ConstantThicknessShader,
TextureAssignerShader,
) )
from freestyle.types import IntegrationType, Operators from freestyle.types import IntegrationType, Operators
@@ -42,7 +41,6 @@ upred = AndUP1D(QuantitativeInvisibilityUP1D(0), pyZSmallerUP1D(0.5, Integration
Operators.select(upred) Operators.select(upred)
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(upred)) Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(upred))
shaders_list = [ shaders_list = [
TextureAssignerShader(-1),
ConstantThicknessShader(5), ConstantThicknessShader(5),
ConstantColorShader(0.0, 0.0, 0.0), ConstantColorShader(0.0, 0.0, 0.0),
] ]

View File

@@ -36,7 +36,6 @@ from freestyle.shaders import (
IncreasingThicknessShader, IncreasingThicknessShader,
SamplingShader, SamplingShader,
SpatialNoiseShader, SpatialNoiseShader,
TextureAssignerShader,
) )
from freestyle.types import Operators from freestyle.types import Operators
@@ -50,6 +49,5 @@ shaders_list = [
IncreasingThicknessShader(2, 5), IncreasingThicknessShader(2, 5),
BackboneStretcherShader(20), BackboneStretcherShader(20),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1), IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
TextureAssignerShader(4),
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -35,7 +35,6 @@ from freestyle.shaders import (
ConstantColorShader, ConstantColorShader,
IncreasingThicknessShader, IncreasingThicknessShader,
SpatialNoiseShader, SpatialNoiseShader,
TextureAssignerShader,
) )
from freestyle.types import Nature, Operators from freestyle.types import Nature, Operators
@@ -51,6 +50,5 @@ shaders_list = [
SpatialNoiseShader(7, 120, 2, True, True), SpatialNoiseShader(7, 120, 2, True, True),
IncreasingThicknessShader(5, 8), IncreasingThicknessShader(5, 8),
ConstantColorShader(0.2, 0.2, 0.2, 1), ConstantColorShader(0.2, 0.2, 0.2, 1),
TextureAssignerShader(4),
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -34,7 +34,6 @@ from freestyle.shaders import (
SamplingShader, SamplingShader,
SmoothingShader, SmoothingShader,
SpatialNoiseShader, SpatialNoiseShader,
TextureAssignerShader,
pyHLRShader, pyHLRShader,
) )
from freestyle.types import Operators from freestyle.types import Operators
@@ -48,7 +47,6 @@ shaders_list = [
IncreasingThicknessShader(5, 30), IncreasingThicknessShader(5, 30),
SmoothingShader(100, 0.05, 0, 0.2, 0, 0, 0, 1), SmoothingShader(100, 0.05, 0, 0.2, 0, 0, 0, 1),
IncreasingColorShader(0, 0.2, 0, 1, 0.2, 0.7, 0.2, 1), IncreasingColorShader(0, 0.2, 0, 1, 0.2, 0.7, 0.2, 1),
TextureAssignerShader(6),
pyHLRShader(), pyHLRShader(),
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -34,8 +34,7 @@ from freestyle.shaders import (
SamplingShader, SamplingShader,
SmoothingShader, SmoothingShader,
SpatialNoiseShader, SpatialNoiseShader,
TextureAssignerShader, pyBackboneStretcherNoCuspShader,
pyBackboneStretcherNoCuspShader
) )
from freestyle.types import Operators from freestyle.types import Operators
@@ -50,9 +49,6 @@ shaders_list = [
IncreasingThicknessShader(4, 10), IncreasingThicknessShader(4, 10),
SmoothingShader(100, 0.1, 0, 0.2, 0, 0, 0, 1), SmoothingShader(100, 0.1, 0, 0.2, 0, 0, 0, 1),
pyBackboneStretcherNoCuspShader(20), pyBackboneStretcherNoCuspShader(20),
#ConstantColorShader(0.0, 0.0, 0.0)
IncreasingColorShader(0.2, 0.2, 0.2, 1, 0.5, 0.5, 0.5, 1), IncreasingColorShader(0.2, 0.2, 0.2, 1, 0.5, 0.5, 0.5, 1),
#IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
TextureAssignerShader(4),
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -34,7 +34,6 @@ from freestyle.shaders import (
SamplingShader, SamplingShader,
SmoothingShader, SmoothingShader,
SpatialNoiseShader, SpatialNoiseShader,
TextureAssignerShader,
) )
from freestyle.types import Operators from freestyle.types import Operators
@@ -48,6 +47,5 @@ shaders_list = [
IncreasingThicknessShader(4, 8), IncreasingThicknessShader(4, 8),
SmoothingShader(300, 0.05, 0, 0.2, 0, 0, 0, 0.5), SmoothingShader(300, 0.05, 0, 0.2, 0, 0, 0, 0.5),
ConstantColorShader(0.6, 0.2, 0.0), ConstantColorShader(0.6, 0.2, 0.0),
TextureAssignerShader(4),
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -34,7 +34,6 @@ from freestyle.predicates import (
from freestyle.shaders import ( from freestyle.shaders import (
ConstantThicknessShader, ConstantThicknessShader,
IncreasingColorShader, IncreasingColorShader,
TextureAssignerShader,
) )
from freestyle.types import Operators from freestyle.types import Operators
@@ -46,6 +45,5 @@ Operators.recursive_split(func, pyParameterUP0D(0.4, 0.6), NotUP1D(pyHigherLengt
shaders_list = [ shaders_list = [
ConstantThicknessShader(10), ConstantThicknessShader(10),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1), IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
TextureAssignerShader(3),
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -31,7 +31,6 @@ from freestyle.predicates import (
from freestyle.shaders import ( from freestyle.shaders import (
ConstantThicknessShader, ConstantThicknessShader,
IncreasingColorShader, IncreasingColorShader,
TextureAssignerShader,
) )
from freestyle.types import Nature, Operators from freestyle.types import Nature, Operators
@@ -45,6 +44,5 @@ Operators.sequential_split(start, start, 10)
shaders_list = [ shaders_list = [
ConstantThicknessShader(5), ConstantThicknessShader(5),
IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1), IncreasingColorShader(1, 0, 0, 1, 0, 1, 0, 1),
TextureAssignerShader(3),
] ]
Operators.create(TrueUP1D(), shaders_list) Operators.create(TrueUP1D(), shaders_list)

View File

@@ -1,49 +0,0 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# ##### END GPL LICENSE BLOCK #####
# Filename : stroke_texture.py
# Author : Stephane Grabli
# Date : 04/08/2005
# Purpose : Draws textured strokes (illustrate the StrokeTextureShader shader)
from freestyle.chainingiterators import ChainSilhouetteIterator
from freestyle.predicates import (
NotUP1D,
QuantitativeInvisibilityUP1D,
TrueUP1D,
)
from freestyle.shaders import (
BezierCurveShader,
ConstantColorShader,
ConstantThicknessShader,
SamplingShader,
StrokeTextureShader,
)
from freestyle.types import Operators, Stroke
Operators.select(QuantitativeInvisibilityUP1D(0))
Operators.bidirectional_chain(ChainSilhouetteIterator(), NotUP1D(QuantitativeInvisibilityUP1D(0)))
shaders_list = [
SamplingShader(3),
BezierCurveShader(4),
StrokeTextureShader("washbrushAlpha.bmp", Stroke.DRY_MEDIUM, True),
ConstantThicknessShader(40),
ConstantColorShader(0, 0, 0, 1),
]
Operators.create(TrueUP1D(), shaders_list)

View File

@@ -30,7 +30,6 @@ from freestyle.shaders import (
ConstantColorShader, ConstantColorShader,
ConstantThicknessShader, ConstantThicknessShader,
SamplingShader, SamplingShader,
StrokeTextureShader,
) )
from freestyle.types import IntegrationType, Operators, Stroke from freestyle.types import IntegrationType, Operators, Stroke
@@ -40,10 +39,8 @@ Operators.bidirectional_chain(ChainSilhouetteIterator())
#Operators.sequential_split(pyVertexNatureUP0D(Nature.VIEW_VERTEX), 2) #Operators.sequential_split(pyVertexNatureUP0D(Nature.VIEW_VERTEX), 2)
Operators.sort(pyZBP1D()) Operators.sort(pyZBP1D())
shaders_list = [ shaders_list = [
StrokeTextureShader("smoothAlpha.bmp", Stroke.OPAQUE_MEDIUM, False),
ConstantThicknessShader(3), ConstantThicknessShader(3),
SamplingShader(5.0), SamplingShader(5.0),
ConstantColorShader(0, 0, 0, 1), ConstantColorShader(0, 0, 0, 1),
] ]
Operators.create(pyDensityUP1D(2, 0.05, IntegrationType.MEAN, 4), shaders_list) Operators.create(pyDensityUP1D(2, 0.05, IntegrationType.MEAN, 4), shaders_list)
#Operators.create(pyDensityFunctorUP1D(8, 0.03, pyGetInverseProjectedZF1D(), 0, 1, IntegrationType.MEAN), shaders_list)