In the Frame By Frame discussion
viewtopic.php?f=5&t=27514#p155715
there was discussion on FBF layer naming/numbering, in particular with the fact that in betweens don't have a number "in between" the initial key frames.
I was wanting to learn more about AS scripts and agreed with the thoughts, so I've just added a script, msFBFReorder, that will reorder layers based on the order of their appearance in the timeline. The script is at
http://www.mediafire.com/download/9qef3 ... eorder.lua
It's also at in github at
https://github.com/Strider22/AnimeStudi ... %20Effects
for the programmer types.
- Ordering - The ordering follows the order of initial appearance in the timeline. In other words, if multiple keys reference the same layer the name/number is based on the order first reference in the timeline (I know FBF doesn't typically do this, but standard Switch layers do, and I've used it some in FBF).
- Ordering Direction - The ordering is from bottom to top, because that's the way that FBF naturally adds layers.
- Starts at 0 - The ordering starts at 0, because FBF always puts a key at 0. If you're on 0 and you create a FBF layer, it actually creates a layer, even though their seems to be no key. Then when you press + it will create a layer at whatever your frame spacing is, so you'll already have 2 layers. Since FBF seems to be following the idea of drawing on frame 0, it seemed more in agreement with the frame 0 issue to start layer numbering/naming at 0 rather than 1. It's also helpful to me to know that you can't really move that key (you'll always see a key starting at frame 0). I thought about adding a dialog to allow the user to choose 0 or 1, but thought it was cleaner to allow the renumbering without a dialog popping up.
- Testing - I've tried to test it pretty well. I've used the standard FBF approach (add, delete, duplicate, move), but also deleted, copied, and created keys based on typical switch layer approach. So I think things are working well, but I'd still advise people to save before applying just in case
Hope you enjoy
New Script to reorder FBF layers
Moderators: Víctor Paredes, Belgarath, slowtiger
- strider2000
- Posts: 506
- Joined: Sat Mar 07, 2015 5:14 pm
- Contact:
Re: New Script to reorder FBF layers
Hey that is just brilliant Strider, I actually have requested this, thinking it was simple for a real programmer but impossible for a dunce like myself.
It works perfectly, though I think it should be called 'OCD alleviation script'
It works perfectly, though I think it should be called 'OCD alleviation script'
Re: New Script to reorder FBF layers
It does work indeed! Awesome work, thanks a lot Strider2000!!
Website : https://www.ronald-grandpey.net/?2D-Animation
Instagram : http://instagram.com/peep_s
Twitter : http://twitter.com/peep_s
Rrolab : https://rrolab.com/
Instagram : http://instagram.com/peep_s
Twitter : http://twitter.com/peep_s
Rrolab : https://rrolab.com/
- strider2000
- Posts: 506
- Joined: Sat Mar 07, 2015 5:14 pm
- Contact:
Re: New Script to reorder FBF layers
chucky wrote:... I think it should be called 'OCD alleviation script'
I'm glad it's helpful. I love the fact that AS is making strides at better integration of drawing and bones (FBF of course, but drawing in general too). I also love the help that everyone on the forum gives, so I hope this is helpful to others.
- Víctor Paredes
- Site Admin
- Posts: 5660
- Joined: Wed Jan 26, 2005 12:18 am
- Location: Barcelona/Chile
- Contact:
Re: New Script to reorder FBF layers
Thank you!
Moho Product Manager
www.mohoanimation.com
Rigged animation supervisor in My father's dragon - Lead Moho artist in Wolfwalkers - Cartoon Saloon - My personal Youtube Channel