A easier way to reveal all the key frames set in a complex character

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
peng
Posts: 57
Joined: Mon Oct 18, 2021 3:13 am

A easier way to reveal all the key frames set in a complex character

Post by peng »

i always find shifting key frames very toublesome especually there are a lot of point aniamtion and switch layer key frames set on sub layers of a complex character. I have been using a plugin to review all the layers that have keyframes set but it still very troublesome becasue you have to check each layer in order to show the key frames on the timeline, and you have to un check them to make the key frames disappear.

If you know a easier way to do this? thank you in advance. :)
User avatar
Lukas
Posts: 1336
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: A easier way to reveal all the key frames set in a complex character

Post by Lukas »

Are you currently using LK_ToggleKeysFilter per chance?

By adding two lines it would show all filtered layers on timeline:

Code: Select all

...
	layer:SetShownOnTimeline(true)
...
	layer:SetShownOnTimeline(true)
...
Of course with multiple characters this is not a great solution. I've got the code for that too somewhere, but don't have the time to dig it up atm.

Adding the two lines like this:

Code: Select all

-- *** ALTERED VERSION ***
-- See: https://www.lostmarble.com/forum/viewtopic.php?t=36921
-- *** ALTERED VERSION *** 

-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************

ScriptName = "LK_ToggleKeysFilter"

-- **************************************************
-- General information about this script
-- **************************************************

LK_ToggleKeysFilter = {}

function LK_ToggleKeysFilter:ColorizeIcon()
	return true
end

function LK_ToggleKeysFilter:Name()
	return "Toggle 'keys' filter"
end

function LK_ToggleKeysFilter:Version()
	return "0.2"
end

function LK_ToggleKeysFilter:IsBeginnerScript()
	return true
end

function LK_ToggleKeysFilter:Description()
	return "Toggle 'keys' filter in Layer Panel"
end

function LK_ToggleKeysFilter:Creator()
	return "Lukas Krepel"
end

function LK_ToggleKeysFilter:UILabel()
	return "Toggle 'keys' filter in Layer Panel"
end

-- **************************************************
-- The guts of this script
-- **************************************************

function LK_ToggleKeysFilter:IsEnabled(moho)
	return true
end

function LK_ToggleKeysFilter:IsRelevant(moho)
	if MohoMode ~= nil then
		if not MohoMode.visibility then
			return false
		end
	end
	return true
end

function LK_ToggleKeysFilter:Run(moho)
	FO_Utilities:FilterTag(FO_Utilities.keysTag, false, moho)
	local layers = FO_Utilities:AllLayers(moho)
	if moho:LayersWindowGetSearchContextValue() == FO_Utilities.keysTag then
		for i = 1, #layers do
			local layer = layers[i]
			if FO_Utilities:LayerIsAnimated(moho, layer) then
				FO_Utilities:AddTag(FO_Utilities.keysTag, layer, moho)
				layer:SetShownOnTimeline(true)
			else
				FO_Utilities:RemoveTag(FO_Utilities.keysTag, layer, moho)
				layer:SetShownOnTimeline(false)
			end
		end
	else
		for i = 1, #layers do
			local layer = layers[i]	
			FO_Utilities:RemoveTag(FO_Utilities.keysTag, layer, moho)
		end
	end
end
User avatar
JoelMayer
Posts: 394
Joined: Sun Apr 05, 2009 8:29 pm

Re: A easier way to reveal all the key frames set in a complex character

Post by JoelMayer »

Lukas wrote: Fri Mar 29, 2024 9:57 am Are you currently using LK_ToggleKeysFilter per chance?

By adding two lines it would show all filtered layers on timeline:

Code: Select all

...
	layer:SetShownOnTimeline(true)
...
	layer:SetShownOnTimeline(true)
...
Of course with multiple characters this is not a great solution. I've got the code for that too somewhere, but don't have the time to dig it up atm.

