Scrolling the timeline view

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
GaryC
Posts: 53
Joined: Tue Feb 03, 2015 1:02 pm

Scrolling the timeline view

Post by GaryC »

Bit of an odd request, but I've put together a script that can toggle through the layers with timeline visibility turned on. Effectively a handy shortcut for switching between the layers visible on your timeline.

One drawback is that it might select a layer that you don't see in your timeline view, because the timeline is scrolled to some other view. Is there any way that I can programmatically get the timeline window to scroll to the position of the newly selected timeline?

I believe that this relies upon having both a function that allows me to scroll the timeline window and some method to detect the position of the layer's timeline in that window. Any help with either would be great.
User avatar
synthsin75
Posts: 9964
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Scrolling the timeline view

Post by synthsin75 »

I'm not sure, but maybe this will do it:

moho:ShowLayerInLayersPalette(MohoLayer *layer)

If that doesn't do it, I don't think there's any scripting access to it.
GaryC
Posts: 53
Joined: Tue Feb 03, 2015 1:02 pm

Re: Scrolling the timeline view

Post by GaryC »

Ah, yeah that seems to scroll to it in the layer view rather than the timeline view. Interesting to file away for later, but doesn't do anything for the timeline view and I didn't see anything else similar. Thanks for the help anyway, we may have to live without this feature.
Post Reply