Redraw timeline to make new keyframes visible

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Breinmeester
Posts: 303
Joined: Thu May 13, 2010 2:01 pm

Redraw timeline to make new keyframes visible

Post by Breinmeester »

I always run into this problem when im setting new keys on the timeline in LUA that it will only refresh and show the new keyframes when the timeline indicator is moved. Does anybody know that code that will make the keyframes show up in the timeline at the moment of creation? Thanks.
User avatar
hayasidist
Posts: 3492
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Redraw timeline to make new keyframes visible

Post by hayasidist »

I think it's moho:UpdateSelectedChannels() but that may be dependant on exactly which channels you're not seeing updated

http://www.aslua.com/index.php?show=met ... nels&id=58



there's also moho:NewKeyframe(channel)

http://www.aslua.com/index.php?show=met ... rame&id=57
Breinmeester
Posts: 303
Joined: Thu May 13, 2010 2:01 pm

Re: Redraw timeline to make new keyframes visible

Post by Breinmeester »

Thanks. I got it working.

Code: Select all

moho:NewKeyframe(CHANNEL_BONE)
moho.layer:UpdateCurFrame()
For channel codes check the lm_channel_codes.lua in utilities folder.
Post Reply