adobe-photoshop / spaces-design

Adobe Photoshop Design Space
http://adobe-photoshop.github.io/
Other
848 stars 81 forks source link

When exporting a set of layers with some duplicate layer names, use a suffix to distinguish #3747

Closed mcilroyc closed 8 years ago

mcilroyc commented 8 years ago

Semi-hokey fix for #3609

If you exporting a batch of layers, and there are layer-name collisions, use a simple suffix to avoid a filename collision on the exported assets.

example (updated): ss

placegraphichere commented 8 years ago

When using "keep both" on OSX, finder uses a space+2 for files. So your example would yield square 2@3x.png for the first duplicate, incrementing after that. Perhaps we should follow that pattern instead of .1?

mcilroyc commented 8 years ago

Updated PR based on the " 2" suggestion from @placegraphichere. now: ss

chadrolfs commented 8 years ago

I like it.

iwehrman commented 8 years ago

Looks good! It might also be nice to have a "warning" symbol in the export dialog if there are layers marked for export with identical names. Adding this number suffix is clearly better than just over-writing all but one of the assets, but ultimately this seems worthy of a warning.