Page MenuHome

Undoing "Run script" also swipes away the last changes in Text Editor
Closed, InvalidPublic

Description

The following is reproduced with Blender 2.55 Trunk r32870 WIN32.

Details of my computer:
Make/Model Dell Inc./Latitude E6500
Processor Intel Core 2 Duo CPU P9600 @ 2.66GHz (2 CPUs)
Graphics Card Intel Graphics Media Accelerator 4500MHD5
Operating System Windows XP Professional /SP3

Steps before start testing:
1) Start Blender and Click spash screen to close it -- see the cube selected
2) Select "Browse ID data" -> "Scripting" (replaces "Default")
3) In Text Editor, press "New" in order to "Create a new text data block"
4) Click in Text Editor in order to activate the cursor and type (copy & paste) the following lines:

import bpy

bpy.context.active_object.rotation_euler.y=3.141592/4

Steps to carry out the testing:
5) Click "Run Script" and see the rotation of the cube to change accordingly
6) Press Ctrl-Z in order to Undo "Run Script"

Actual result:
7) Undo restores the orientation of the of the cube, as it was before pressing "Run script"
8) Undo also restores the state _before_ text was typed in Text Editor, thus, last changes in Text Editor (in this case, all text) are lost

Expected result:
8*) Undo would restore the state _after_ text was typed in Text Editor, thus, last changes in Text Editor (in this case, all text) would not be lost

-------
Steps to circumvent this bug:
4+) After 4) and before 5) do the following in order to create some extra edit history:
4.1) Move pointer to 3D View
4.2) Press A to unselect all
4.3) Right-click the cube in order to select the cube again
5) Click "Run Script" and see the rotation of the cube to change accordingly
6) Press Ctrl-Z in order to Undo "Run Script"
7) Now the Cube's orientation is restored and text in Text Editor is not lost

Event Timeline

ubuntu 10.04 64bits rev 32959

confirmed.

Hi Heikki,

Thanks for the excellent report. The issue is a conflict between undo systems in Blender. We already suffer this like 5 years or so. I've created a wiki todo item on our list for it, with link to your report.
https://projects.blender.org/tracker/index.php?func=detail&aid=24543&group_id=9&atid=498

We're gathering all these todos and design failures for documentation as well. And hopefully a coder then will finally get his guts and fix it!

Ton Roosendaal (ton) changed the task status from Unknown Status to Invalid.Nov 10 2010, 6:31 PM