Hello Guest

Author Topic: Duplicated sprites in Sprite Collection...  (Read 4561 times)

MaaS

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 39
    • View Profile
Duplicated sprites in Sprite Collection...
« on: January 23, 2013, 09:33:28 pm »
Sorry, I know this was talked somewhere but I couldn't find the topic again :/

When you want to have the same sprite duplicated in a sprite collection, previously you had to copy-paste the image and add it again, so you have 2 sprites inside the collection. And if I remember correctly when committed, the images were compared, and if they were pixel to pixel exactly, only one instance was transferred to the atlas. Now, when you do this they are committed both so the atlas is unnecessary bigger.

I don't know if this has been disabled or I dreamed it hehe ... but I think it would be quite useful for importing animations with the same sprite/image in another file (like if exporting from flash), and for tilesets (sometimes you'll need to duplicate a tile in a sprite sheet for palette commodity reasons) :)

Thanks!!

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Duplicated sprites in Sprite Collection...
« Reply #1 on: January 23, 2013, 10:23:42 pm »
If you add the same image twice into a sprite collection, it only gets added once physically. It doesn't compare pixels though - it compares the actual reference, so it would have to be the same file...

rakkarage

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Duplicated sprites in Sprite Collection...
« Reply #2 on: July 15, 2014, 05:14:48 am »
is there any way to automatically remove empty sprites from a collection?
some of my sprite sheets have a large percentage of empty space atm

1024x1024 16x16 tilemap


i have tried doing it manually however i noticed a couple problems with that approach
- empty spaces are filled in with sprites from the next sheet you add (so they become mixed in selector)
- cannot re add them later

is there an easier way or i have to
- cut em all out by hand, ya easier with rect select tool but
- limit the collection to a single sheet so the ids are not reused in empty spaces
- name em all
- can i add some back without recutting the whole sheet and losing all my manual trimming and naming work?
- start all over? cutting and naming?

thanks


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Duplicated sprites in Sprite Collection...
« Reply #3 on: July 15, 2014, 04:41:59 pm »
There isn't a way to remove them and still retain the IDs. You might as well rename the unused ones to "Unused/XXX" to keep them out of the way...