Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion vg_to_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@

#vertex group index list
def vg_idx_list(vgn):
return([[v.index, v.groups[0].weight] for v in bpy.context.object.data.vertices if bpy.context.object.vertex_groups[vgn].index in [vg.group for vg in v.groups]])
vgi = bpy.context.object.vertex_groups[vgn].index
return([
[v.index, v.groups[[vg.group for vg in v.groups].index(vgi)].weight]
for v in bpy.context.object.data.vertices
if vgi in [vg.group for vg in v.groups]
])

#vertex group {name: [indexes]} dictionary
def vg_idx_dict():
Expand Down