Operating system: Linux-5.4.0-47-generic-x86_64-with-debian-bullseye-sid 64 Bits
Graphics card: GeForce GTX 1060 6GB/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 440.100
Broken: version: 2.91.0 Alpha, branch: master, commit date: 2020-09-16 21:05, hash: rB27660b3cd90d
Worked: No idea
Short description of error
Rendering an image (F12) runs frame_change_pre handler() (I don't know why, but it seems to do so). The bug is: If frame change routine contains object deletion (using bpy.ops.object.delete()) then that deletion fails when image is rendered.
However, object deletion works correctly when frame_change_pre handler() is called when the frame is changed e.g. in Blender Timeline Editor. It is only the call from Render Image where deletion fails. This bug is an issue when object deletion is followed by object creation -> additional unwanted objects are created at every render.
Exact steps for others to reproduce the error
- Open attached file (from T79464)
- Click Run Script
- Render image
The script in the callback should delete the "Cube" object (once it is selected), but no object is deleted.