The MohoLayer class is the base class for all Moho layer types. All actual layers in Moho are sub-classes of MohoLayer (vector layers, image layers, group layers, etc.), but the MohoLayer class provides some basic properties that they all have in common.
Use this function to find out what type of layer you're dealing with. See the layer type constants.
Return value (int): a layer type identifierTest whether a layer is a group layer, or sub-type of group layer (bone, particle, or switch).
Return value (bool): true if a group sub-type, otherwise falseTest whether a layer is a bone layer, or sub-type of bone layer (switch).
Return value (bool): true if a bone sub-type, otherwise falseReturns the name of the layer.
Return value (string): name of the layerSets a layer's name.
Return value: none name (string): the new nameToggle whether to display construction curves for this layer.
Return value: none b (bool): true to display construction curves, false to hide themRecalculates animated properties for this layer. Use this when you've made a lot fo changes that need to be re-processed.
Return value: none extended (bool): perform an extended updateGet the origin point of the layer.
Return value (LM_Vector2): the origin point of the layerSet the origin point of the layer.
Return value: none origin (LM_Vector2): the origin point of the layerGet the layer's parent layer (if any).
Return value (GroupLayer): the layer's parent (nil if the layer is a top-level layer with no parent)Get the id number of the layer's controlling parent bone.
Return value (int): id number of bone, -1 for none, or -2 for flexi-bindingSet the id number of the layer's controlling parent bone.
Return value: none id (int): id number of bone, -1 for none, or -2 for flexi-bindingCall this function before deleting a bone in a parent bone layer.
Return value: none boneID (int): the id of the bone you're about to deleteReturn value (bool):
Return value: none b (bool):
Return value (bool):
Return value: none b (bool):
Return value (bool):
Return value: none b (bool):
Return value (bool):
Return value: none b (bool):
Return value (bool):
Return value: none b (bool):
Get the layer's masking mode. See the masking mode constants.
Return value (int): the layer's masking modeSet the layer's masking mode. See the masking mode constants.
Return value: none mode (int): the layer's masking modeGet the layer's blending mode. See the blending mode constants.
Return value (int): the layer's blending modeSet the layer's blending mode. See the blending mode constants.
Return value: none mode (int): the layer's blending modeReturn value (bool):
Return value: none b (bool):
Tests whether the layer is immune to depth of field effects.
Return value (bool):Sets whether the layer is immune to depth of field effects.
Return value: none b (bool):Returns a file path to the layer's HSV modifier image.
Return value (string): file pathSets the file path to the layer's HSV modifier image.
Return value: none path (string): file pathGets the layer's transformation at a given frame. The layer transform includes things like layer scale, rotation, and translation.
Return value: none frame (int): frame number matrix (LM_Matrix): transform matrix to fill in doc (MohoDoc): the document objectGets the layer's complete transformation at a given frame, including the effects of its parent layers.
Return value: none frame (int): frame number matrix (LM_Matrix): transform matrix to fill in doc (MohoDoc): the document objectGets the parent layer's transformation at a given frame.
Return value: none frame (int): frame number matrix (LM_Matrix): transform matrix to fill in doc (MohoDoc): the document objectReturns the name of the current action being edited.
Return value (string): the name of the current actionActivates an action for editing. If the named action does not exist, it is first created.
Return value: none name (string): the name of the action to editInserts an action into the main timeline.
Return value: none name (string): the name of the action to insert frame (int): which frame to insert it at byReference (bool): true if by reference, false if by copythe layer's translation animation channel
the layer's scale animation channel
the layer's X rotation animation channel
the layer's Y rotation animation channel
the layer's Z rotation animation channel
the layer's horizontal flip animation channel
the layer's vertical flip animation channel
the layer's shear animation channel
the layer's visibility animation channel
the layer's blur animation channel
the layer's alpha animation channel
the layer's shadow on/off animation channel
the layer's shading on/off animation channel
the layer's motion blur on/off animation channel