Module MOHO

MOHO is the module that is a direct interface into Moho itself. The objects and functions in the MOHO module allow scripts to create and manipulate layers, vector artwork, bone systems, and more.

Constants as listed below need to be prefixed with "MOHO." e.g. MOHO.LT_VECTOR is valid; LT_VECTOR alone is undefined.

Methods:

Name Returns Description Ver
FontPreview LM_FontPreview < 9.5
IsMohoPro bool Added in version 10 10.0
Localize char < 9.5
MeshPreview LM_MeshPreview < 9.5
NewKeyframe void < 9.5
Redraw void Forces the Anime Studio editing window to redraw itself < 9.5

Constants:

3D

Name Value Description Ver
VECTOR3D_EXTRUDE 1 < 9.5
VECTOR3D_INFLATE 3 < 9.5
VECTOR3D_LATHE 2 < 9.5
VECTOR3D_NONE 0 < 9.5

Blending modes

Name Value Description Ver
BM_ADD 4 Additive blending < 9.5
BM_COLOR 8 Color blending < 9.5
BM_DIFFERENCE 5 Difference blending < 9.5
BM_HUE 6 Hue blending < 9.5
BM_LUMINOSITY 9 Luminosity blending < 9.5
BM_MULTIPLY 1 Multiply blending < 9.5
BM_NORMAL 0 Normal blending < 9.5
BM_OVERLAY 3 Overlay blending < 9.5
BM_SATURATION 7 Saturation blending < 9.5
BM_SCREEN 2 Screen blending < 9.5

Bone binding

Name Value Description Ver
FLEXI_BINDING 1 Flexible binding < 9.5
REGION_BINDING 2 Region binding < 9.5

Camera following

Name Value Description Ver
FC_CAMERA_FREE 4 Rotate on all axes as needed to face the camera < 9.5
FC_CAMERA_X 1 Rotate on the X axis to face the camera < 9.5
FC_CAMERA_Y 2 Rotate on the Y axis to face the camera (this is what the original option allowed) < 9.5
FC_CAMERA_Z 3 Rotate on the Z axis to face the camera < 9.5
FC_NONE 0 Don't rotate to face the camera < 9.5
FC_PLANE_FREE 8 Rotate on all axes as needed to face the camera plane < 9.5
FC_PLANE_X 5 Rotate on the X axis to face the camera plane < 9.5
FC_PLANE_Y 6 Rotate on the Y axis to face the camera plane < 9.5
FC_PLANE_Z 7 Rotate on the Z axis to face the camera plane < 9.5

Channel types

Name Value Description Ver
CHANNEL_BOOL 4 A boolean (on/off) channel < 9.5
CHANNEL_COLOR 3 A color channel < 9.5
CHANNEL_STRING 5 A string (text) channel < 9.5
CHANNEL_UNKNOWN 0 An unknown type of channel < 9.5
CHANNEL_VAL 1 A single value (floating point) channel < 9.5
CHANNEL_VEC2 2 A 2D vector channel < 9.5
CHANNEL_VEC3 6 A 3D vector channel < 9.5

Curvature

Name Value Description Ver
PEAKED 0 Make a corner in a curve as it passes through a point < 9.5
SMOOTH 0.30000001192093 Make a curve smooth as it passes through a point < 9.5

Curve type

Name Value Description Ver
CURVE_INTERP_LEGACY 0 Legacy curve type < 9.5
CURVE_INTERP_V7 1 Curve type from version 7 and up < 9.5

Dialog messages

Name Value Description Ver
MSG_BASE -10000 The starting message code for use by Moho scripts < 9.5

Group mask

Name Value Description Ver
GROUP_MASK_HIDE_ALL 2 Turn on masking, initially hiding all sub-layers < 9.5
GROUP_MASK_NONE 0 No masking < 9.5
GROUP_MASK_SHOW_ALL 1 Turn on masking, initially showing all sub-layers < 9.5

Image sampling

Name Value Description Ver
SM_BILINEAR 1 Bilinear sampling < 9.5
SM_NEAREST 0 Nearest neighbor sampling < 9.5

Interpolation modes

Name Value Description Ver
INTERP_BEZIER 9 Bezier interpolation < 9.5
INTERP_BOUNCE 10 Bounce interpolation (added in version 10) 10.0
INTERP_CYCLE 5 Cycle interpolation < 9.5
INTERP_EASE 2 Ease in/out interpolation < 9.5
INTERP_EASE_IN 7 Ease in interpolation < 9.5
INTERP_EASE_OUT 8 Ease out interpolation < 9.5
INTERP_ELASTIC 11 Elastic interpolation (added in version 10) 10.0
INTERP_LINEAR 0 Linear interpolation < 9.5
INTERP_NOISY 4 Noisy interpolation < 9.5
INTERP_POSE 6 Reference an action < 9.5
INTERP_SMOOTH 1 Smooth interpolation < 9.5
INTERP_STEP 3 Step interpolation < 9.5

Key selected

Name Value Description Ver
KEY_SELECTED 1 < 9.5

Layer display quality

