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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-06-02 15:42:04 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2013-06-02 15:42:04 +0400
commit829581bbbd5b30805416e93656e82c86f9830683 (patch)
tree851fddabaa6b6c7f64eda04d27d8c88b44415296 /release
parentec30e3f00ecd3e366e13c233e34793f0ba3179aa (diff)
Fix for potential division by zero during Freestyle stroke rendering.
Problem report by Light BWK through personal communications with a sample .blend file for reproducing the problem. Thanks!
Diffstat (limited to 'release')
-rw-r--r--release/scripts/freestyle/style_modules/parameter_editor.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/freestyle/style_modules/parameter_editor.py b/release/scripts/freestyle/style_modules/parameter_editor.py
index 77710e08ece..6b7f57cbce1 100644
--- a/release/scripts/freestyle/style_modules/parameter_editor.py
+++ b/release/scripts/freestyle/style_modules/parameter_editor.py
@@ -184,7 +184,7 @@ def iter_t2d_along_stroke(stroke):
p = it.object.point
distance += (prev - p).length
prev = p.copy() # need a copy because the point can be altered
- t = min(distance / total, 1.0)
+ t = min(distance / total, 1.0) if total > 0.0 else 0.0
yield it, t
it.increment()