System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: Intel(R) UHD Graphics 600 Intel 4.5.0 - Build 24.20.100.6137
Blender Version
Broken: version: 2.80 (sub 74), branch: blender2.7, commit date: 2019-06-16 23:08, hash: rB12da679fa094
Worked: (optional)
Short description of error
bpy.ops.text.cut +bpy.ops.text.paste will fail when undo.
Exact steps for others to reproduce the error
- Copy/paste the following script into the text editor.
- Select some of the uncommented text.
- Run the script.
- The script now cuts(copies) and pastes.
- No change should be seen.
- Undo.
- The selected text disappears.
This is the bug. All operators using cut+paste will not be able to undo correct.
Change "cut" to "copy" to see the correct behavior.
import bpy
print("Hello World")
bpy.ops.text.cut()
bpy.ops.text.paste()
################################################
#Highlight a bit of this text and run the script
#Then undo - the text will not be restored.
################################################