From 4110b333b15014c19e5e343e3bd4e5370df3b48e Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sat, 28 Feb 2015 11:03:34 +0100 Subject: Fix T43837: Can't change amount of leaves. Leaves settings were simply never used (broken logic, dead branch code)... --- add_curve_sapling/__init__.py | 4 ++-- add_curve_sapling/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'add_curve_sapling') 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: -- cgit v1.2.3