Name Value Description Ver
LDQ_ANTIALIASING 256 general antialiasing 9.5
LDQ_BRUSHES 512 line brushes 9.5
LDQ_FILLS 4 vector fills 9.5
LDQ_GRAY_UNSELECTED 4096 gray out non-selected layers 9.5
LDQ_IMAGES 16 images 9.5
LDQ_IMAGES_HQ 32 high quality images 9.5
LDQ_LABELS 2048 labels (like bone names) 9.5
LDQ_MASKING 64 masking effects 9.5
LDQ_OUTLINES 8 vector outlines 9.5
LDQ_SHAPE_EFFECTS 1024 fill and line effects 9.5
LDQ_TRANSPARENCY 128 transparency 9.5
LDQ_WIREFRAME 2 construction curves, bones, etc. 9.5

Layer Types

Name Value Description Ver
LT_3D 8 3D layer type < 9.5
LT_AUDIO 9 Audio layer type < 9.5
LT_BONE 4 Bone layer type < 9.5
LT_GROUP 3 Group layer type < 9.5
LT_IMAGE 2 Image layer type < 9.5
LT_NOTE 7 Note layer type < 9.5
LT_PARTICLE 6 Particle layer type < 9.5
LT_PATCH 10 Patch layer type < 9.5
LT_SWITCH 5 Switch layer type < 9.5
LT_TEXT 11 Text layer type < 9.5
LT_UNKNOWN 0 Unkown layer type < 9.5
LT_VECTOR 1 Vector layer type < 9.5

Layers Window Search Context

Name Value Description Ver
LAYERWND_SEARCHCONTEXT_ALL 0 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_COMMENTSCONTAIN 9 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_COMPCONTAINS 3 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_GROUPNAMECONTAINS 2 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_KINDCONTAINS 4 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABELIS 5 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_NAMECONTAINS 1 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_TAGSCONTAIN 8 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_TIMELINEVISIBILITYIS 7 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_VISIBILITYIS 6 Added in version 12.2 12.2

Layers Window Search Context Label Color

Name Value Description Ver
LAYERWND_SEARCHCONTEXT_LABEL_BLUE 5 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_CADETBLUE 10 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_CORAL 11 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_GRAY 0 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_GREEN 4 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_ORANGE 2 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_PINK 8 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_PURPLE 6 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_RED 1 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_TAN 7 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_TURQUOISE 9 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_LABEL_YELLOW 3 Added in version 12.2 12.2

Layers Window Search Context Visibility

Name Value Description Ver
LAYERWND_SEARCHCONTEXT_VIS_ISNOTVISIBLE 1 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_VIS_ISORISNOTVISIBILE 2 Added in version 12.2 12.2
LAYERWND_SEARCHCONTEXT_VIS_ISVISIBLE 0 Added in version 12.2 12.2

Masking modes

Name Value Description Ver
MM_ADD_MASK 2 Add to the current mask < 9.5
MM_ADD_MASK_INVIS 4 Add to the current mask, but keep invisible < 9.5
MM_CLEAR_ADD_MASK 6 Clear the current mask, then add this layer < 9.5
MM_CLEAR_ADD_MASK_INVIS 7 < 9.5
MM_MASKED 0 Normal masking < 9.5
MM_NOTMASKED 1 No masking < 9.5
MM_SUB_MASK 3 Subtract from current mask < 9.5
MM_SUB_MASK_INVIS 5 Subtract from current mask, but keep invisible < 9.5

Ming

Name Value Description Ver
MING_VIEW_CAMERA 2 < 9.5
MING_VIEW_DIRECTOR 1 < 9.5
MING_VIEW_PANEL 3 < 9.5

Render styles

Name Value Description Ver
RS_FILL_BACKGROUND 2 < 9.5
RS_FILL_BACKGROUND_SHOWTHROUGH 3 < 9.5
RS_FILL_CHALK 7 < 9.5
RS_FILL_CRAYON 4 < 9.5
RS_FILL_HATCHED 5 < 9.5
RS_FILL_NONE 1 < 9.5
RS_FILL_NORMAL 0 < 9.5
RS_FILL_PEN 6 < 9.5
RS_LAYER_CUTOUT 2 < 9.5
RS_LAYER_HEAVY_OUTLINE 1 < 9.5
RS_LAYER_NORMAL 0 < 9.5
RS_LINE_BLACK 2 < 9.5
RS_LINE_CHALK 6 < 9.5
RS_LINE_CRAYON 4 < 9.5
RS_LINE_NONE 1 < 9.5
RS_LINE_NORMAL 0 < 9.5
RS_LINE_PEN 5 < 9.5
RS_LINE_SKETCHY 3 < 9.5
RS_POSEBM_RELATIVETOCURRENT 2 < 9.5
RS_POSEBM_RELATIVETODEFAULT 1 < 9.5
RS_POSEBM_STANDARD 0 < 9.5

Shading

Name Value Description Ver
SHADING_EXTRUDED_EDGE 4 Added in version 11 11.0
SHADING_HATCHED 2 < 9.5
SHADING_NONE 0 < 9.5
SHADING_TOON 1 < 9.5