Undo (Ctrl+z) doesn't work properly on shading and timeline #117092

Open
opened 2024-01-13 16:24:47 +01:00 by Felipe · 9 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 527.37

Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b727
Worked: (newest version of Blender that worked as expected)

Short description of error
It's simple, I do a minor change on the shading or timeline, I want go back and it doesn't work. I then press a bunch of times and I lose a like 10 changes I did on the project. Was it supposed to be like this?

Exact steps for others to reproduce the error
Go into shading mode, change color or any value, then try to undo it (doesn't work here)
Go into pose mode, select all bones, go into time line, if you make a single change on the keyframes, you need 2~3 ctrlz to undo it, if you do two changes, you need 7~8 and it won't be in steps, the two changes will be undone, not just one.

Also, I've teste with just a cube, both shading and posing works perfectly. * confused *

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 527.37 **Blender Version** Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: `9be62e85b727` Worked: (newest version of Blender that worked as expected) **Short description of error** It's simple, I do a minor change on the shading or timeline, I want go back and it doesn't work. I then press a bunch of times and I lose a like 10 changes I did on the project. Was it supposed to be like this? **Exact steps for others to reproduce the error** Go into shading mode, change color or any value, then try to undo it (doesn't work here) Go into pose mode, select all bones, go into time line, if you make a single change on the keyframes, you need 2~3 ctrlz to undo it, if you do two changes, you need 7~8 and it won't be in steps, the two changes will be undone, not just one. Also, I've teste with just a cube, both shading and posing works perfectly. * confused *
Felipe added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2024-01-13 16:24:48 +01:00
Iliya Katushenock added the
Interest
Undo
label 2024-01-13 16:41:31 +01:00
Member

Thanks for the report. Can confirm actually. Somehow changes done in UI is writing to paintcurve_undosystem

Thanks for the report. Can confirm actually. Somehow changes done in UI is writing to `paintcurve_undosystem`
Member

Possibly the file was somehow corrupted? UI changes in pose mode should be written to memfile instead of paintcurve_undosys
Did you have any add-on that allowed you to paint/draw in different modes?

Possibly the file was somehow corrupted? UI changes in pose mode should be written to memfile instead of paintcurve_undosys Did you have any add-on that allowed you to paint/draw in different modes?
Pratik Borhade added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-01-15 13:02:40 +01:00
Author

Thank you guys for replying

I don't have any addons.

I'm thinking of one thing I can do that might help you guys. I have like v1, v2, v3 all the way to this final, I can try to see where it starts to happen.

Would that help?

Thank you guys for replying I don't have any addons. I'm thinking of one thing I can do that might help you guys. I have like v1, v2, v3 all the way to this final, I can try to see where it starts to happen. Would that help?
Member

That might help, yes. I further deleted everything and replaced with single bone but paintcurve_undosys still writes the undo step for UI changes.

That might help, yes. I further deleted everything and replaced with single bone but `paintcurve_undosys` still writes the undo step for UI changes.
Member

Hi, any updates?

Hi, any updates?
Member

Not sure how file end up in such situation, I don't think this is a bug. @mont29 hi, can you check?

Not sure how file end up in such situation, I don't think this is a bug. @mont29 hi, can you check?
Bastien Montagne added the
Module
Sculpt, Paint & Texture
label 2024-03-01 11:39:58 +01:00

I think this is a problem for the Sculpt & Paint module.

From quick analysis, the issue lies in the poll code of this module. Specifically:

  1. BKE_undosys_type_from_context loops over all known undo types and call their poll function with current context.
  2. paintcurve_undosys_poll calls paint_curve_poll
  3. paint_curve_poll gets no valid RegionView3D nor SpaceImage pointers from the context.
    a. But it does get a valid Paint pointer from BKE_paint_get_active_from_context, and the brush there is a BRUSH_CURVE one, so it returns true.

This whole logic sounds flawed, or at least fragile/incomplete to me, and obviously here does not produce the expected result (paintcurve_undosys_poll should never return true when the active object is in Object or Pose mode!).

I think this is a problem for the Sculpt & Paint module. From quick analysis, the issue lies in the `poll` code of this module. Specifically: 1. `BKE_undosys_type_from_context` loops over all known undo types and call their `poll` function with current context. 2. `paintcurve_undosys_poll` calls `paint_curve_poll` 3. `paint_curve_poll` gets no valid `RegionView3D` nor `SpaceImage` pointers from the context. a. But it does get a valid `Paint` pointer from `BKE_paint_get_active_from_context`, and the brush there is a `BRUSH_CURVE` one, so it returns true. This whole logic sounds flawed, or at least fragile/incomplete to me, and obviously here does not produce the expected result (`paintcurve_undosys_poll` should never return `true` when the active object is in Object or Pose mode!).
Bastien Montagne added
Type
Bug
Status
Confirmed
and removed
Type
Report
Status
Needs Information from User
labels 2024-03-01 11:46:46 +01:00
Author

Hey, can you believe I never had this issue anymore?

I really don't know what happened, I'm bad at 3D but I wasn't expecting to break blender.

I'm thinking about closing the thread here, since it's "solved".

Should I? Would I intefere in your investigation doing this?

Regards

Hey, can you believe I never had this issue anymore? I really don't know what happened, I'm bad at 3D but I wasn't expecting to break blender. I'm thinking about closing the thread here, since it's "solved". Should I? Would I intefere in your investigation doing this? Regards

@al777 there is a problem, but I think it only shows up if your last used brush is a curve one, which I guess does not happen often...

@al777 there is a problem, but I think it only shows up if your last used brush is a curve one, which I guess does not happen often...
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
3 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#117092
No description provided.