Page MenuHome

Add Prompt to Save unsaved images when closing
Closed, ResolvedPublic

Description

We have now added the helpful dialog that asks if you wish to save unsaved changes when quitting.

However, this does not apply to images that have been modified inside of Blender. If you have an unsaved image, or changes made via texture painting, changes to said image won't get saved.

A lot of users have reported this problem.

We could solve it by either:

  1. Always saving images when you save the blend file or
  2. Adding a prompt, asking users to save unsaved changes to images.

Details

Type
To Do

Event Timeline

William Reynish (billreynish) lowered the priority of this task from Needs Triage by Developer to Normal.Feb 14 2019, 11:45 PM

Saving unsaved image data might need user input, how to do this in a sensible way that doesn't potentially trigger many dialogs?


This raises the question:

  • How to handle PSD images (we have read-only support).
  • How to handle movies which are loaded in the image editor.
  • How to handle images which are generated and have no file path to save to.
  • How to handle the situation when a file fails to save (ejected external device, disk-full, permissions.. etc).
Campbell Barton (campbellbarton) triaged this task as Needs Information from User priority.Feb 15 2019, 3:40 AM

@Campbell Barton (campbellbarton):

How to handle PSD images (we have read-only support).

I think PSD's are a red herring. Our support, or lack thereof for particular image formats has little bearing on this topic. If you have edited a PSD, but we cannot save it, I guess it should prompt to save in a different format then.

How to handle movies which are loaded in the image editor.

Not really sure what you mean. If they have been edited, then yes, this would apply too. But afaik you cannot paint on movie files, so I don't think movie files are really relevant, unless there's a use-case I am not thinking of.

How to handle images which are generated and have no file path to save to.

Just like with the blend itself, it would have to ask where to save.

How to handle the situation when a file fails to save (ejected external device, disk-full, permissions.. etc).

Then give an error message and allow user to select a different location?

William Reynish (billreynish) raised the priority of this task from Needs Information from User to Normal.Mar 27 2019, 4:29 PM

@Campbell Barton (campbellbarton):

How to handle PSD images (we have read-only support).

I think PSD's are a red herring. Our support, or lack thereof for particular image formats has little bearing on this topic. If you have edited a PSD, but we cannot save it, I guess it should prompt to save in a different format then.

Right, we could ignore this case, or we could treat them as generated images which need to have a save location set too.

How to handle movies which are loaded in the image editor.

Not really sure what you mean. If they have been edited, then yes, this would apply too. But afaik you cannot paint on movie files, so I don't think movie files are really relevant, unless there's a use-case I am not thinking of.

Currently you can paint onto movie files although it could be disabled, or - we handle it the same way as generated images.

How to handle images which are generated and have no file path to save to.

Just like with the blend itself, it would have to ask where to save.

How to handle the situation when a file fails to save (ejected external device, disk-full, permissions.. etc).

Then give an error message and allow user to select a different location?

We would want to have a way to cancel if there are many, or select a single location for all - in a way that handles matching file names properly.


It would be good if the proposal included these details about how error cases are handled since it's a majority of the work in completing the task.

Brecht Van Lommel (brecht) triaged this task as Confirmed, High priority.Apr 12 2019, 8:02 AM
Brecht Van Lommel (brecht) edited projects, added BF Blender; removed BF Blender: 2.8.

A good idea!
What about if some images were linked and not packed?

We discussed this at the homestretch workshop. We can't fix this entirely for 2.80, just the most important cases.

  • If the image has a file path, save to that.
  • If not, the image will be packed automatically.
  • Code must be added to make packing of float images as EXR work, currently only works as PNG.
  • Difficult cases like image sequences will be left to solve for a later release.

We discussed this at the homestretch workshop. We can't fix this entirely for 2.80, just the most important cases.

  • If the image has a file path, save to that.
  • If not, the image will be packed automatically.
  • Code must be added to make packing of float images as EXR work, currently only works as PNG.
  • Difficult cases like image sequences will be left to solve for a later release.

Are they prompts or actions?
Prompt, blocking file closing can be much easier and, maybe, useful, than actual automatical saving/packing.

Will this relate to renders results?
Sometimes we are making render image, saving it, editing or renaming it before closing Blender. Will closing autosave replace our edit?

Are they prompts or actions?

Only a prompt to save images and .blend file, or only .blend file.

Prompt, blocking file closing can be much easier and, maybe, useful, than actual automatical saving/packing.

Prompting for multiple image file is complicated in practice and will not happen for 2.80 in any case.

Will this relate to renders results?

No.

Only a prompt to save images and .blend file, or only .blend file.

Only prompt (with ability to turn off in properties) seems to be most suitable.
Autosave is suitable if it is needed in 100% cases, but in practice 80% of cases Blender launches is viewing (because Blender is the best viewer of *.blend files) or sketching/temporal usage when user wants to lost those data.
Also, for example, we are watching for filesizes, and we don't need autopacking all that stuff that we temporary brought in file for sketching something.

Prompting for multiple image file is complicated in practice and will not happen for 2.80 in any case.

Will this relate to renders results?

No.

What kind of multiple image file usage cases, if no relations to renders?

What kind of multiple image file usage cases, if no relations to renders?

Image sequences & stereo files.

What kind of multiple image file usage cases, if no relations to renders?

Image sequences & stereo files.

Wow. Image sequences are so huge, that they almost never wanted to be autopacked.
Usually special empty file is organized for videoediting, where sequences (and all other media) assumed to be linked.

Autosave is suitable if it is needed in 100% cases, but in practice 80% of cases Blender launches is viewing (because Blender is the best viewer of *.blend files) or sketching/temporal usage when user wants to lost those data.
Also, for example, we are watching for filesizes, and we don't need autopacking all that stuff that we temporary brought in file for sketching something.

Only images that have been painted on or baked to would be affected by this. I'm not sure if by sketching you mean painting the image, or just using annotation tools that don't actually affect the image. If you mean the former, I don't think there is a good way to automatically distinguish that, this is what the prompt to save only the .blend or also the images would be for.

Only images that have been painted on or baked to would be affected by this.

Good. Thanks for clarification.

I'm not sure if by sketching you mean painting the image.

Sketching here is wider production term, means "make some draft to figure out something and throw away the result".
"Edit to forget changes."

Should images also be saved/packed when a new file is loaded (instead of only when Blender quits)?
It's the same case, isn't it?

It's like having a generic File Close Dialog that is shown when a new file is loaded or Blender quits. Unfortunately, that fits really badly into the current operator system.

@Jacques Lucke (JacquesLucke) I think it is, yes - the important part is that the current file is closed, no so much if you Quit or do File>New or File>Open. It's the same issue.