Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-04-18 10:43:34 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-04-18 10:43:34 +0400
commitb5e7aac94f308e62307bd4a2850ced1dcad29c01 (patch)
treeb360bc5064e234c48acc046ec8d7417757a0b979 /add_curve_sapling/utils.py
parentc74a03c3ebb0f8e133c98a94bacef0b4832e1d6a (diff)
Fix T39777: Blender 2.65-2.7 Sapling Bug
Clamp branchL to min 0.0 (negative branch length does not make much sense, and non-int power of negative numbers gives complex numbers...).
Diffstat (limited to 'add_curve_sapling/utils.py')
-rw-r--r--add_curve_sapling/utils.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/add_curve_sapling/utils.py b/add_curve_sapling/utils.py
index cba70ab0..2ff86424 100644
--- a/add_curve_sapling/utils.py
+++ b/add_curve_sapling/utils.py
@@ -606,6 +606,7 @@ def addTree(props):
childStems = False
else:
childStems = leaves*shapeRatio(leafDist,p.offset/p.lengthPar)
+ branchL = max(branchL, 0.0)
# Determine the starting and ending radii of the stem using the tapering of the stem
startRad = min(p.radiusPar[0]*((branchL/p.lengthPar)**ratioPower), p.radiusPar[1])
endRad = startRad*(1 - taper[n])