I have a set of points/vertices, I want to edit their location and add a shape key to catch the new location. I want to do this around 30 times. In the end producing an animation through keyframes. I am trying to test on a cube. My original simplistic thought was to add a shape key and then move a specific vert:
import bpy #moves the first vertice in the cube down 4 units o = bpy.data.meshes['Cube'] verts = o.vertices v = verts bpy.ops.object.shape_key_add(from_mix=True) v.co = -5
but that didn’t work. It seems that a specific vertice has to be moved in an edit mode session for the shape key to work properly. So I tried selecting a specific vert inside an edit session. This is where I am stuck. I am unable to select a specific vertice inside an edit session through python. If anyone has any ideas on how to select a vertice inside an edit session through python or animate a field of vertices where each vertice moves in a specific direction every time step please let me know.
Any and all help is appreciated.