Frame Counter?

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

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

Frame Counter?

Postby super8mm » Tue Aug 18, 2009 12:58 am

Is there a script to display in the exported movie the frame number?
Handy for timing, critiques etc.

I can use the credits script that last one frame per credit but there must be a less tedious way than typing a txt file such as:

001

002

003

004

~

999


Also, I never installed a script so an install script tutorial link would be nice too please.

Come to think of it, I could use 3 credits scripts one lasting 1 frame per credit the next 10 per credit and the next 100 per credit but it would have to repeat somehow.
User avatar
super8mm
 
Posts: 340
Joined: Sun Oct 12, 2008 11:22 pm

Postby ponysmasher » Tue Aug 18, 2009 9:59 am

Well if you want a ready made text file with numbers from 001 to 999 here you go: http://dauid.com/counter.txt

If you want it to go higher I have a javascript tool to write out numbers here: http://www.dauid.com/tools/alinks.html
User avatar
ponysmasher
 
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles

Postby super8mm » Tue Aug 18, 2009 12:23 pm

Thanks Ponysmasher, the first one is useless since you need a blank line for it to wait for the next credit.

The second one makes Firefox crash with high numbers but works well with IE.

One tweak I had to do is change in the credits script:

page = page + 1
if (page > 10) then
break

to:

page = page + 1
if (page > 999) then
break
User avatar
super8mm
 
Posts: 340
Joined: Sun Oct 12, 2008 11:22 pm

Postby ponysmasher » Tue Aug 18, 2009 3:28 pm

Oh, I didn't know about the line break since I havent used the credit script.
I'll probably try it now though since I would also like to be able to have the frame number displayed on screen.
User avatar
ponysmasher
 
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles

Postby arfa » Sun Nov 29, 2009 1:04 pm

> super8mm
There is a frame counter somewhere on the forum. It is called counter.anme and can be embedded as an object in any *anme file. Sized, positioned as you wish.

It is great for fine tuning timing adjustments.

I tried a quick search but couldn't see it. Let me know if you still need this but can't find it and I can set it up as a download.
arfa
 
Posts: 244
Joined: Tue Dec 23, 2008 8:15 pm
Location: New Zealand

Postby ponysmasher » Wed Jun 16, 2010 4:47 pm

Well, since I've recently started scripting I decided to give this one a go.

The result is here: http://www.dauid.com/tools/scripts/ds_framecounter.zip

EDIT: Discovered that it didn't work in AS 6.2 so here's a version for Anime Studio 6.2: http://www.dauid.com/tools/scripts/ds_f ... ter_62.zip

It's a menu script so put it in *anime studio directory*\scripts\menu\Third Party.

And this is what it looks like:
Image

It uses switch layers for numbers and creates keys between the selected start and end frames of the project.

Things to do:
*Fixed*Make selectable font (right now it uses Arial Regular)
*Fixed*Make a better default position when it's created. Now it's created in the middle of the screen.
*Some other stuff.
Last edited by ponysmasher on Thu Jun 17, 2010 10:51 pm, edited 5 times in total.
User avatar
ponysmasher
 
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles

Postby Víctor Paredes » Wed Jun 16, 2010 6:02 pm

wow, thank you ponysmasher!
Víctor Paredes - Former Moho 12 Product Manager
My Youtube Channel - My webinars
User avatar
Víctor Paredes
 
Posts: 4770
Joined: Wed Jan 26, 2005 12:18 am
Location: Ireland

Postby ulrik » Wed Jun 16, 2010 7:15 pm

Great script, thank you a lot! :D
ulrik
 
Posts: 1061
Joined: Thu Aug 11, 2005 10:32 pm
Location: Stockholm Sweden

Postby ponysmasher » Thu Jun 17, 2010 10:50 pm

Updated with a settings pop up:
Image

The version for 6.2 is now two scripts. One like the picture above and one that won't let you choose font since loading the font list in 6.2 is really slow.
User avatar
ponysmasher
 
Posts: 370
Joined: Thu Aug 05, 2004 2:23 am
Location: Los Angeles

Re: Frame Counter?

Postby AnnieMashon » Tue Mar 26, 2013 12:49 am

I am using 9.2 and found that I was getting an error with InsertText, which now takes more parameters.
Here are the edits I made to that are working for me.
btw, can someone point me to the documentation for the moho API where I would find InsertText and others?

Left file: new with fixes
Right file: original
120 moho:InsertText((9-layers), "Arial Regular", true, false, false, false, 0)
120 moho:InsertText((9-layers), "Arial Regular", true, false, 0)
------------------------------------------------------------------------
------------------------------------------------------------------------
138 moho:InsertText((9-layers), "Arial Regular", true, false, false, false, 0)
138 moho:InsertText((9-layers), "Arial Regular", true, false, 0)
------------------------------------------------------------------------
------------------------------------------------------------------------
159 moho:InsertText((9-layers), "Arial Regular", true, false, false, false, 0)
159 moho:InsertText((9-layers), "Arial Regular", true, false, 0)
------------------------------------------------------------------------
------------------------------------------------------------------------
181 moho:InsertText((9-layers), "Arial Regular", true, false, false, false, 0)
181 moho:InsertText((9-layers), "Arial Regular", true, false, 0)
------------------------------------------------------------------------
------------------------------------------------------------------------
249 vec.x=-1.2 --Upper left corner of BG
250 vec.y=0.2
251
249 vec.x=-1.5 --Upper left corner of BG
250 vec.y=0.5
251
------------------------------------------------------------------------
------------------------------------------------------------------------
254 vec.x=0.05 --upper right corner of bg
255 vec.y=0.2
254 vec.x=0.2 --upper right corner of bg
255 vec.y=0.4
------------------------------------------------------------------------
------------------------------------------------------------------------
258 vec.x=0.05 --lower right corner of bg
259 vec.y=-0.2
258 vec.x=0.2 --lower right corner of bg
259 vec.y=-0.05
------------------------------------------------------------------------
------------------------------------------------------------------------
262 vec.x=-1.2 --lower left corner
263 vec.y=-0.2
262 vec.x=-1.1 --lower left corner
263 vec.y=-0.05
------------------------------------------------------------------------
------------------------------------------------------------------------
266 vec.x=-1.2 --upper left corner
267 vec.y=0.2
266 vec.x=-1.1 --upper left corner
267 vec.y=0.4
------------------------------------------------------------------------
AnnieMashon
 
Posts: 9
Joined: Tue Feb 07, 2012 5:11 am


Return to Scripting

Who is online

Users browsing this forum: Bing [Bot] and 1 guest