diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-11-12 00:35:03 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2011-11-12 00:35:03 +0400 |
commit | e7a4d454350beb1ce20f3d7d2d091451a885eefe (patch) | |
tree | 4709f76bb57fadbd7dcf85204be2ff5cd0d5b13e /release/scripts/freestyle/style_modules/parameter_editor.py | |
parent | 80e398e7b2cfbdf0192b11734cb02b378b423d65 (diff) |
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.
Diffstat (limited to 'release/scripts/freestyle/style_modules/parameter_editor.py')
-rw-r--r-- | release/scripts/freestyle/style_modules/parameter_editor.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/release/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py index 5036fa78438..5531082e68b 100644 --- a/release/scripts/freestyle/style_modules/parameter_editor.py +++ b/release/scripts/freestyle/style_modules/parameter_editor.py @@ -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)) |