[Bf-extensions-cvs] [4ba0ae0] master: Fix T44135: Sapling add-on broken in 2.74rc3.
Bastien Montagne
noreply at git.blender.org
Thu Mar 26 09:48:49 CET 2015
Commit: 4ba0ae05c030f93fbb18f36e6c87f36e1088bab1
Author: Bastien Montagne
Date: Thu Mar 26 09:44:56 2015 +0100
Branches: master
https://developer.blender.org/rBA4ba0ae05c030f93fbb18f36e6c87f36e1088bab1
Fix T44135: Sapling add-on broken in 2.74rc3.
Nothing broken here actually, just missing info (shape needs at least three levels
of branching to take effect).
To be backported to 2.74.
===================================================================
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 f36ab55..0022521 100644
--- a/add_curve_sapling/__init__.py
+++ b/add_curve_sapling/__init__.py
@@ -253,7 +253,7 @@ class AddTree(bpy.types.Operator):
description='Branch upward attraction',
default=0.0, update=update_tree)
shape = EnumProperty(name='Shape',
- description='The overall shape of the tree (Shape)',
+ description='The overall shape of the tree (Shape) - WARNING: at least three "Levels" of branching are needed',
items=shapeList,
default='7', update=update_tree)
baseSize = FloatProperty(name='Base Size',
@@ -415,7 +415,9 @@ class AddTree(bpy.types.Operator):
row.prop(self, 'resU')
box.prop(self, 'handleType')
- box.prop(self, 'shape')
+ sub = box.row()
+ sub.active = self.levels >= 3
+ sub.prop(self, 'shape')
box.prop(self, 'seed')
box.prop(self, 'ratio')
diff --git a/add_curve_sapling/utils.py b/add_curve_sapling/utils.py
index c3bcbe7..c07bbf9 100644
--- a/add_curve_sapling/utils.py
+++ b/add_curve_sapling/utils.py
@@ -594,7 +594,9 @@ def fabricate_stems(addsplinetobone, addstem, baseSize, branches, childP, cu, cu
else:
childStems = leaves * shapeRatio(leafDist, p.offset / p.lengthPar)
elif n == 1:
- # If this is the first level of branching then upward attraction has no effect and a special formula is used to find branch length and the number of child stems
+ # If this is the first level of branching then upward attraction has no effect
+ # and a special formula is used to find branch length and the number of child stems.
+ # This is also here that the shape is used.
vertAtt = 0.0
lMax = length[1] + uniform(-lengthV[1], lengthV[1])
lMax += copysign(1e-6, lMax) # Move away from zero to avoid div by zero
More information about the Bf-extensions-cvs
mailing list