I’m trying to animate a mesh(using ShapeKeys)
The plan is to:
- insert a key(the basis key)
- go to edit mode
- move the vertices
- insert a key
- exit edit mode
- if there’s a previous key, set it’s ipo key bezier value to 0.0
- set the current key value to 1.0
At the moment I tried to move the vertices by switching the editmode, looping through the mesh vertices and just updating each memeber:
mesh = ob.getData() if editmode: Window.EditMode(0) for v in range(0,232): mesh.verts[v] = verts[v] mesh.verts[v] = verts[v] mesh.verts[v] = verts[v] ob.insertShapeKey() if editmode: Window.EditMode(1)
ob would be the current object, and verts is a list of vertices for each shape key.
To keep this short, once I’ve defined a mesh:
can I got edit mode, end edit the mesh(vertices) ?
If so, how ?