LK_SwitchMarkers (Show switch sub-layer names on timeline)

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
Lukas
Posts: 1297
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

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

Post by Lukas »

Fixed a tiny issue with switchlayers that had no animation at all. Labels are now displayed correctly for those. Re-uploaded the script at the same link.
User avatar
gilcartunista
Posts: 55
Joined: Mon Mar 14, 2016 7:13 pm
Location: https://www.facebook.com/gil.cartunista
Contact:

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

Post by gilcartunista »

Hi Lukas...Thank you! For your enormous generosity! Sorry for the long delay in answering you... It's just that unfortunately my mother died...
What I think is just showing the name of the clicked bone...for me (who still use FLASH) the Moho timeline is a little confusing. Grateful!
User avatar
Lukas
Posts: 1297
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

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

Post by Lukas »

My condolences Gil, that can't be easy. 🙁

Yes the Moho timeline is quite different from Flash's timeline, but I think in this case it's better to try and get used to working with it, because there's no clean way of getting the names right with markers in the timeline. Try to use bone colors to your advantage and remember the red channels are for the selected bone(s) 🙂
User avatar
Hoptoad
Posts: 653
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

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

Post by Hoptoad »

Lukas wrote: Mon Jul 19, 2021 9:18 am 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.
I like this script. It is very useful and it works great.

This is the first layerscript I have ever downloaded. I wasn't sure where to put it, and didn't find the information in the manual. In the end, I created a new folder called "Layerscripts" within the user's Scripts folder, then put it in there. Where do people tend to put their layerscripts?
User avatar
heyvern
Posts: 7035
Joined: Fri Sep 02, 2005 4:49 am

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

Post by heyvern »

Hoptoad wrote: Wed Aug 18, 2021 11:51 pm
Lukas wrote: Mon Jul 19, 2021 9:18 am 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.
I like this script. It is very useful and it works great.

This is the first layerscript I have ever downloaded. I wasn't sure where to put it, and didn't find the information in the manual. In the end, I created a new folder called "Layerscripts" within the user's Scripts folder, then put it in there. Where do people tend to put their layerscripts?
Layer scripts are different from the other types of scripts. You can keep them anywhere you want. I usually keep mine in the same folder as the Moho file they are used in.

Layer scripts are embedded or linked inside the layer itself. When you load up a layer properties there is checkbox near the bottom the layer properties that says "Embed script file". When you check that box you then navigate to the script file you want to use and select it and hit return. Now the box is checked and you have a layer script attached to that layer.

You can't see what script is attached. That is why I keep my scripts in the same folder as the moho file or project folder. I usually keep an image folder and scripts folder in the same folder with the moho folder to keep it organized. You can also use the "Gather Media..." file menu item to gather all the files, images, scripts, audio etc into one folder for a project.

Layer scripts do something to the layer itself. Each layer script has different functions and does stuff just for that layer, or maybe even other layers in the document. The skies the limit. Script files are simple basic text and can be opened and read in any text editor. Most script layers will have instructions or a descript at the top of the file. Open and read it to see. If not then you would find out what it does from whoever wrote the script or from the place you downloaded it from.
User avatar
Hoptoad
Posts: 653
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

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

Post by Hoptoad »

Thanks for the information, heyvern! I like the idea of keeping the layerscript with the Moho file that it's used in.

In the Layer Settings of the layer which uses Lukas' layerscript, I added the name of the layerscript in the Comments window, as a reminder that I embedded a layerscript.

I didn't know about Gather Media. I tend to struggle with keeping things organized, so I should begin using it soon. Thanks for mentioning it.
User avatar
Lukas
Posts: 1297
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

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

Post by Lukas »

Hoptoad wrote: Wed Aug 18, 2021 11:51 pmWhere do people tend to put their layerscripts?
I'd recommend putting all the layerscripts you use in:
/Your Custom Content Folder/Shared Resources/Embedded Scripts/

Then if you use this tool, you can easily select them and put them on a layer: The tool also makes it super easy to find all layers with a layerscript with a click of a button, so you don't need to put anything in the layer name to keep track. The tool also shows what script is embedded on a layer in the toolbar.

Having your scripts within the Shared Resources folder structure also has the advantage that when Moho can no longer find a layerscript, it will automatically search for it in the Shared Resources folder and find it.
User avatar
gilcartunista
Posts: 55
Joined: Mon Mar 14, 2016 7:13 pm
Location: https://www.facebook.com/gil.cartunista
Contact:

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

Post by gilcartunista »

Lukas wrote: Thu Aug 19, 2021 8:02 am
Hoptoad wrote: Wed Aug 18, 2021 11:51 pmWhere do people tend to put their layerscripts?
I'd recommend putting all the layerscripts you use in:
/Your Custom Content Folder/Shared Resources/Embedded Scripts/

