left a print in and didnt account for no vgroups BPyMesh also had an error when meshWeight2List was called on a mesh with no vgroups

This commit is contained in:
Campbell Barton 2007-08-12 01:38:12 +00:00
parent 35c2498a40
commit 0d5f195ba7
2 changed files with 4 additions and 5 deletions

@ -56,7 +56,7 @@ def meshWeight2List(me):
if not len_groupNames:
# no verts? return a vert aligned empty list
return [[] for i in xrange(len(me.verts))]
return [[] for i in xrange(len(me.verts))], []
else:
vWeightList= [[0.0]*len_groupNames for i in xrange(len(me.verts))]

@ -38,11 +38,11 @@ def faceGroups2VertSets(face_groups):
def vgroup_average(ob_orig, me, sce):
if not me.getVertGroupNames():
return
weight_names, weight_list = meshWeight2List(me)
if not weight_names:
return
weight_names_len = len(weight_names)
vgroup_dummy = [0.0] * weight_names_len
vgroup_range = range(weight_names_len)
@ -59,7 +59,6 @@ def vgroup_average(ob_orig, me, sce):
weight_list[i] = collected_group # replace with the collected group
for j in vgroup_range: # iter through the vgroups
print collected_group, vert_group[j]
collected_group[j] += vert_group[j]
for j in vgroup_range: