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:
authorAndrew Hale <TrumanBlending@gmail.com>2011-08-22 11:56:27 +0400
committerAndrew Hale <TrumanBlending@gmail.com>2011-08-22 11:56:27 +0400
commite8b28e4d5ad91500e201e014465a03c5ba2b6261 (patch)
treeb4331fe83419ed2923af5f64c10a51749ba3cb1e /add_curve_sapling/utils.py
parent2bc0a0df5bb18c4b41a22fbde5ffb9d92c9f0109 (diff)
Version 0.2.5:
- Fixed the assignment of vertex groups for rectangular leaves. Fix thanks to pawel_xx - Compressed the UI to make accessing the different parameters easier. Also, the tree is not rebuilt every time a new menu section is accessed.
Diffstat (limited to 'add_curve_sapling/utils.py')
-rw-r--r--add_curve_sapling/utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/add_curve_sapling/utils.py b/add_curve_sapling/utils.py
index 14401a02..75dd1bcd 100644
--- a/add_curve_sapling/utils.py
+++ b/add_curve_sapling/utils.py
@@ -914,8 +914,11 @@ def addTree(props):
# If there are leaves we need to assign vertices to their vertex groups
if leaves:
offsetVal = 0
+ leafVertSize = 6
+ if leafShape == 'rect':
+ leafVertSize = 4
for i,cp in enumerate(childP):
- for v in leafMesh.vertices[6*i:(6*i+6)]:
+ for v in leafMesh.vertices[leafVertSize*i:(leafVertSize*i+leafVertSize)]:
leafObj.vertex_groups[cp.parBone].add([v.index],1.0,'ADD')
# Now we need the rotation mode to be 'XYZ' to ensure correct rotation