Copying/moving keyframes within the same layer channel?

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Copying/moving keyframes within the same layer channel?

Post by synthsin75 »

hayasidist wrote:
synthsin75 wrote:You can see all the channels and their subchannels by running Scripts>Script Writing>List Channels.
Point motion has no subchannels. Selected point motion is its own channel.
sorry to disagree Wes- but point motion does have subchannels (and selected point motion has subchannels if more than one point is selected)
(screenshot here if you want to take a look: http://i128.photobucket.com/albums/p196 ... malgap.png)


and, whilst I haven't used it -- AnimChannel:SetKeyWhen(id, when) just might allow an existing id to be relocated?
Oh, you're right. I didn't think subchannels were dependent like that. Good to know.

And yep, that's the function to use. It moves the key and maintains interpolation. Good find.
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Re: Copying/moving keyframes within the same layer channel?

Post by rylleman »

lehtiniemi wrote:... I'll post here my finished subroutines when I get to it. Thanks for help!!!
Have you made any progress? I need a keyframe shift/move-script and found this thread. If you've done the work I'd be happy to not put in the hours to create one. :D
lehtiniemi
Posts: 107
Joined: Mon Jan 14, 2013 3:18 pm

Re: Copying/moving keyframes within the same layer channel?

Post by lehtiniemi »

rylleman wrote:
lehtiniemi wrote:... I'll post here my finished subroutines when I get to it. Thanks for help!!!
Have you made any progress? I need a keyframe shift/move-script and found this thread. If you've done the work I'd be happy to not put in the hours to create one. :D
I have! I'll post some snippet later. You can also check the Time Tool that I just posted in Script-forum, see the function ....ToChannel (can't remember what it's called exactly). That goes through the channels within the layer and moves them. The key-thing to moving was to use function SetKeyWhen which sets a new keyframe for an existing key by id.
Post Reply