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>2015-02-28 13:03:34 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-02-28 13:03:34 +0300
commit4110b333b15014c19e5e343e3bd4e5370df3b48e (patch)
tree85a8050ad3822fd793ca73483edb028a10923c3e /add_curve_sapling
parent2e3875ef54f16a68840da79c70cc2225a1774f1d (diff)
Fix T43837: Can't change amount of leaves.
Leaves settings were simply never used (broken logic, dead branch code)...
Diffstat (limited to 'add_curve_sapling')
-rw-r--r--add_curve_sapling/__init__.py4
-rw-r--r--add_curve_sapling/utils.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/add_curve_sapling/__init__.py b/add_curve_sapling/__init__.py
index 7e09fb28..f36ab551 100644
--- a/add_curve_sapling/__init__.py
+++ b/add_curve_sapling/__init__.py
@@ -20,7 +20,7 @@ bl_info = {
"name": "Sapling",
"author": "Andrew Hale (TrumanBlending)",
"version": (0, 2, 6),
- "blender": (2, 71, 0),
+ "blender": (2, 73, 0),
"location": "View3D > Add > Curve",
"description": ("Adds a parametric tree. The method is presented by "
"Jason Weber & Joseph Penn in their paper 'Creation and Rendering of "
@@ -189,7 +189,7 @@ class AddTree(bpy.types.Operator):
max=1,
default=0, update=update_tree)
levels = IntProperty(name='Levels',
- description='Number of recursive branches (Levels)',
+ description='Number of recursive branches (Levels, note that last level is also used for generating leaves)',
min=1,
max=6,
default=3, update=update_tree)
diff --git a/add_curve_sapling/utils.py b/add_curve_sapling/utils.py
index b7740723..c3bcbe7a 100644
--- a/add_curve_sapling/utils.py
+++ b/add_curve_sapling/utils.py
@@ -586,7 +586,7 @@ def fabricate_stems(addsplinetobone, addstem, baseSize, branches, childP, cu, cu
tempPos.rotate(rotMat)
tempPos.rotate(p.quat)
newPoint.handle_right = p.co + tempPos
- if (storeN >= levels):
+ if (storeN == levels - 1):
# If this is the last level before leaves then we need to generate the child points differently
branchL = (length[n] + uniform(-lengthV[n], lengthV[n])) * (p.lengthPar - 0.6 * p.offset)
if leaves < 0: