Flush edit and sculpt modes for autosave #110088

Open
Joseph Eagar wants to merge 2 commits from JosephEagar/blender:autosave-edit-sculpt-modes into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Member

This is a reimplementation of the hack I did in temp-sculpt-dyntopo to attract testers. It flushes editmode/sculpt mode during autosave. It works for everything except text objects. I had to write a function to safely encode a memfile step without changing state in the undo stack, but it seems to work.

This is a reimplementation of the hack I did in temp-sculpt-dyntopo to attract testers. It flushes editmode/sculpt mode during autosave. It works for everything except text objects. I had to write a function to safely encode a memfile step without changing state in the undo stack, but it seems to work.
Joseph Eagar added 2 commits 2023-07-14 03:32:48 +02:00
Joseph Eagar requested review from Campbell Barton 2023-07-17 19:01:56 +02:00

This topic pops up every now and then, and the unfortunate aspect of it is that it is more complicated that it seems.

Such flushing is not necessarily cheap (time-wise) to do. So doing so will introduce a lag for artists: some strokes will be "eaten" or heavily delayed because the system is busy performing the flush and autosave. If i remember correctly, this is an exact issue of what was driving artists crazy here during the Spring project when the undo system did undergo redesign for 2.80.

Additionally, the reality is that flushing of both shapekeys and multires changes might have unreversible consequences. Surely, it would be awesome to get those addressed, but to me it is a factor which needs to be taken into account when working on functionality like this.

Ideally, the auto-save will never interfere with artists. There are two ways to explore is see:

  • Somehow benefit from implicit sharing, so that we do not need to have the auto-save a locking operation from the users perspective
  • Allow saving edit-mode state to autosave file.

Those are not mutually exclusive points: doing less to be able to save autosave.blend is always good, but even if we do less then it is still good to do in a non-locking manner.

This topic pops up every now and then, and the unfortunate aspect of it is that it is more complicated that it seems. Such flushing is not necessarily cheap (time-wise) to do. So doing so will introduce a lag for artists: some strokes will be "eaten" or heavily delayed because the system is busy performing the flush and autosave. If i remember correctly, this is an exact issue of what was driving artists crazy here during the Spring project when the undo system did undergo redesign for 2.80. Additionally, the reality is that flushing of both shapekeys and multires changes might have unreversible consequences. Surely, it would be awesome to get those addressed, but to me it is a factor which needs to be taken into account when working on functionality like this. Ideally, the auto-save will never interfere with artists. There are two ways to explore is see: * Somehow benefit from implicit sharing, so that we do not need to have the auto-save a locking operation from the users perspective * Allow saving edit-mode state to autosave file. Those are not mutually exclusive points: doing less to be able to save autosave.blend is always good, but even if we do less then it is still good to do in a non-locking manner.
Sergey Sharybin requested review from Julien Kaspar 2023-07-25 10:56:14 +02:00
This pull request has changes conflicting with the target branch.
  • source/blender/editors/include/ED_undo.h
  • source/blender/windowmanager/intern/wm_files.cc

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u autosave-edit-sculpt-modes:JosephEagar-autosave-edit-sculpt-modes
git checkout JosephEagar-autosave-edit-sculpt-modes
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
2 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#110088
No description provided.