Then if you use this tool, you can easily select them and put them on a layer: The tool also makes it super easy to find all layers with a layerscript with a click of a button, so you don't need to put anything in the layer name to keep track. The tool also shows what script is embedded on a layer in the toolbar.

Having your scripts within the Shared Resources folder structure also has the advantage that when Moho can no longer find a layerscript, it will automatically search for it in the Shared Resources folder and find it.
Hi Lukas, what do I have want to change so that your LK_EmbedScript script works in v11? Grateful in advance!
User avatar
Hoptoad
Posts: 653
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

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

Post by Hoptoad »

Lukas wrote: Thu Aug 19, 2021 8:02 am I'd recommend putting all the layerscripts you use in:
/Your Custom Content Folder/Shared Resources/Embedded Scripts/

Then if you use this tool, you can easily select them and put them on a layer:
Thanks for the information.

I followed your instructions about the folders and installed LK_EmbedScript, and it works great. I'm sure it will be very convenient having all those cabilities at my fingertips.

Three units of feedback: 1) On the "find all embedded scripts" button, the words "scripts" is misspelled.

2) It took me several minutes of experimenting to realize that the "find all embedded scripts" was a toggle to make the Layers Window return to normal. It might be nice to have a separate "END" button or something similar on the toolbar to end the script.

3) LK_EmbedScript is a good, helpful script - thanks for making it!
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

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

Post by davoodice2 »

great idea.
I have new suggestion. like what I see we just can highlight time line with color and write some info about what's happened in highlighted areas .
for instance: father jumps and say hello.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Daxel
Posts: 1010
Joined: Wed Mar 27, 2019 8:34 pm

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

Post by Daxel »

davoodice2 wrote: Sat Aug 21, 2021 2:01 pm great idea.
I have new suggestion. like what I see we just can highlight time line with color and write some info about what's happened in highlighted areas .
for instance: father jumps and say hello.
In case you don't know about them: you can place markers on the timeline and give them names. It's not displayed exactly like you described, but the purpose is the same, to put notes in the timeline. And you can choose to show those markers on the entire document making them visible on every layer, so you dont have to place them on every layer involved in the "father jumps and say hello" animation.
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

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

Post by davoodice2 »

Daxel wrote: Sat Aug 21, 2021 2:59 pm
davoodice2 wrote: Sat Aug 21, 2021 2:01 pm great idea.
I have new suggestion. like what I see we just can highlight time line with color and write some info about what's happened in highlighted areas .
for instance: father jumps and say hello.
In case you don't know about them: you can place markers on the timeline and give them names. It's not displayed exactly like you described, but the purpose is the same, to put notes in the timeline. And you can choose to show those markers on the entire document making them visible on every layer, so you dont have to place them on every layer involved in the "father jumps and say hello" animation.
yes i know that. but it was a better if it was.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Daxel
Posts: 1010
Joined: Wed Mar 27, 2019 8:34 pm

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

Post by Daxel »

davoodice2 wrote: Sat Aug 21, 2021 4:06 pm
yes i know that. but it was a better if it was.
Well now that I'm checking it, it basically works as you described. I didn't know that, but checked the manual and discovered this:
"Timeline marker regions are based on the keyframe’s hold values." "You can manipulate markers just like any other keyframe type."
So I tried holding alt and left-clicking on the marker dragging it to the right to increase its hold value over the timeline like you can do with a normal keyframe and it works, and actually highlights the portion of the timeline. And you can change its color, give it a name... is that what you wanted?
Last edited by Daxel on Sat Aug 21, 2021 11:55 pm, edited 1 time in total.
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

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

Post by davoodice2 »

Daxel wrote: Sat Aug 21, 2021 5:16 pm
davoodice2 wrote: Sat Aug 21, 2021 4:06 pm
yes i know that. but it was a better if it was.
Well now that I'm checking it, it basically works as you described. I didn't know that, but checked the manual and discovered this:
"Timeline marker regions are based on the keyframe’s hold values." "You can manipulate markers just like any other keyframe type."
So I tried holding alt and right-clicking on the marker dragging it to the right to increase its hold value over the timeline like you can do with a normal keyframe and it works, and actually highlights the portion of the timeline. And you can change its color, give it a name... is that what you wanted?
yes that's it. some thing like this but for marker.
Image
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Daxel
Posts: 1010
Joined: Wed Mar 27, 2019 8:34 pm

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

Post by Daxel »

davoodice2 wrote: Sat Aug 21, 2021 5:30 pm
yes that's it. some thing like this but for marker.
It looks fairly similar
https://1drv.ms/u/s!AiyKCw6Xey5TgZUboLs ... w?e=m3ilbZ

By the way, to extend the marker dragging it it's not alt+right-click, but alt+left-click.
Post Reply