Page 1 of 1

Redraw timeline to make new keyframes visible

Posted: Mon Jan 18, 2016 9:57 am
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.

Re: Redraw timeline to make new keyframes visible

Posted: Mon Jan 18, 2016 6:37 pm
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

Re: Redraw timeline to make new keyframes visible

Posted: Tue Jan 19, 2016 6:04 pm
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.