GDQuest / krita-batch-exporter

A Free Krita plugin to batch export layers and groups with maximum flexibility. Scale, trim, export multiple copies of your layers...
GNU General Public License v3.0
319 stars 26 forks source link

Export: Suppress generation of tags+values in filenames #19

Closed larpon closed 5 years ago

larpon commented 5 years ago

I'd be nice to have an option to keep the filenames free of the meta tags polution. book_s100_m000.png isn't pretty when my layer is named book and has no meta tags

Either by leaving them out if people haven't specified any tags or By having a checkbox option to force leave it out - users could specify p=./path/to/<different version> to avoid files being overriden in cases where layers have the same name.

NathanLovato commented 5 years ago

Agreed here, I think having clean names if you don't use special filters (scale etc.) would make the output easier to browse and to read. On top of keeping the names clean, it makes it explicit when a file uses special options, e.g. book.png (original, raw layer export) vs book_s50.png (this one's scaled down to 50% of its original size)

NathanLovato commented 5 years ago

Just added a function that does that. Currently, it's only used in WNode.save. Could you tell me if it works as you expect if you have the time?

NathanLovato commented 5 years ago

https://github.com/GDquest/GDquest-art-tools/commit/7a31ddccdd10ad976231e28845afb3c4ae53682b

larpon commented 5 years ago

In a sense it works :smile: The _mXX_sXX is gone - but now I get an _@1.0x suffix instead? (Krita 4.2.3)

NathanLovato commented 5 years ago

Thanks, fixed with https://github.com/GDquest/GDquest-art-tools/commit/44869e77f4ed41444c740dc1c59acf54078e59f5

@0.?x is the new format for scale, as it's common in webdesign, mobile apps, web games, etc. If you export to s=100,50, one file will have _@0.5x appended to its name. Although in that case we could also export to folders, e.g. @1x, @0.5x. But if you just export the assets as-is you won't see that anymore.

larpon commented 5 years ago

Perfect! It seem to work as expected now - thanks!