guillaumechereau / goxel

Goxel: Free and Open Source 3D Voxel Editor
GNU General Public License v3.0
2.72k stars 219 forks source link

Open/save all formats #360

Closed madd-games closed 3 months ago

madd-games commented 3 months ago

This PR makes some changes to how open/save/import/export works:

The general idea is that if you open a file in any format, you should be able to save, instead of having to select the same file for 'export' every time. I think this makes sense and is done by other editors such as Aseprite, MSPaint, used to be done by GIMP (I don't like that they removed this).

It was problematic for me when I had to edit a whole bunch of files in a different format, and instead of being able to hit Ctrl+S to save, I had to go to export and find the directory and file every time.

Let me know if you have any questions, I'm also happy to make changes to the code.

guillaumechereau commented 3 months ago

Thanks for the PR. I'd like to make it work exactly like gimp currently does: "save" and "save as" only save in the 'gox' format, but when we directly import an image, in the file menu we add an explicit entry: "overwrite the_file.vox".

madd-games commented 3 months ago

This could work by having a separate export_path besides the path, and maybe also storing the export format. What would be displayed in the title bar if there is both a path and an export_path?

guillaumechereau commented 3 months ago

I think the behavior should be exactly the same as in Gimp, including the title bar.

I am not totally sure how the implementation should work, but there are already two paths stored currently (for export and save), but I don't remember the details of how it worked right now. Would need to double check but probably won't have time this week.

guillaumechereau commented 3 months ago

I just checked the branch. As as I mentioned I would rather have a new menu item "override xxxx" to export over, and keep 'save' and 'save as' only for gox files as it is now.

madd-games commented 3 months ago

I will try to implement the separate 'overwrite' menu entry when I get some time. I might change this PR or I might simply abandon this one and make a new one when I do so.

guillaumechereau commented 3 months ago

Ok thanks!

On Tue, Mar 19, 2024 at 12:05 AM Madd Games @.***> wrote:

I will try to implement the separate 'overwrite' menu entry when I get some time. I might change this PR or I might simply abandon this one and make a new one when I do so.

— Reply to this email directly, view it on GitHub https://github.com/guillaumechereau/goxel/pull/360#issuecomment-2004330510, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2JHZ3PFEIW5HIQ62TOVLYY4GEDAVCNFSM6AAAAABESZIBNSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBUGMZTANJRGA . You are receiving this because you commented.Message ID: @.***>

madd-games commented 3 months ago

I've opened a new PR to fix this issue becasue the changes in this branch aren't really necessary, so I'm abandoning this one.