diff options
author | Andrew Hale <TrumanBlending@gmail.com> | 2011-08-22 11:56:27 +0400 |
---|---|---|
committer | Andrew Hale <TrumanBlending@gmail.com> | 2011-08-22 11:56:27 +0400 |
commit | e8b28e4d5ad91500e201e014465a03c5ba2b6261 (patch) | |
tree | b4331fe83419ed2923af5f64c10a51749ba3cb1e /add_curve_sapling/utils.py | |
parent | 2bc0a0df5bb18c4b41a22fbde5ffb9d92c9f0109 (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.py | 5 |
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 |