How to programmatically set Timeline Channels

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
strider2000
Posts: 506
Joined: Sat Mar 07, 2015 5:14 pm
Contact:

How to programmatically set Timeline Channels

Post by strider2000 »

Is there a way to programmatically set Timeline Channels? In general, I like everything on auto, except the colored bones. I want those off. However, the strange thing is that sometimes the timeline channel settings change. I don't know why, maybe some script is messing up. Anyway, I'd like to just reset them with a single button click. I am still on Moho 12.5. Thanks for any help!

By the way, I just found out about http://mohoscripts.com/. That's cool! How do I find out about contributing, if that's a thing. I really value the help from the community and would like to give back if even in only a small way, if possible.
User avatar
Greenlaw
Posts: 9543
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: How to programmatically set Timeline Channels

Post by Greenlaw »

Not sure if this is what you mean but you can disable color bones channels from the timeline through the Timeline Channels window (View>Timeline Channels).

To me, the information is just excessive clutter in the Timeline, so I turn them all off. For an example of how this works, watch this video from 8:54...



Hope this helps.

Note: the video description has chapter markers for other optimization suggestions.
User avatar
Greenlaw
Posts: 9543
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: How to programmatically set Timeline Channels

Post by Greenlaw »

Wait, I re-read your post and I see what you mean. Yes, it would be great to be able to do this with a single click. It's tedious to do this one channel at a time.

Oh, well...at least I illustrated the problem. :)
Last edited by Greenlaw on Mon Jan 11, 2021 5:18 pm, edited 1 time in total.
User avatar
synthsin75
Posts: 10047
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: How to programmatically set Timeline Channels

Post by synthsin75 »

strider2000 wrote: Sun Jan 10, 2021 5:42 pm Is there a way to programmatically set Timeline Channels? In general, I like everything on auto, except the colored bones. I want those off. However, the strange thing is that sometimes the timeline channel settings change. I don't know why, maybe some script is messing up. Anyway, I'd like to just reset them with a single button click. I am still on Moho 12.5. Thanks for any help!
I don't think there is script access to the timeline channel visibility settings.

If you have it enabled, you might try disabling "Save and restore viewport settings in document" in the preference Documents tab. It might be restoring those settings from a document you open. Just a guess.
By the way, I just found out about http://mohoscripts.com/. That's cool! How do I find out about contributing, if that's a thing. I really value the help from the community and would like to give back if even in only a small way, if possible.
You should be able to register...upper righthand corner.
User avatar
strider2000
Posts: 506
Joined: Sat Mar 07, 2015 5:14 pm
Contact:

Re: How to programmatically set Timeline Channels

Post by strider2000 »

Thanks Guys. I definitely value all the great help you always give.

Greenlaw,
Yes, that's exactly what I'm dealing with. Out of curiosity, in your video, it looks like you drag to select the timeline options. I don't think your actually doing a drag though, correct? That would at least be a benefit over 42 clicks :o

synthsin,
Thanks for the tip. Unfortunately it's not the preferences :( It's probably something related to auto save and/or a crash, which thankfully doesn't happen that often anymore. Mainly, sometimes when I'm writing scripts :o I figured there might not be programmatic access to the timeline channels, but thanks for confirming. Also thanks for the info on registering.

By the way, when I respond, do you have a preference of synthsin, synthsin75, Wes or anything else?
User avatar
synthsin75
Posts: 10047
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: How to programmatically set Timeline Channels

Post by synthsin75 »

strider2000 wrote: Sun Jan 10, 2021 9:46 pm By the way, when I respond, do you have a preference of synthsin, synthsin75, Wes or anything else?
Anything's fine. I answer to asshole too. :wink:
User avatar
strider2000
Posts: 506
Joined: Sat Mar 07, 2015 5:14 pm
Contact:

Re: How to programmatically set Timeline Channels

Post by strider2000 »

OK, Thanks again for you help Wes :)
User avatar
Lukas
Posts: 1308
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: How to programmatically set Timeline Channels

Post by Lukas »

I've kind of scripted this for the bone color channels, but it's honestly a big hack and not really shareable at this time because of a lot of dependencies... Maybe someday.

Here's a VIDEO

Basically, when you toggle a color channel, it secretly turns all color bones of that color into a plain colored bone. So the color channel on the timeline disappears because there are no actual bones with that color anymore. The interface still shows the colored bones because the tool draws the bones instead of Moho, and the color info is saved in a different location. Honestly, I can't imagine working without this anymore. It should definitely be implemented in a proper way in the future.
User avatar
strider2000
Posts: 506
Joined: Sat Mar 07, 2015 5:14 pm
Contact:

Re: How to programmatically set Timeline Channels

Post by strider2000 »

Interesting. Thanks Lukas.
User avatar
SimplSam
Posts: 1098
Joined: Thu Mar 13, 2014 5:09 pm
Location: London, UK
Contact:

Re: How to programmatically set Timeline Channels

Post by SimplSam »

Wow. That looks like something from the Moho 2050 - Animators Special Deluxe Edition !!
Moho 14.1 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.1 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam


Sam
User avatar
jahnocli
Posts: 3471
Joined: Fri Oct 29, 2004 2:13 pm
Location: UK

Re: How to programmatically set Timeline Channels

Post by jahnocli »

synthsin75 wrote: Anything's fine. I answer to asshole too. :wink:
Heh heh!
You can't have everything. Where would you put it?
User avatar
Greenlaw
Posts: 9543
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: How to programmatically set Timeline Channels

Post by Greenlaw »

strider2000 wrote: Sun Jan 10, 2021 9:46 pm Greenlaw,
Yes, that's exactly what I'm dealing with. Out of curiosity, in your video, it looks like you drag to select the timeline options. I don't think your actually doing a drag though, correct? That would at least be a benefit over 42 clicks :o
You're correct. I'm pretty sure I sped that up because it would otherwise be really boring to watch. (But in realtime, maybe further proving your point.) It would be neat if we would could just drag over the buttons like that. :D

I recall making a suggestion to the devs to add a separate Select All button for each section, like the one we currently have for the entire page. I think having it for individual sections would be more useful in this situation. Maybe we should also have a user-defined presets popup at the top or an import/export settings option (which really should be available almost everywhere.) I'll bring this up again when I get the chance.
Last edited by Greenlaw on Mon Jan 11, 2021 7:50 pm, edited 2 times in total.
User avatar
strider2000
Posts: 506
Joined: Sat Mar 07, 2015 5:14 pm
Contact:

Re: How to programmatically set Timeline Channels

Post by strider2000 »

Really cool ideas everyone :)
Post Reply