diff options
author | Brendon Murphy <meta.androcto1@gmail.com> | 2014-08-05 00:19:08 +0400 |
---|---|---|
committer | Brendon Murphy <meta.androcto1@gmail.com> | 2014-08-05 00:19:08 +0400 |
commit | cc4a3674e44c18c4d7ed38033c981d949f90a0bd (patch) | |
tree | a49bdbc79502551ac2d740862f5ad0980bc989b6 /add_curve_sapling | |
parent | 0e536cd1b7225ef7b6c9edd982b2d9d5c527ce92 (diff) |
fix for animated trees, thanks purplefrog. removed warning.
Diffstat (limited to 'add_curve_sapling')
-rw-r--r-- | add_curve_sapling/__init__.py | 2 | ||||
-rw-r--r-- | add_curve_sapling/utils.py | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/add_curve_sapling/__init__.py b/add_curve_sapling/__init__.py index a5739cbd..beae566e 100644 --- a/add_curve_sapling/__init__.py +++ b/add_curve_sapling/__init__.py @@ -25,7 +25,7 @@ bl_info = { "description": ("Adds a parametric tree. The method is presented by " "Jason Weber & Joseph Penn in their paper 'Creation and Rendering of " "Realistic Trees'."), - "warning": "Armature Mode buggy", + "warning": "", "wiki_url": "http://wiki.blender.org/index.php/Extensions:2.6/Py/" "Scripts/Curve/Sapling_Tree", "category": "Add Curve", diff --git a/add_curve_sapling/utils.py b/add_curve_sapling/utils.py index 8f49eeb5..acc95b4e 100644 --- a/add_curve_sapling/utils.py +++ b/add_curve_sapling/utils.py @@ -415,13 +415,16 @@ def create_armature(armAnim, childP, cu, frameRate, leafMesh, leafObj, leafShape arm.use_deform_delay = True # Add the armature modifier to the curve armMod = treeOb.modifiers.new('windSway', 'ARMATURE') - # armMod.use_apply_on_spline = True + #armMod.use_apply_on_spline = True armMod.object = armOb + armMod.use_bone_envelopes = True + armMod.use_vertex_groups = False # curves don't have vertex groups (yet) # If there are leaves then they need a modifier if leaves: armMod = leafObj.modifiers.new('windSway', 'ARMATURE') armMod.object = armOb - + armMod.use_bone_envelopes = True + armMod.use_vertex_groups = True # Make sure all objects are deselected (may not be required?) for ob in bpy.data.objects: ob.select = False @@ -856,8 +859,10 @@ def addTree(props): splineToBone = deque(['']) addsplinetobone = splineToBone.append + + leafMesh = None # in case we aren't creating leaves, we'll still have the variable - # Each of the levels needed by the user we grow all the splines + # Each of the levels needed by the user we grow all the splines for n in range(levels): storeN = n stemList = deque() |