MOHO Constants

The following constants are defined in the MOHO namespace. To use one of these constants, be sure to prepend MOHO. to the constant's name. For example, MOHO.CHANNEL_COLOR is valid, while CHANNEL_COLOR is not complete.

Message Codes

The following constants are used when setting up messages for user interface elements. Any messages you use in your custom controls should be greater than or equal to the MSG_BASE constant so as not to interfere with other GUI elements in Moho. For example you could use the following messages in a dialog you create: MSG_BASE, MSG_BASE + 1, MSG_BASE + 2, etc.


MSG_BASE - The starting message code for use by Moho scripts

Channel Types

The following constants are used to describe the different types of animation channels.


CHANNEL_UNKNOWN - An unknown type of channel
CHANNEL_VAL - A single value (floating point) channel
CHANNEL_VEC2 - A 2D vector channel
CHANNEL_VEC3 - A 3D vector channel
CHANNEL_COLOR - A color channel
CHANNEL_BOOL - A boolean (on/off) channel
CHANNEL_STRING - A string (text) channel

Interpolation Modes

The following constants are used to define the interpolation style between keyframes.


INTERP_LINEAR - Linear interpolation
INTERP_SMOOTH - Smooth interpolation
INTERP_EASE - Ease in/out interpolation
INTERP_STEP - Step interpolation
INTERP_NOISY - Noisy interpolation
INTERP_CYCLE - Cycle interpolation
INTERP_POSE - Reference an action

Layer Types

The following constants identify the type of a Moho layer.


LT_UNKNOWN - Unkown layer type
LT_VECTOR - Vector layer type
LT_IMAGE - Image layer type
LT_GROUP - Group layer type
LT_BONE - Bone layer type
LT_SWITCH - Switch layer type
LT_PARTICLE - Particle layer type
LT_NOTE - Note layer type
LT_3D - 3D layer type

Blending Modes

The following constants define the blending mode for a Moho layer.


BM_NORMAL - Normal blending
BM_MULTIPLY - Multiply blending
BM_SCREEN - Screen blending
BM_OVERLAY - Overlay blending
BM_ADD - Additive blending
BM_DIFFERENCE - Difference blending
BM_HUE - Hue blending
BM_SATURATION - Saturation blending
BM_COLOR - Color blending
BM_LUMINOSITY - Luminosity blending

Masking Modes

The following constants are used to define a layer's masking mode.


MM_MASKED - Normal masking
MM_NOTMASKED - No masking
MM_ADD_MASK - Add to the current mask
MM_SUB_MASK - Subtract from current mask
MM_ADD_MASK_INVIS - Add to the current mask, but keep invisible
MM_SUB_MASK_INVIS - Subtract from current mask, but keep invisible
MM_CLEAR_ADD_MASK - Clear the current mask, then add this layer

Group Masking

The following constants are used to define the masking that happens within a group.


GROUP_MASK_NONE - No masking
GROUP_MASK_SHOW_ALL - Turn on masking, initially showing all sub-layers
GROUP_MASK_HIDE_ALL - Turn on masking, initially hiding all sub-layers

Curvature

When setting the curvature through a vector point, the following constants can be used to set standard smooth or sharp corners.


SMOOTH - Make a curve smooth as it passes through a point
PEAKED - Make a corner in a curve as it passes through a point

Bone Binding

For the default binding style, a bone layer can use either flexible or region binding. The following constants define which mode a bone layer will use.


FLEXI_BINDING - Flexible binding
REGION_BINDING - Region binding

Animation Channels

Each type of animation channel is identified by a unique code.


CHANNEL_LAYER_T - layer translation
CHANNEL_LAYER_S - layer scale
CHANNEL_LAYER_ROT_Z - layer Z rotation
CHANNEL_LAYER_ROT_Y - layer Y rotation
CHANNEL_LAYER_ROT_X - layer X rotation
CHANNEL_LAYER_FLIP_H - layer horizontal flip
CHANNEL_LAYER_FLIP_V - layer vertical flip
CHANNEL_LAYER_SH - layer shear
CHANNEL_LAYER_VIS - layer visibility
CHANNEL_LAYER_BLUR - layer blur
CHANNEL_LAYER_ALPHA - layer alpha
CHANNEL_LAYER_SHADOW - layer shadow
CHANNEL_LAYER_SHADING - layer shading
CHANNEL_LAYER_MB - layer motion blur
CHANNEL_POINT - point motion
CHANNEL_POINT_SEL - point motion (selected points)
CHANNEL_CURVE - curvature
CHANNEL_CURVE_SEL - curvature (selected points)
CHANNEL_FILL - fill color
CHANNEL_FILL_SEL - fill color (selected shape)
CHANNEL_LINE - line color
CHANNEL_LINE_SEL - line color (selected shape)
CHANNEL_BONE - bone rotation
CHANNEL_BONE_SEL - bone rotation (selected bone)
CHANNEL_BONE_T - bone translation
CHANNEL_BONE_SEL_T - bone translation (selected bone)
CHANNEL_BONE_S - bone scale
CHANNEL_BONE_SEL_S - bone scale (selected bone)
CHANNEL_BONE_LOCK - bone lock
CHANNEL_BONE_SEL_LOCK - bone lock (selected bone)
CHANNEL_SWITCH - switch setting
CHANNEL_PARTICLE - particles on/off
CHANNEL_CAMERA_TRACK - camera track
CHANNEL_CAMERA_ZOOM - camera zoom
CHANNEL_CAMERA_ROLL - camera roll
CHANNEL_CAMERA_PANTILT - camera pan/tilt