Set the shape key between Cube.001 and Cube. The shape key will be inserted in the name specified later. In the case of this sample, it is inserted on the Cube side.
import bpy
objectToSelect = bpy.data.objects["Cube.001"]
objectToSelect.select_set(True)
objectToSelect = bpy.data.objects["Cube"]
objectToSelect.select_set(True)
bpy.context.view_layer.objects.active = objectToSelect
bpy.ops.object.join_shapes()
Blender2.8 Personal notes
Recommended Posts