Version 6 scripting interfaces

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

Post Reply
User avatar
Lost Marble
Site Admin
Posts: 2190
Joined: Tue Aug 03, 2004 6:02 pm
Location: Scotts Valley, California, USA
Contact:

Version 6 scripting interfaces

Post by Lost Marble » Mon Jun 01, 2009 11:26 pm

*** UPDATED ***
*** The scripting interface for version 6.1 is included below as well. ***

I said I'd post some info on scripting in version 6. And here we go...

The link below is the totally complete scripting interface. However, it's in a format similar to a C++ header file. There are no descriptions included. This is kind of meant for advanced scripting users. If you're new to scripting, it's probably best to start with the old version 5 scripting documentation.

There are three files included:

pkg_moho.lua_pkg - Start with this one. It describes the scirpting interface to Anime Studio. What functions and values are available for a layer, a bone, etc.

pkg_lm.lua_pkg - This one describes basic types used by Anime Studio. Vectors, 2D points, colors, etc.

pkg_lm_gui.lua_pkg - Contains the data structures used for building UI elements and drawing on the canvas.

Version 6.0 scripting interface:
http://my.smithmicro.com/downloads/file ... rfaces.zip

Version 6.1 scripting interface:
http://my.smithmicro.com/downloads/file ... rfaces.zip

Not: I've included the interfaces for both 6.0 and 6.1. 6.1 has a few new functions not available in 6.0. But since 6.1 is a free update with lots of bug fixes, there's really no reason to limit yourself to 6.0, so for most people I'd say go ahead and use the 6.1 interfaces unless you have some real pressing reason to stick with 6.0.
Last edited by Lost Marble on Wed Oct 28, 2009 7:15 pm, edited 2 times in total.
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete » Tue Jun 02, 2009 12:21 am

Hurraaahh! \o/ \o/
:)
-G
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern » Tue Jun 02, 2009 12:23 am

YEEEEEEHAAAAAAAA!!!! WooooHOOOOO!!!

I'm at the top of the roller coaster... the car is just starting down the first drop....

-vern
User avatar
mkelley
Posts: 1646
Joined: Fri Nov 02, 2007 5:29 pm
Location: Sunny Florida
Contact:

Post by mkelley » Tue Jun 02, 2009 1:23 am

Thanks, Mike, this is great.
User avatar
synthsin75
Posts: 7155
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 » Tue Jun 02, 2009 1:34 am

Damn, I may be out of the scripting loop for a while. I've got to try to figure out how this stuff is presented here to make sense of it. Have fun guys!
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete » Tue Jun 02, 2009 6:15 am

I've got to try to figure out how this stuff is presented here to make sense of it
synthsin75, don't be ashamed about the format. It is exactly the same as the old html documentation but without explanation of what does the fucntion do.
They have the C++ looking of the declarations of the functions and members that are available in each object. Just that they are properly written, you know now the correct order on the function call and some of the new interface.
Compare it side by side with the old html documentation and you'll be do happy. :D

This thread should grow with the clarifications of each new interface exposed to have all the info in the same place.
-G
User avatar
heyvern
Posts: 6964
Joined: Fri Sep 02, 2005 4:49 am

Post by heyvern » Tue Jun 02, 2009 7:44 am

Oh boy... this is FUN!

At first I felt like a stranger in strange land... "Oh good grief! I'm in France and I can't speak French". Then off in the distance you see a McDonald's and everything starts to make sense.

;)

-vern
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete » Fri Jul 03, 2009 8:46 am

Please make this sticky.
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger » Wed Oct 28, 2009 9:29 pm

Thanks for updated interface for version 6.1, Mike! With all these cool new scripting features, it's like getting a new version of Anime Studio all over again!
ulrik
Posts: 1074
Joined: Thu Aug 11, 2005 10:32 pm
Location: Stockholm Sweden
Contact:

Post by ulrik » Wed Oct 28, 2009 9:41 pm

Thanks Mike! :D
User avatar
Ramón López
Posts: 1802
Joined: Sun Aug 08, 2004 1:41 pm
Location: Elda! Again...
Contact:

Post by Ramón López » Thu Oct 29, 2009 12:19 am

...Yeah! Thank you very much :)

How I'd love to have some time to play with that 6.1 new possibilities! Specially that related with actions, but... well, it's always the same story about time and scripting...
♪♫♬ Y si no puedes estar (animando) con el programa que amas
Ama el programa con el que estás (animando)
♪♫♬
Ryder
Posts: 24
Joined: Sun Aug 08, 2010 12:17 am

Ahhh ok... what is this exactly

Post by Ryder » Tue Sep 07, 2010 2:39 am

Hi all,

I have the scripting interface(s)... yay!

SO... now that I have them... what are they, exactly... how do I see them... how do I use them?

Perhaps there is a nubie scripting thread somewhere?

Thanks!
User avatar
Seyrse
Posts: 26
Joined: Sun Apr 24, 2011 4:16 pm
Location: Pekin, Ill
Contact:

Post by Seyrse » Tue Mar 06, 2012 10:55 pm

Call me a dunderhead. I have downloaded the zip files and unzipped them. I have the .lua_pkg files in a folder. I'm sure this is simple but I can't seem to figure it out. How do I open them to read them?

Thanks Steve
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger » Wed Mar 07, 2012 12:59 am

They're text files, so just open them in the text editor of your choice.
User avatar
Seyrse
Posts: 26
Joined: Sun Apr 24, 2011 4:16 pm
Location: Pekin, Ill
Contact:

Post by Seyrse » Wed Mar 07, 2012 3:22 am

Some times the simplest of things escape us. Duh why didn't I try that?

Thanks Steve :D
Post Reply