import bpy
import bmesh
def dump(mesh):
bm = bmesh.new()
bm.from_mesh(mesh)
bm.verts.ensure_lookup_table()
for key in bm.verts.layers.shape.keys():
val = bm.verts.layers.shape.get(key)
print("%s = %s" % (key,val) )
sk=mesh.shape_keys.key_blocks[key]
print("v=%f of [%f .. %f], f=%f, g=%r, b=%r" % ( sk.value, sk.slider_min, sk.slider_max,
sk.frame, sk.vertex_group, sk.relative_key.name))
for i in range(len(bm.verts)):
v = bm.verts[i]
delta = v[val] - v.co
if (delta.length > 0):
print ( "v[%d]+%s" % ( i,delta) )
dump(bpy.context.active_object.data)
|
Blender python API quick-start
Syntax highlighting by Pygments.