[Bf-extensions-cvs] [b5e7aac] master: Fix T39777: Blender 2.65-2.7 Sapling Bug
Bastien Montagne
noreply at git.blender.org
Fri Apr 18 08:46:12 CEST 2014
Commit: b5e7aac94f308e62307bd4a2850ced1dcad29c01
Author: Bastien Montagne
Date: Fri Apr 18 08:43:34 2014 +0200
https://developer.blender.org/rBAb5e7aac94f308e62307bd4a2850ced1dcad29c01
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...).
===================================================================
M add_curve_sapling/__init__.py
M add_curve_sapling/utils.py
===================================================================
diff --git a/add_curve_sapling/__init__.py b/add_curve_sapling/__init__.py
index 272d5ab..91a5808 100644
--- a/add_curve_sapling/__init__.py
+++ b/add_curve_sapling/__init__.py
@@ -25,7 +25,7 @@ bl_info = {
"description": ("Adds a parametric tree. The method is presented by "
"Jason Weber & Joseph Penn in their paper 'Creation and Rendering of "
"Realistic Trees'."),
- "warning": "length parameters may cause errors", # used for warning icon and text in addons panel
+ #"warning": "length parameters may cause errors", # used for warning icon and text in addons panel
"wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/"
"Scripts/Curve/Sapling_Tree",
"tracker_url": "https://developer.blender.org/T27226",
diff --git a/add_curve_sapling/utils.py b/add_curve_sapling/utils.py
index cba70ab..2ff8642 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])
More information about the Bf-extensions-cvs
mailing list