Page 1 of 3

LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Mon Jul 19, 2021 9:18 am
by Lukas
Here's a layerscript you can embed on a switchlayer. It will show markers on that layer so you can read the names and don't have to rely on only the color labels. It also shows the interpolation so you can easily tell the difference between holds and tweens if you enable 'Interpolate sub-layers' on the switch and choose to use step keys for holds.

Image

Scripted in response to teotoon's question in the 'How Do I...?' section:
teotoon wrote: Sun Jul 18, 2021 8:13 pmIs it possible to make appear the individual switch layers' names on the timeline?
Let me know if it's useful for you and if you encounter any bugs or problems.

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Mon Jul 19, 2021 9:29 am
by DK
Hi Lukas. What a brilliant idea for a script! Unfortunately I only got lua Console errors.
Image
EDIT: Now working beautifully :)
Cheers
D.K

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Mon Jul 19, 2021 9:35 am
by Lukas
DK wrote: Mon Jul 19, 2021 9:29 amHi Lukas. What a brilliant idea for a script! Unfortunately I only got lua Console errors.
Oops... Thank you! Not the first time I forgot to include the table.contains function. Fixed it and re-uploaded.

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Mon Jul 19, 2021 9:45 am
by DK
Updated the previous Lua Error image. Your script works great Lukas!
Thank you so much. Any display timeline display info is very handy for
work flow.
Cheers
D.K

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Mon Jul 19, 2021 9:51 am
by DK
EDIT: Oh wait...it's all working fine. Thanks Lucas very handy!
Cheers
D.K

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Mon Jul 19, 2021 11:25 am
by Lukas
DK wrote: Mon Jul 19, 2021 9:51 amEDIT: Oh wait...it's all working fine.
Great! 😎

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Mon Jul 19, 2021 2:16 pm
by Lukas
Updated the script, it now handles cycles better.

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Mon Jul 19, 2021 5:02 pm
by synthsin75
Exactly what I thought of doing when teotoon asked for it. You beat me to it.

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Mon Jul 19, 2021 6:22 pm
by teotoon
What a wonderful solution Lukas ! Thanks a million. It will be very helpful in lip-syncing.

What a great software and what a great community!

Cheers

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Thu Jul 22, 2021 3:35 pm
by Lukas
teotoon wrote: Mon Jul 19, 2021 6:22 pm What a wonderful solution Lukas ! Thanks a million. It will be very helpful in lip-syncing.

What a great software and what a great community!

Cheers
You're welcome. I find it very useful myself too, so thanks for sparking the idea.

- I've updated the script to work with ASP v11.
- It also now considers switchkeys that are smooth/linear but tween to the same layer as holds and represents them as holds.
- It also colors plain uncolored layers and cycles red, because plain marker labels can't stretch all the way to the next key. (Red is chosen to play nice with some of my other scripts) you can change these values at the top of the script if you prefer.

Download link is the same.

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Thu Jul 22, 2021 6:20 pm
by SimplSam
Looks like there may be an issue when there is no 'active child' and the Switch defaults to the topmost child-layer.

i.e. This defaulting can happen when you create a new Switch Layer from existing group of layers - and it does not set an active child layer. Or if you delete a used child-layer and the Switch still refers to it.

At the moment it will show errors for this: Line 46 - Attempt to index a nil value.

--

p.s. It errors at Line 61 in the latest version of the script.

I also used your Embedded Layer Script tool to manage this, and it is working quite well.

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Thu Jul 22, 2021 9:34 pm
by Lukas
SimplSam wrote: Thu Jul 22, 2021 6:20 pmLooks like there may be an issue when there is no 'active child' and the Switch defaults to the topmost child-layer.

i.e. This defaulting can happen when you create a new Switch Layer from existing group of layers - and it does not set an active child layer. Or if you delete a used child-layer and the Switch still refers to it.
I updated the script. I think it catches all those invalid keys now, but please let me know if it works.
SimplSam wrote: Thu Jul 22, 2021 6:20 pmI also used your Embedded Layer Script tool to manage this, and it is working quite well.
Nice 🙂

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Fri Jul 23, 2021 9:09 am
by Lukas
Image

The script would get stuck in an endless loop when a switch key would try to cycle backwards to an absolute frame value in the future. Fixed it and re-uploaded.

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Fri Jul 23, 2021 1:31 pm
by gilcartunista
Hi Lukas...Thank you! For your enormous generosity! Now the names appear wonderfully in my version 11!!! Grateful.
Just a suggestion... this is very useful for the bones, it would be nice to have it there too...Thank you.

Re: LK_SwitchMarkers (Show switch sub-layer names on timeline)

Posted: Mon Jul 26, 2021 7:49 am
by Lukas
gilcartunista wrote: Fri Jul 23, 2021 1:31 pm Hi Lukas...Thank you! For your enormous generosity! Now the names appear wonderfully in my version 11!!! Grateful.
No problem :)
gilcartunista wrote: Fri Jul 23, 2021 1:31 pmJust a suggestion... this is very useful for the bones, it would be nice to have it there too...Thank you.
Could you elaborate how you would want to use this on a bone layer? I see some possibilities, but I'm not sure how it would be useful, because a single bone layer can contain many bones that all are keyed in a different way. It has many more dimension than a simple switch, so I'm not sure if its worth getting into.