JannisX11 / blockbench

Blockbench - A low poly 3D model editor
https://www.blockbench.net
GNU General Public License v3.0
3.06k stars 271 forks source link

Saving issues. #2275

Open CJMoseley opened 2 months ago

CJMoseley commented 2 months ago

What are you trying to do, and what do you expect to happen?

After saving a project with "Save as..." if you later hit Ctrl-S the you would expect the save to affect the new file. This is consistent with how every editor edits files on Windows.

What happens instead?

Blockbench instead overwrites the original file (from before the Save As). This makes ctrl-s useless forcing uses to use save as or export in every situation, just in case they overright a file that they would like to preserve.

Model format in which the issue occurs

all

Blockbench variant

Program

Blockbench version

4.9.4

Operating System

Windows10

Installed Blockbench plugins

None

JannisX11 commented 2 months ago

Cannot reproduce.

CJMoseley commented 2 months ago

How can you not able to reproduce this issue. It happens consistently if you "save as..." under a new filename, make a change to the model, and then hit ctrl-S, it overwrites the original file not the new one.

vysker commented 1 month ago

Also experiencing this issue. Here's the steps to reproduce:

  1. File > New > Generic Model
  2. File Name: "bench"; Model Identifier: "bench"
  3. Save Project As <some-folder>/bench
  4. Create cube
  5. Create texture
  6. Paint everything green
  7. Save texture to <some-folder>/bench
  8. Save Project
  9. Use your OS's file explorer/finder and move the file project/texture files to <some-folder>/old/bench
  10. Save Project As <some-folder>/bench
  11. Paint everything blue
  12. Save Project

You should now notice two things:

  1. There is no project nor texture created under <some-folder>/bench; only <some-folder>/old/bench exists
  2. The old project and texture under <some-folder>/old/bench are painted blue, even though it should have been green

I understand that point 2 is caused by the fact that we didn't "Save As" the texture separately. I guess that's expected behavior. But here's where it gets confusing:

  1. Continuing from the state above, close the "bench" project
  2. File > New > Generic Model
  3. File Name: "bench"; Model Identifier: "bench"
  4. Save Project As <some-folder>/bench
  5. Create cube
  6. Create texture
  7. Paint everything red
  8. Save texture to <some-folder>/bench
  9. Save Project

You should now notice two things:

  1. There's still no project or texture under <some-folder>/bench
  2. The old project and texture under <some-folder>/old/bench are painted red, even though it should have been blue

Expected behavior:

  1. It should have created a new project file at <some-folder>/bench
  2. It should have created a new texture at <some-folder>/bench

I even have a project on my device where the texture has been renamed, but still writes to the old texture. But I have to do some more testing to reproduce it.

It might have something to do with the temporary directories that are used to store blockbench projects.

My operating system is Arch/Manjaro Linux.

JannisX11 commented 1 month ago

@vysker I cannot reproduce any of these issues. They might be specific to Arch Linux. I will have to test that another time. OP was using Windows though. How did you install? AUR?