Function to sync channel to original?

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
Lukas
Posts: 1294
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Function to sync channel to original?

Post by Lukas »

Is there a function to sync a channel back to its original state? Or is there some other way?
I need to wipe all keys of a certain channel, but it keeps breaking the reference (the referenced channel itself also has 0 keys on the timeline)
Right now when I call:

Code: Select all

channel:Clear()
or:

Code: Select all

channel:ClearAfter(0)
it keeps breaking the reference, which makes the entire channel show up on the timeline even though there are 0 keys.
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Function to sync channel to original?

Post by synthsin75 »

Afraid not. The only way to resync a channel is to right-click it's channel icon and manually select resync.
User avatar
Lukas
Posts: 1294
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: Function to sync channel to original?

Post by Lukas »

Thanks Wes! :)

That's too bad, this code runs about every single mouse-click while animating and I really don't want those extra channel when I'm not using them... :(

I'll try to find a workaround and am gonna try and approach this entire thing differently...
Post Reply