Can I make the animation in the timeline stop at the end?

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
Hugging_Bear
Posts: 106
Joined: Wed Feb 23, 2022 2:21 pm

Can I make the animation in the timeline stop at the end?

Post by Hugging_Bear »

Hi guys,

I've what might be a very stupid question. Is there a way to make the animation stop at the end of the blue area of the timeline? Mine keeps looping the animation endlessly. That isn't a problem while working on a fairly short scene (a few seconds). But I'm working at the end of a fairly long scene and get annoyed that I have to keep pressing 'Jump to end' button.
I know, I can use the arrow keys to 'scrub' the timeline but that brings a 'slow motion' effect and I would like to see the animation at a more natural speed.
I looked at the preference menu but couldn't find any settings there. I would be surprised if a sophisticated program like Moho doesn't have already an option for such a simple problem.

Thanks in advance!
The Guardian of Tales - YouTube Channel
https://www.youtube.com/@guardianoftales
User avatar
slowtiger
Posts: 6257
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Re: Can I make the animation in the timeline stop at the end?

Post by slowtiger »

I assume that you're talking about the playback in project view.

You can always shorten the area of playback by alt-right-cllick and alt-left-click in the frame number line of the timeline.

Making Moho play back only once is not possible.
AS 9.5 MacPro Quadcore 3GHz 16GB OS 10.6.8 Quicktime 7.6.6
AS 11 MacPro 12core 3GHz 32GB OS 10.11 Quicktime 10.7.3
Moho 13.5 iMac Quadcore 2,9GHz 16GB OS 10.15
Moho 14.1 Mac Mini M2 Pro OS 13.7.6
User avatar
hayasidist
Posts: 3857
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Can I make the animation in the timeline stop at the end?

Post by hayasidist »

This is a layerscript. It will stop playback after one run. It affects only the document in which it is active. You still need to press "stop" to reset it.

Add it to ANY layer that is visible (layerscripts only run if the layer is evaluated) OR add it to a "dummy" layer and use layer visibility to enable / disable its functionality.

Code: Select all

function LayerScript(moho)
	local myKey = "hs_start_" .. moho.document:Name()
	local wasPlaying = "hs_play_" .. moho.document:Name()
	local stop = _G[wasPlaying] and not moho:IsPlaying()
	local stopped = not moho:IsPlaying() and not _G[wasPlaying]
	if stop then
		MOHO.MohoGlobals.PlayStart = _G[myKey]
	end
	if stopped then 
		_G[myKey] = MOHO.MohoGlobals.PlayStart
	end
	if moho:IsPlaying() then
		MOHO.MohoGlobals.PlayStart = moho.frame
	end
	_G[wasPlaying] = moho:IsPlaying()
end
any issues let me know!
User avatar
Hugging_Bear
Posts: 106
Joined: Wed Feb 23, 2022 2:21 pm

Re: Can I make the animation in the timeline stop at the end?

Post by Hugging_Bear »

slowtiger wrote: Thu Dec 29, 2022 12:13 pm I assume that you're talking about the playback in project view.

You can always shorten the area of playback by alt-right-cllick and alt-left-click in the frame number line of the timeline.

Making Moho play back only once is not possible.
Thanks Slowtiger! You saved my day! (and many to follow). The alt-left-click tip was just what I needed. I don't mind the looping at the last few seconds of the scene, as long it isn't jumping back at its very beginning.
The Guardian of Tales - YouTube Channel
https://www.youtube.com/@guardianoftales
User avatar
Hugging_Bear
Posts: 106
Joined: Wed Feb 23, 2022 2:21 pm

Re: Can I make the animation in the timeline stop at the end?

Post by Hugging_Bear »

hayasidist wrote: Thu Dec 29, 2022 2:58 pm This is a layerscript. It will stop playback after one run. It affects only the document in which it is active. You still need to press "stop" to reset it.

Add it to ANY layer that is visible (layerscripts only run if the layer is evaluated) OR add it to a "dummy" layer and use layer visibility to enable / disable its functionality.

Code: Select all

function LayerScript(moho)
	local myKey = "hs_start_" .. moho.document:Name()
	local wasPlaying = "hs_play_" .. moho.document:Name()
	local stop = _G[wasPlaying] and not moho:IsPlaying()
	local stopped = not moho:IsPlaying() and not _G[wasPlaying]
	if stop then
		MOHO.MohoGlobals.PlayStart = _G[myKey]
	end
	if stopped then 
		_G[myKey] = MOHO.MohoGlobals.PlayStart
	end
	if moho:IsPlaying() then
		MOHO.MohoGlobals.PlayStart = moho.frame
	end
	_G[wasPlaying] = moho:IsPlaying()
end
any issues let me know!
Thanks for your tip but I'll go with slowtiger's solution. Yours seems a bit complicated and a lot of work.
The Guardian of Tales - YouTube Channel
https://www.youtube.com/@guardianoftales
Post Reply