各ボーン名で空のvertex groupを作るスクリプト
2.49bで作成。
外部からArmatureをインポートするときにmodifierの方のArmatureを使う場合を想定。
print("#### start script ####") from Blender import Scene, Mesh, Window, sys, Modifier import BPyMessages import bpy def createVertexGroupWithEachBone(mesh, armature): print(mesh, armature) for b in armature.bones.keys(): mesh.addVertGroup(b) scene=Scene.GetCurrent() o=scene.objects.active for m in o.modifiers: print(m) if m.name=="Armature": createVertexGroupWithEachBone(o.getData(mesh=True), m[Modifier.Settings.OBJECT].getData())