New Script to reorder FBF layers
Posted: Sat Jul 11, 2015 3:03 am
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
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