Hello Guest

Author Topic: Number range for AutoFill?  (Read 4841 times)

Juice

  • Newbie
  • *
  • Posts: 5
    • View Profile
Number range for AutoFill?
« on: June 12, 2012, 06:24:28 pm »
Hello, I have giant sprite sheets with 1000's of sprites in them, including many animations.

My problem:
Using AutoFill feature just tries to place every sprite in the SpriteCollection into the animation, which just returns an out of bounds error as my Collections/Atlases are huge. Also, it would be annoying to manually put in 100 frames for each clip/animation.

Would it be an easy change to modify the source somewhere, to allow a range of sprites to be added?
Something like:
[AutoFill] From: [34] To: [84]

I looked around in the source and couldn't even find the autofill button.
Thanks.

Edit: Is this too much of a problem? Or should I just make many small collections? (30 small collections of animations per character, as apposed to 1 big collection of 30 animations per character)
« Last Edit: June 12, 2012, 06:26:42 pm by Juice »

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Number range for AutoFill?
« Reply #1 on: June 14, 2012, 05:11:35 pm »
Hi,
This shouldn't be an issue, and secondly you shouldn't get any out of bounds error. Anyway, its easy to add what you need. In tk2dSpriteAnimationEditor, look for AutoFill. Thats the function which does the autofill (from the current frame). All you'll need to do is get an upper limit and pass that in, and right after FindFrameIndex, break out if it is >= that number.


Let me know if that doesn't make sense and I'll try and paste a patch - only problem here is I've just been making a ton of changes in that file, and whatever line numbers I give you is likely to be irrelevant depending on the version you're on.

Juice

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Number range for AutoFill?
« Reply #2 on: June 18, 2012, 03:39:46 pm »
Wow thanks for the info unikron, didn't expect a response that quick.

We've already decided to just put each animation in it's own collection though, partially for organization too. But your info is good to know in case we decide to use it down the road. :)

In case you missed it, there's an issue we're stuck on that's inhibiting our progress, could you please take a look here?
http://unikronsoftware.com/2dtoolkit/forum/index.php?topic=296.0

Thankyou very much! :)