flathub / org.blender.Blender

https://flathub.org/apps/details/org.blender.Blender
18 stars 26 forks source link

Autosave doesn't work by default (no access to /tmp?) #71

Open Chemrat opened 3 years ago

Chemrat commented 3 years ago

Default temporary files folder doesn't seem to be set to anything. Apparently this defaults to /tmp, but --filesystem=host actually doesn't include this folder, see https://docs.flatpak.org/en/latest/sandbox-permissions.html#filesystem-access

This seem to result in silently broken autosave system (at very least blender coudln't generate quit.blend until I changed the path). Either manifest should include /tmp access or maybe default should point to some different folder? There must be some location flatpak apps are supposed to use for personal tmp dir (flatpak/flatpak#3438 seems to be related).

plafue commented 3 years ago

I will look into this soon... The (flatpak) recommended place for temporary files gets cleaned up once the application exits, so we will work a bit against the encapsulation here... But until now --filesystem=host has been in use so... :shrug: .

You'll be notified when i create a pull request to test a possible solution.

Eoin-ONeill-Yokai commented 2 years ago

I've run into this issue too and it's pretty bad since it can result in a lot more lost work than needed.

Another solution is to change blender's temporary files directory to one you clean yourself. I have a script that regularly cleans ~/.local/tmp on my system, for instance. Setting it to that seems to have given me save recovery features again. Though it looks like the setting reset itself -- so it might not be very practical.

kevinsmia1939 commented 2 years ago

We can probably change the temp dir using environment variable.

https://docs.blender.org/manual/en/latest/advanced/blender_directory_layout.html#temp-dir

kevinsmia1939 commented 2 years ago

Hi, I have add TMP and TMP_DIR env var to point to /tmp which is in /run/user/1000/.flatpak/org.blender.Blender/ for me. The tmp files does not get delete when Blender exit. Just update Blender and let me know if it work for you. Feel free to open this again if it does not work.

christianbueno1 commented 1 year ago

The same problem in fedora 38, i had created a simple text animation then after render (ctrl+f12) , the file doesn't save in the default output:/tmp. I had searched so many times with the file manager trying to find the file, but the file is not saved there.

zhaozhixu commented 11 months ago

Hi, I have add TMP and TMP_DIR env var to point to /tmp which is in /run/user/1000/.flatpak/org.blender.Blender/ for me. The tmp files does not get delete when Blender exit. Just update Blender and let me know if it work for you. Feel free to open this again if it does not work.

Hi! This doesn't work...

Although now Blender can create quit.blend when exiting and this file exists after Blender quits, when Blender is opened again, the previous quit.blend file doesn't exist anymore. Looks like the /tmp dir gets cleared just before Blender's starting.

kevinsmia1939 commented 6 months ago

Hi, I have add TMP and TMP_DIR env var to point to /tmp which is in /run/user/1000/.flatpak/org.blender.Blender/ for me. The tmp files does not get delete when Blender exit. Just update Blender and let me know if it work for you. Feel free to open this again if it does not work.

Hi! This doesn't work...

Although now Blender can create quit.blend when exiting and this file exists after Blender quits, when Blender is opened again, the previous quit.blend file doesn't exist anymore. Looks like the /tmp dir gets cleared just before Blender's starting.

Hi, At this moment, I dont know what path it should be. Do you have some suggestion?

yar2001 commented 5 months ago

I changed the "Temporary File" Blender settings to /var/tmp and it seems to work. The file is actually saved to ~/.var/app/org.blender.Blender/cache/tmp.