diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-04 01:56:36 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-04 01:56:36 +0400 |
commit | b4b22699850a859d601bb4851d0af18f568b3061 (patch) | |
tree | 9f943565ad173592d0b7ba1af7c740dd7533cd65 /release | |
parent | 66a2b848972d47a033f617a40f9a9044756d1d32 (diff) |
Fix for the Sinus Displacement geometry modifier not working properly.
The problem was caused by keeping a reference to a Vector object that is
assumed to be unchanged, but actually altered by the geometry modifier.
The same code updates were made to similar code portions to prevent
possible future bugs.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/freestyle/style_modules/parameter_editor.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/release/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py index cf3c125bf6e..36d49d006a3 100644 --- a/release/scripts/freestyle/style_modules/parameter_editor.py +++ b/release/scripts/freestyle/style_modules/parameter_editor.py @@ -174,11 +174,11 @@ def iter_t2d_along_stroke(stroke): total = stroke.length_2d distance = 0.0 it = stroke.stroke_vertices_begin() + prev = it.object.point while not it.is_end: p = it.object.point - if not it.is_begin: - distance += (prev - p).length - prev = p + distance += (prev - p).length + prev = p.copy() # need a copy because the point can be altered t = min(distance / total, 1.0) yield it, t it.increment() @@ -475,11 +475,11 @@ class CalligraphicThicknessShader(ThicknessBlenderMixIn, ScalarBlendModifier): def iter_distance_along_stroke(stroke): distance = 0.0 it = stroke.stroke_vertices_begin() + prev = it.object.point while not it.is_end: p = it.object.point - if not it.is_begin: - distance += (prev - p).length - prev = p + distance += (prev - p).length + prev = p.copy() # need a copy because the point can be altered yield it, distance it.increment() @@ -658,7 +658,7 @@ def iter_stroke_vertices(stroke): p = sv.point if prev_p is None or (prev_p - p).length > 1e-6: yield sv - prev_p = p + prev_p = p.copy() it.increment() class RoundCapShader(StrokeShader): |