RodZill4 / material-maker

A procedural textures authoring and 3D model painting tool based on the Godot game engine
MIT License
3.52k stars 222 forks source link

Auto-fill the save png file dialogue box with working ptex filename and resolution #624

Open ptredhead opened 1 year ago

ptredhead commented 1 year ago

Feature/enhancement description:

When exporting a png image of a texture, it would be awesome if the save file dialogue box auto-filled in the name of the working ptex file and resolution in the file name field, ie "file name-resolution.png" or "file name_(resolution).png".

For example, when I create a new Material Maker file I copy my own template.ptex and rename it as a date-time stamp (eg 230721-144457.ptex). When I go to export my finished texture, the save file dialogue box has already auto-filled in a different file name (I'm not sure where it's getting that name from). And since I export different resolutions (sometimes for the same texture) I have to manually remove the incorrect file name and type in the correct file name and append the resolution each time (eg 230721-144457-512.png).

Calinou commented 1 year ago

I don't think everyone would want the resolution to always be appended to the file name. Most games don't append the resolution to their textures' filenames, as these may change during development.

We could support having a setting to define a naming template (such as {datetime}_{name}_{slot}_{resolution}), but I'd only use {name}_{slot} as a default. The file extension would be automatically appended to that template.