Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a switch to avoid file renaming. #63

Open
Ziflin opened this issue Mar 2, 2022 · 2 comments
Open

Add a switch to avoid file renaming. #63

Ziflin opened this issue Mar 2, 2022 · 2 comments

Comments

@Ziflin
Copy link

Ziflin commented Mar 2, 2022

I'm trying to used the "s" scale parameter to export at a reduced resolution, but it appears that the batch exporter generates a new filename with "_@0.5x" appended to the layer name. Is there any way that a switch could be added for it not to do this and simply used the name of the layer as the filename? The modified name breaks some import scripts that I'm using in Unity.

@SeanHRN
Copy link
Contributor

SeanHRN commented Mar 3, 2022

The way my complementary plugin handles it is it makes copies of the batch exporter's images where the suffix is removed and puts them in a folder with the scale as the name (e.g. 0.5x), so that it still stays organized/functional if you use multiple scale sizes. That's how I'd want it to be done.

@OliverGrack
Copy link

If somebody is running into the same problem, one option would be to first rename the file inside Unity, so it already has the name, the exporter would create with the new scaling option. That will make sure all your references are still kept. After that, changing the s parameter to the layer and running export.

Not sure how that works with other engines, but might also work too.

To fix this we could also change the options for s a little, I would propose the following syntax:

s=<scaling>[:suffix], ..., <scaling>[:suffix]

So for example, one could have:

  • aLayer s=0.5: e=png rescales the layer by 0.5, but keeps the original name aLayer.pngsince the a space follows immediately after the :.
  • aLayer s=0.5:_half e=png rescales by 0.5 and exports to aLayer_half.png
  • aLayer s=0.5 e=png keeps the original behavior and exports to aLayer_@0.5x.png
  • aLayer s=0.5:-half,0.25:-quarter e=png would export both aLayer_half.png and aLayer_quarter.png

If that seems reasonable, I could also look into making that work. Not sure how much time I will have though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants