-def import_shape_key(l, mesh):
- print('import_shape_key: %s' % mesh.name)
- return 0
- # ToDo
- key = mesh.getData().key
- if key is None:
- Draw.PupMenu('selecting mesh not has a Key')
- return
- # get or create IPO
- ipo = key.getIpo()
- if ipo == None:
- ipo = Blender.Ipo.New("Key", "ShapeKey")
- key.ipo = ipo
+def getKey(mesh, name):
+ for shapeKey in mesh.shape_keys.keys:
+ if shapeKey.name==name:
+ return shapeKey
+
+
+def import_shape_key(l, meshObject):
+ print('import_shape_key: %s' % meshObject.name)