"Auto Save Modified Image" when closing blender is not working. #66628

Closed
opened 2019-07-09 22:49:18 +02:00 by Gustavo · 12 comments

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce GTX 950/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 399.24

Blender Version
Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-09 12:03, hash: db45aaafab
Worked: (optional)

Short description of error
"Auto Save modified image" when closing blender is not working.

Exact steps for others to reproduce the error
[Please describe the exact steps needed to reproduce the issue]
[Based on the default startup or an attached .blend file (as simple as possible)]

1 - Enter texture paint mode with any object that already has an image assigned to it.
2 - Paint something.
3 - Save the blend file without saving the image.
4 - close blender (Blander will say: "This file has unsaved changes - Save 1 modified image").
5 - Click Save to save the image and close Blender
6 - When we open blender and the file again, the image is opened with the base color, but without the texture paint that was done.

**System Information** Operating system: Windows-10-10.0.18362 64 Bits Graphics card: GeForce GTX 950/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 399.24 **Blender Version** Broken: version: 2.80 (sub 74), branch: master, commit date: 2019-07-09 12:03, hash: `db45aaafab` Worked: (optional) **Short description of error** "Auto Save modified image" when closing blender is not working. **Exact steps for others to reproduce the error** [Please describe the exact steps needed to reproduce the issue] [Based on the default startup or an attached .blend file (as simple as possible)] 1 - Enter texture paint mode with any object that already has an image assigned to it. 2 - Paint something. 3 - Save the blend file without saving the image. 4 - close blender (Blander will say: "This file has unsaved changes - Save 1 modified image"). 5 - Click Save to save the image and close Blender 6 - When we open blender and the file again, the image is opened with the base color, but without the texture paint that was done.
Author

Added subscriber: @GustavoRosa

Added subscriber: @GustavoRosa

Added subscriber: @CraigD

Added subscriber: @CraigD

I was able to replicate this issue. Doesn't seem to matter if the image is new, packed, or a file object. unsaved edits to image do not seem to be getting saved.

I was able to replicate this issue. Doesn't seem to matter if the image is new, packed, or a file object. unsaved edits to image do not seem to be getting saved.

Added subscribers: @JacquesLucke, @mano-wii

Added subscribers: @JacquesLucke, @mano-wii
Jacques Lucke was assigned by Germano Cavalcante 2019-07-10 16:55:33 +02:00

Feature implemented on 5ce3f69d.
@JacquesLucke, am I doing something wrong? Because I can confirm it and I suppose this is a high priority bug.

Feature implemented on 5ce3f69d. @JacquesLucke, am I doing something wrong? Because I can confirm it and I suppose this is a high priority bug.
Member

Looks like this broke in 11c9702dd4.

Looks like this broke in 11c9702dd4.
Member

Added subscriber: @brecht

Added subscriber: @brecht
Member

Something like this should fix the issue:

diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index 49b13da6b21..ef957fa03c5 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -2949,7 +2949,12 @@ static void wm_block_file_close_save(bContext *C, void *arg_block, void *arg_dat
   UI_popup_block_close(C, win, arg_block);
 
   if (save_images_when_file_is_closed) {
-    if (!ED_image_should_save_modified(C)) {
+    if (ED_image_should_save_modified(C)) {
+      ReportList *reports = CTX_wm_reports(C);
+      ED_image_save_all_modified(C, reports);
+      WM_report_banner_show();
+    }
+    else {
       execute_callback = false;
     }
   }

@brecht, any reason for why you removed this partially?

Something like this should fix the issue: ``` diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c index 49b13da6b21..ef957fa03c5 100644 --- a/source/blender/windowmanager/intern/wm_files.c +++ b/source/blender/windowmanager/intern/wm_files.c @@ -2949,7 +2949,12 @@ static void wm_block_file_close_save(bContext *C, void *arg_block, void *arg_dat UI_popup_block_close(C, win, arg_block); if (save_images_when_file_is_closed) { - if (!ED_image_should_save_modified(C)) { + if (ED_image_should_save_modified(C)) { + ReportList *reports = CTX_wm_reports(C); + ED_image_save_all_modified(C, reports); + WM_report_banner_show(); + } + else { execute_callback = false; } } ``` @brecht, any reason for why you removed this partially?

@JacquesLucke I'm not sure what I was thinking, I think your fix is fine.

@JacquesLucke I'm not sure what I was thinking, I think your fix is fine.

To be clear, you can go ahead and commit this now.

To be clear, you can go ahead and commit this now.

This issue was referenced by 3c4f6399d9

This issue was referenced by 3c4f6399d987fb3f832ba3c1ca0fea9426d6d7f5
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
6 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#66628
No description provided.