I have two objects with identical topology and shape keys. Copying over the static shape key values is simple enough.
def copy_shape_keys(source_obj_name, target_obj_name):
source_obj = bpy.data.objects.get(source_obj_name)
target_obj = bpy.data.objects.get(target_obj_name)
source_shape_keys = source_obj.data.shape_keys
target_shape_keys = target_obj.data.shape_keys
for source_key_block in source_shape_keys.key_blocks:
target_key_block = target_shape_keys.key_blocks.get(source_key_block.name)
target_key_block.value = source_key_block.value
How could this be extended to include copying over the keyframes of animated shape keys? Blenders API does not seem to provide the necessary access to shape key animation data for this to be feasible.
None of the answers from this thread directly address this question.
