Undo bug between shape keys *AFTER 2.67* #35170

Closed
opened 2013-05-01 09:54:16 +02:00 by God Luna · 10 comments
- Operating System, Graphics card ---

Win 7, Nvidia.

- Blender version with error, and version that worked ---

Bug found in the last vesrion (2.66a)

- Short description of error ---

Any change done in the Basis mesh, and later compiled in another shape key, get duplicated when undo it in the basis shape again.

- Steps for others to reproduce the error (preferably based on attached .blend file) ---

In the basic scene:
Create a shape key for the basic cube.
Move the cube 5 units to the right, in the basis shape.
Go to the new shape, the change was done here too. Normal behavior until there.
Back to the basis shape, undo the transformation. The cube move then 5 units to the left (back to the original position).
Now, in the new shape key, the cube has moved 5 units to the left over the original position, resulting in a inverse transformation to the left. The data of all shape keys will do the same.


NOTE: @ideasman42 I found these steps a bit ambiguous, listed more explicit steps below.

  • Default cube in default scene.
  • Add 2x shape keys.
  • In Shape Keys panel, Select "Basis" shape.
  • Enter edit-mode.
  • Press G, X, 5, Enter.
  • In Shape Keys panel, Click on "Key 1" shape (note that it has also been moved).
  • In Shape Keys panel, Click on "Basis" shape.
  • Undo to the point before transforming (Ctrl-Z, 3 times).
  • In Shape Keys panel, Click on "Key 1".
  • Notice the mesh has now moved 5x to the left.
- Operating System, Graphics card --- Win 7, Nvidia. - Blender version with error, and version that worked --- Bug found in the last vesrion (2.66a) - Short description of error --- Any change done in the Basis mesh, and later compiled in another shape key, get duplicated when undo it in the basis shape again. - Steps for others to reproduce the error (preferably based on attached .blend file) --- In the basic scene: Create a shape key for the basic cube. Move the cube 5 units to the right, in the basis shape. Go to the new shape, the change was done here too. Normal behavior until there. Back to the basis shape, undo the transformation. The cube move then 5 units to the left (back to the original position). Now, in the new shape key, the cube has moved 5 units to the left over the original position, resulting in a inverse transformation to the left. The data of all shape keys will do the same. ---- NOTE: @ideasman42 I found these steps a bit ambiguous, listed more explicit steps below. - Default cube in default scene. - Add 2x shape keys. - In Shape Keys panel, Select "Basis" shape. - Enter edit-mode. - Press G, X, 5, Enter. - In Shape Keys panel, Click on "Key 1" shape (note that it has also been moved). - In Shape Keys panel, Click on "Basis" shape. - Undo to the point before transforming (Ctrl-Z, 3 times). - In Shape Keys panel, Click on "Key 1". - Notice the mesh has now moved 5x to the left.
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

%%%Update: Sorry... the bug ocurrs when you move a face(s) in edit mode, no moving all the cube.%%%

%%%Update: Sorry... the bug ocurrs when you move a face(s) in edit mode, no moving all the cube.%%%
Author

%%%Update 2: I have found that this only occurs when you create the base shape, create the new shape, THEN select the basis key and go then to edit mode. Move any face, change to the new shape (it's like the base vertex position of the shape is set then) and go back to the basis shape. Undo, back to the new shape and then the transform should be done twice.%%%

%%%Update 2: I have found that this only occurs when you create the base shape, create the new shape, THEN select the basis key and go then to edit mode. Move any face, change to the new shape (it's like the base vertex position of the shape is set then) and go back to the basis shape. Undo, back to the new shape and then the transform should be done twice.%%%

%%%Developer's note:
Root of the issue seems to be going to the fact undoMesh only stores-restored bmesh, but leaves mesh untouched. So when we're changing key block and hitting undo this happens:

  • When changing key block from and back to Basis, me->mvert corresponds to deformed cube (which is in our case 5 units away from the origin)
  • When hitting Undo, we're loading bmesh with non-deformed mesh, which is on the scene origin. This makes bmesh be 5 units away from me->mvert
  • When changing key block again or going out of edit node, offset propagation happens to the keyblocks. And at this point offset is 5 units in negative X direction, because of undo restored bmesh coords, but not mesh coords.

At least that's how i got it.

Undo after changing key block never was implemented in pre-bmesh blender, so perhaps for 2.67 safer change would be to free local mesh stack when changing key block, and full support of undo could either go to TODO or be solved after (supporting it would be nice, but there's also such limitation on curves/lattices..).

Campbell, your thoughts here?%%%

%%%Developer's note: Root of the issue seems to be going to the fact undoMesh only stores-restored bmesh, but leaves mesh untouched. So when we're changing key block and hitting undo this happens: - When changing key block from and back to Basis, me->mvert corresponds to deformed cube (which is in our case 5 units away from the origin) - When hitting Undo, we're loading bmesh with non-deformed mesh, which is on the scene origin. This makes bmesh be 5 units away from me->mvert - When changing key block again or going out of edit node, offset propagation happens to the keyblocks. And at this point offset is 5 units in negative X direction, because of undo restored bmesh coords, but not mesh coords. At least that's how i got it. Undo after changing key block never was implemented in pre-bmesh blender, so perhaps for 2.67 safer change would be to free local mesh stack when changing key block, and full support of undo could either go to TODO or be solved after (supporting it would be nice, but there's also such limitation on curves/lattices..). Campbell, your thoughts here?%%%

%%%Any updates here? %%%

%%%Any updates here? %%%
Author

%%%We NEED a update surely... It's a real butthache when i'm editing shape keys.... Is almost impossible to use the undo function when I have a lot of shape keys already created. Only a missclick, and all the shape keys get distorted, messed and un-sync with the basis.%%%

%%%We NEED a update surely... It's a real butthache when i'm editing shape keys.... Is almost impossible to use the undo function when I have a lot of shape keys already created. Only a missclick, and all the shape keys get distorted, messed and un-sync with the basis.%%%

Added subscriber: @mont29

Added subscriber: @mont29
Campbell Barton was unassigned by Bastien Montagne 2014-10-19 20:21:14 +02:00
Bastien Montagne self-assigned this 2014-10-19 20:21:14 +02:00

This issue was referenced by dab0bd9de6

This issue was referenced by dab0bd9de65a9be5e8ababba0e2799f994d5d12f

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit dab0bd9de6.

Closed by commit dab0bd9de6.
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#35170
No description provided.