Undoing "Run script" also swipes away the last changes in Text Editor #24543

Closed
opened 2010-11-04 23:26:21 +01:00 by Heikki Junes · 7 comments

%%%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%%%

%%%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%%%
Author

Changed status to: 'Open'

Changed status to: 'Open'

%%%ubuntu 10.04 64bits rev 32959

confirmed.
%%%

%%%ubuntu 10.04 64bits rev 32959 confirmed. %%%
Member

%%%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!%%%

%%%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!%%%
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Added subscriber: @n.fabretti

Added subscriber: @n.fabretti

Added subscriber: @APEC

Added subscriber: @APEC

Is it still persist in blender but in some other form?
In Edit mode if you run some simple code and then Edit - Undo, it will undo object changes after 3-4 undo action
Issue_with_Undo2.mp4

Is it still persist in blender but in some other form? In Edit mode if you run some simple code and then Edit - Undo, it will undo object changes after 3-4 undo action [Issue_with_Undo2.mp4](https://archive.blender.org/developer/F10240684/Issue_with_Undo2.mp4)
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#24543
No description provided.