diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-12-07 04:14:38 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-12-07 04:14:38 +0300 |
commit | ec5d4c9a379f688f5350d42649fecf4023e4a805 (patch) | |
tree | 481f7ce7b86cb4610caf290fe2954694d76de441 /add_curve_sapling | |
parent | 259f694d1489dfb58540d5fd21de1c6903581a02 (diff) |
Fix T58896: Addons with ob.vertex_groups.new without name keywork
Original report: OBJ file import fails for objects with vertex groups defined when polygroups option is selected
Diffstat (limited to 'add_curve_sapling')
-rw-r--r-- | add_curve_sapling/utils.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/add_curve_sapling/utils.py b/add_curve_sapling/utils.py index fb1fc7d3..52139aec 100644 --- a/add_curve_sapling/utils.py +++ b/add_curve_sapling/utils.py @@ -821,9 +821,9 @@ def create_armature(armAnim, leafP, cu, frameRate, leafMesh, leafObj, leafVertSi # If there are leaves then we need a new vertex group so they will attach to the bone if not leafAnim: if (len(levelCount) > 1) and (i >= levelCount[-2]) and leafObj: - leafObj.vertex_groups.new(boneName) + leafObj.vertex_groups.new(name=boneName) elif (len(levelCount) == 1) and leafObj: - leafObj.vertex_groups.new(boneName) + leafObj.vertex_groups.new(name=boneName) """ # If this is first point of the spline then it must be parented to the level above it if n == 0: @@ -997,7 +997,7 @@ def create_armature(armAnim, leafP, cu, frameRate, leafMesh, leafObj, leafVertSi ) for group in vertexGroups: - leafObj.vertex_groups.new(group) + leafObj.vertex_groups.new(name=group) leafObj.vertex_groups[group].add(vertexGroups[group], 1.0, 'ADD') # Now we need the rotation mode to be 'XYZ' to ensure correct rotation @@ -1988,7 +1988,7 @@ def addTree(props): treeMesh.from_pydata(treeVerts, treeEdges, ()) for group in vertexGroups: - treeObj.vertex_groups.new(group) + treeObj.vertex_groups.new(name=group) treeObj.vertex_groups[group].add(vertexGroups[group], 1.0, 'ADD') # add armature |