Adding the two lines like this:

Code: Select all

-- *** ALTERED VERSION ***
-- See: https://www.lostmarble.com/forum/viewtopic.php?t=36921
-- *** ALTERED VERSION *** 

-- **************************************************
-- Provide Moho with the name of this script object
-- **************************************************

ScriptName = "LK_ToggleKeysFilter"

-- **************************************************
-- General information about this script
-- **************************************************

LK_ToggleKeysFilter = {}

function LK_ToggleKeysFilter:ColorizeIcon()
	return true
end

function LK_ToggleKeysFilter:Name()
	return "Toggle 'keys' filter"
end

function LK_ToggleKeysFilter:Version()
	return "0.2"
end

function LK_ToggleKeysFilter:IsBeginnerScript()
	return true
end

function LK_ToggleKeysFilter:Description()
	return "Toggle 'keys' filter in Layer Panel"
end

function LK_ToggleKeysFilter:Creator()
	return "Lukas Krepel"
end

function LK_ToggleKeysFilter:UILabel()
	return "Toggle 'keys' filter in Layer Panel"
end

-- **************************************************
-- The guts of this script
-- **************************************************

function LK_ToggleKeysFilter:IsEnabled(moho)
	return true
end

function LK_ToggleKeysFilter:IsRelevant(moho)
	if MohoMode ~= nil then
		if not MohoMode.visibility then
			return false
		end
	end
	return true
end

function LK_ToggleKeysFilter:Run(moho)
	FO_Utilities:FilterTag(FO_Utilities.keysTag, false, moho)
	local layers = FO_Utilities:AllLayers(moho)
	if moho:LayersWindowGetSearchContextValue() == FO_Utilities.keysTag then
		for i = 1, #layers do
			local layer = layers[i]
			if FO_Utilities:LayerIsAnimated(moho, layer) then
				FO_Utilities:AddTag(FO_Utilities.keysTag, layer, moho)
				layer:SetShownOnTimeline(true)
			else
				FO_Utilities:RemoveTag(FO_Utilities.keysTag, layer, moho)
				layer:SetShownOnTimeline(false)
			end
		end
	else
		for i = 1, #layers do
			local layer = layers[i]	
			FO_Utilities:RemoveTag(FO_Utilities.keysTag, layer, moho)
		end
	end
end
Hi Lukas, sorry to dig up this ol' thread but i just wanted to ask, what line of code i would have to add to REMOVE all the Timeline Visibility again when switching the tags off :D

Basically with your addition it almost does what i want, it shows the stuff on the timeline automatically but when i press it again it keeps the little checkmarks of all the layers. Just thought i'd ask :D Thank you!
User avatar
martin_mrt
Posts: 51
Joined: Mon Mar 25, 2024 3:09 pm

Re: A easier way to reveal all the key frames set in a complex character

Post by martin_mrt »

Hello there,
did you find a solution yet? Im about to do an animation with a lot of point animated parts so im very curious to optimize this workflow. :)
Daxel
Posts: 1081
Joined: Wed Mar 27, 2019 8:34 pm

Re: A easier way to reveal all the key frames set in a complex character

Post by Daxel »

With this script tool by A. Evseeva, you can do many things, and one of them is to show all animated layers in the timeline.

https://mohoscripts.com/script/ae_keytools

To do that, use the buttons: V v X

V: shows all the animated layers in the timeline.
v: shows only those animated after frame 1
X: don't show any layer in the timeline

Some features of the tool may not work correctly because it is a little bit old, but those 3 buttons work perfectly, I use them all the time.
User avatar
JoelMayer
Posts: 394
Joined: Sun Apr 05, 2009 8:29 pm

Re: A easier way to reveal all the key frames set in a complex character

Post by JoelMayer »

Yea i have the Keytool. It's nice and all but it requires two clicks instead of one OR instead of one shortcut to show me the stuff ;)
Post Reply