draw a circle - centre is mouse click, radius is where the "drag" ends. If you fancy trying something before starting on a "serious" script, you might like to set yourself a simple challenge - e.g.
#Moho pro 12 basics generator
There's also template generator accessible from the "tools" button. This scripting documentation has a Script Structure page that sets out the fundamental elements for menu, tool and layer scripts. a loop) segments = points if it's not, there's one more point than segments. Generally the start point of segment (x) is point in curve (x). Curve(1): Point(3) might be Mesh:Point(44) curve:CountPoints()-1 Note that these numbers are different - e.g. Points are ALSO numbered in a curve from 0. > Mesh also holds "curves" - which are ordered lists of points. Here's a summary of the mesh / point / shape / curve relationships
#Moho pro 12 basics how to
You're already in the right place for understanding how to get Moho and your scripts talking to each other.Ī good place to start is to take a quick look (don't try to learn them!!) at the "core" classes in Moho : AnimChannel, M_Bone, M_Curve, M_Mesh, M_Point, M_Shape, M_Skeleton, MohoDoc, MohoLayer, ScriptInterface and get a feel for what's in them and how they fit together. Note that the recent versions of Moho (including the current version 13.5) use Lua 5.2 - the latest Lua version is 5.4 - make sure you use the right : Lua language reference docs as shown below the codeĬreates "vec" as an object of class LM_Vector2 Most of the Moho data objects will be of Lua type "userdata". It's best to use local variables by default except where necessary - such as all your script functions that Moho expects to find (e.g. Moho uses LM_ other examples are HS_, syn_, SZ_, AE_. Rule 1 in the Moho context: if you MUST use a global, then prefix it with some unique to you identifier. If you're already familiar with block-structured languages then you shouldn't have any real problems with Lua. This describes the basics of Lua: Programming in Lua
The objects and functions in the MOHO module allow scripts to create and manipulate layers, vector artwork, bone systems, and more. MOHO is the module that is a direct interface into Moho itself.
Scripts can use the user interface widgets in this module to build dialog boxes, and to set up custom interfaces for toolbar buttons. LM.GUI is a user interface module that is built on top of Moho's cross-platform user interface library. LM is the lowest-level module, and includes very basic objects like vectors and colors. The scripting interface in Moho (Anime Studio) is divided into three "modules":