Added to the Parameter Editor mode new stroke geometry modifier `Blueprint'

that produces a blueprint using circular, elliptic, and square contour strokes.
Related changes and bug fixes were made as follows:

* The randomness in radius and center has been transformed into optional
parameters of the pyBluePrintCirclesShader and pyBluePrintEllipsesShader.
Also a new optional parameter to control the randomness of backbone
stretching has been added to the pyBluePrintSquaresShader.

* A bug in the pyBluePrintSquaresShader that invisible stroke vertices at
corners of rectangular contour strokes were not properly drawn.  The problem
was due to the changes of the / operator between Python 2.x to 3.x.  Even
when the two operands of the division operator are integers, Python 3.x
gives a floating-point number when the quotient is not an integer.  The fix
was just to replace the / operator by the // operator for integer division.

* An unpleasant discontinuity in circular and elliptical contour strokes
was fixed.

* The length parameter of the Backbone Stretcher geometry modifier has been
renamed to `backbone_length' in line with the parameter of the same name in
the pyBluePrintSquaresShader.
This commit is contained in:
2011-11-11 20:35:03 +00:00
parent 80e398e7b2
commit e7a4d45435
8 changed files with 181 additions and 52 deletions

View File

@@ -973,7 +973,7 @@ def process(layer_name, lineset_name):
m.frequency, m.amplitude, m.octaves, m.angle, _seed.get(m.seed)))
elif m.type == "BACKBONE_STRETCHER":
shaders_list.append(BackboneStretcherShader(
m.amount))
m.backbone_length))
elif m.type == "TIP_REMOVER":
shaders_list.append(TipRemoverShader(
m.tip_length))
@@ -983,6 +983,16 @@ def process(layer_name, lineset_name):
elif m.type == "GUIDING_LINES":
shaders_list.append(GuidingLinesShader(
m.offset))
elif m.type == "BLUEPRINT":
if m.shape == "CIRCLES":
shaders_list.append(pyBluePrintCirclesShader(
m.rounds, m.random_radius, m.random_center))
elif m.shape == "ELLIPSES":
shaders_list.append(pyBluePrintEllipsesShader(
m.rounds, m.random_radius, m.random_center))
elif m.shape == "SQUARES":
shaders_list.append(pyBluePrintSquaresShader(
m.rounds, m.backbone_length, m.random_backbone))
color = linestyle.color
shaders_list.append(ConstantColorShader(color.r, color.g, color.b, linestyle.alpha))
shaders_list.append(ConstantThicknessShader(linestyle.thickness))