# Deprecated API
bpy.ops.object.delete({"selected_objects": objects_to_delete})
# New API
with context.temp_override(selected_objects=objects_to_delete):
bpy.ops.object.delete()
This is stated in the 3.2 release notes.
Currently, on 3.1, I am deleting objects like so:
bpy.data.objects.remove(my_object, do_unlink = True)
Im curious of 2 things now:
- Does this change affect my current script?
- Am I deleting stuff the wrong way?