I’m generating shape keys using code like this:
o = bpy.context.object
kb = o.data.shape_keys.key_blocks
kb[key_idx].data[vertex_idx].co = vertex_position
kb[key_idx].value = shape_key_weight
kb[key_idx].keyframe_insert(“value”, frame = frame_idx)
The generation works fine, and after running the script the shape keys appear in the “object data / shape keys”. But moving the time slider doesn’t animate the object in the 3D view. I first have to click with the mouse into the shape key list (object data / shape keys), which apparently triggers some internal update, that makes the 3D view animate. This manual step is tedious / impossible when shape-animating many objects that way.
Is there a python command that triggers this update, after generating shape keys?
Is there something simple (not requiring clicking though all objects) that you can do in the GUI that triggers this update?
Saving and loading the file, doesn’t fix the inconsistent state.