Moho Studio MCP
v3.1.1MCP server and Lua plugin for 2D animation, rigging, lip-sync, glTF, and CLI render in Moho 14.4
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
moho_status
Check live Moho Pro 14.4 connectivity, plugin version, active document, active layer, frame, active action, Layer Comp count, and exporter path.
moho_activatePoller
Locate the custom MohoStudioMCP Poller teal-star icon in Moho Pro 14.4's toolbar via PrintWindow and click it in the background (PostMessage) without moving the user's mouse cursor or stealing window focus. Also runs automatically if any live RPC stalls for >1.1s.
moho_apiInspect
Inspect live Lua 5.4 classes, methods, tolua++ .get/.set properties, and constants exposed by Moho 14.4 (e.g. MOHO, LM, moho, document, layer, M_Bone, M_Mesh).
| Parameter | Type | Description |
|---|---|---|
filter | string | Optional case-insensitive substring filter |
limit | number | Maximum entries to return (default: 250) |
target | string | Global or MOHO/LM class name (default: 'MOHO') |
lua_execute
Execute Lua 5.4 code live inside Moho Pro 14.4 with `moho`, `helpers`, `json`, `delaunay`, and `args` in scope. Guarded by pcall + optional PrepMultiUndo and captures print() logs.
| Parameter | Type | Description |
|---|---|---|
code * | string | Lua 5.4 chunk to execute; `return <value>` sends JSON back |
args | object | Optional JSON object exposed as `args` inside the chunk |
undo | boolean | Wrap in PrepMultiUndo before running (default: true) |
document_getInfo
Get open document metadata (name, path, dimensions, FPS, frame range, current frame, layer counts, Layer Comp count, active doc action, background color).
document_new
Create a brand-new Moho document and optionally configure dimensions, FPS, frame range, and background color.
| Parameter | Type | Description |
|---|---|---|
backColor | object | RGBA color object using either 0..255 byte values or 0.0..1.0 normalized floats |
endFrame | number | Timeline end frame (default: 240) |
fps | number | Frames per second (default: 24) |
height | number | Canvas height in pixels (default: 1080) |
startFrame | number | Timeline start frame (default: 1) |
width | number | Canvas width in pixels (default: 1920) |
document_open
Open an existing .moho project file from disk live inside Moho.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute file path to the .moho project |
document_save
Save the currently open Moho document in place.
document_saveAs
Save the currently open Moho document to a specific file path.
| Parameter | Type | Description |
|---|---|---|
path * | string | Destination .moho file path |
document_close
Close the currently active Moho document tab cleanly (auto-saves if it has a path to prevent blocking Save prompts).
| Parameter | Type | Description |
|---|---|---|
force | boolean | Allow closing an untitled document without saving (default: false) |
saveFirst | boolean | Save before closing to avoid blocking Save dialogs (default: true) |
savePath | string | Optional path to FileSaveAs before closing an untitled document |
document_undo
Undo or Redo one or more steps in the open Moho document.
| Parameter | Type | Description |
|---|---|---|
mode | string | Default: 'undo' |
steps | number | Number of steps (1..50, default: 1) |
document_setSettings
Modify open document dimensions, FPS, start/end frames, background color (LM.rgb_color via verified SetBackCol), or Depth of Field.
| Parameter | Type | Description |
|---|---|---|
backColor | object | RGBA color object using either 0..255 byte values or 0.0..1.0 normalized floats |
dof | object | Guarded Depth of Field settings if exposed by active Moho version |
endFrame | number | Playback/render end frame |
fps | number | Document frame rate (FPS) |
height | number | Canvas height in pixels |
startFrame | number | Playback/render start frame |
width | number | Canvas width in pixels |
document_import
Import a PNG/JPG/WebP image directly as a live ImageLayer, import SVG headlessly through Moho 14.4 SS_SVGImport (with scaling/consolidation controls), or import PSD/Moho files via FileImport.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute file path to import |
asImageLayer | boolean | Create an ImageLayer and call SetSourceImage (default true for raster images) |
expandGroups | boolean | For .svg via SS_SVGImport: expand imported group hierarchy |
minify | boolean | For .svg via SS_SVGImport: enable layer consolidation (default: true) |
minifyGroups | boolean | For .svg via SS_SVGImport: ungroup single-child groups |
minifyLayers | boolean | For .svg via SS_SVGImport: combine adjacent vector layers |
minifyLayersUnnamed | boolean | For .svg via SS_SVGImport: consolidate only unnamed layers |
mode | number | Moho FileImport mode (default 0) |
name | string | Optional layer name for imported ImageLayer |
parentLayerId | number | Optional parent Group/Bone layer ID |
parentLayerName | string | Optional parent Group/Bone layer name |
recenter | boolean | For .svg via SS_SVGImport: recenter artwork in canvas |
requireSvgBridge | boolean | Return an error instead of falling back to FileImport if SS_SVGImport fails |
scaleMode | string | For .svg via SS_SVGImport: canvas-fit or asset-relative scaling preset |
useNativeSvgImport | boolean | Force Moho's legacy FileImport instead of SS_SVGImport for .svg |
document_setFrame
Move Moho's timeline to a specific frame number.
| Parameter | Type | Description |
|---|---|---|
frame * | number | Target frame number (0 for setup frame, >= 1 for animation) |
document_renderFrame
Render a specific frame live via Moho's FileRender engine and return the PNG.
| Parameter | Type | Description |
|---|---|---|
frame | number | Frame number to render (defaults to current frame) |
outputPath | string | Optional PNG output path (defaults to temp folder) |
restoreFrame | boolean | Restore timeline to prior frame after rendering (default: true) |
returnImage | boolean | Include base64 PNG image content in MCP response (default: true) |
document_renderRange
Render a PNG frame sequence across a frame range live from the open Moho document (auto-creates outputDir).
| Parameter | Type | Description |
|---|---|---|
outputDir * | string | Directory where PNG frames will be written |
endFrame | number | Last frame to render (defaults to document endFrame) |
prefix | string | Filename prefix (default: 'frame_') |
startFrame | number | First frame to render (defaults to document startFrame) |
step | number | Frame stride (default: 1) |
document_captureWindow
Capture the primary visible Moho Pro 14 application window (viewport, timeline, layers, toolbar) as PNG (Win32 PrintWindow on Windows, screencapture on macOS).
| Parameter | Type | Description |
|---|---|---|
outputPath | string | Optional PNG path to save the screenshot |
document_cliRender
Run Moho Pro 14.4's multi-threaded, GPU-accelerated headless CLI renderer (`Moho -r`) on any saved `.moho` file to export PNG sequences, MP4, MOV, AnimatedGIF, PSD, or SVG with optional Layer Comp filtering without blocking the Moho GUI.
| Parameter | Type | Description |
|---|---|---|
projectPath * | string | Absolute path to saved .moho project file |
addLayerCompSuffix | boolean | Append Layer Comp name to output filenames |
antiAliasing | boolean | Enable anti-aliasing (default: true) |
createFoldersForLayerComps | boolean | Create separate subfolders per Layer Comp |
endFrame | number | Last frame to render (-end) |
extraSmooth | boolean | Enable extra-smooth image sampling (default: true) |
format | string | Output format (PNG, MP4, MOV, AnimatedGIF, JPEG, BMP, TGA, PSD, SVG; default: PNG) |
halfFps | boolean | Render at half frame rate |
halfSize | boolean | Render at 50% width and height |
layerComp | string | Render only a specific Layer Comp by name (-layercomp) |
layerEffects | boolean | Render layer effects like shadows and blur (default: true) |
multithread | boolean | Enable multi-threaded rendering |
outputDir | string | Output folder (-outfolder); auto-created if missing |
outputFile | string | Explicit output file path (-o) instead of outputDir |
premultiply | boolean | Premultiply alpha channel (default: true) |
returnImage | boolean | If true and PNG was produced, include first PNG frame in MCP response (default: false) |
shapeEffects | boolean | Render shape effects like Soft Edge and Gradients (default: true) |
startFrame | number | First frame to render (-start) |
timeoutMs | number | Render timeout in ms (default: 180000) |
document_exportGltf
Headless Moho Pro 14.4 glTF 2.0 / GLB export wrapping Tool/ss_gltf_export.lua (bypasses SS_glTFExportDialog:DoModal safely). Run rig_auditGltf first to check for animated vectors without Warp Layers or non-in-place Actions.
| Parameter | Type | Description |
|---|---|---|
comment | string | Optional glTF asset metadata comment |
copyright | string | Optional glTF asset copyright notice |
fbf | boolean | Bake every frame into glTF keyframes (preserves dynamics/Smart Bones; default: false) |
fbfStep | number | Keyframe interval step when fbf=true (1..999, default: 1) |
fileName | string | Output base filename without extension (defaults to document name) |
flipZOrder | boolean | Invert layer Z stacking order (default: false) |
format | string | Output container format (default: 'glb') |
gridDensity | number | Mesh polygon resolution 1..100 (default: 20) |
outputDir | string | Destination folder (required if document is unsaved; auto-created if missing) |
reRender | string | Re-render layer textures mode (default: 'none') |
scale | number | Texture scaling factor 0.1..10.0 (default: 1.0 = 100%) |
zOffset | number | Z-offset factor between stacked layers 0.1..100 (default: 1) |
rig_auditGltf
Read-only pre-flight audit of the open Moho document for glTF 2.0 export readiness: detects animated vector layers missing Warp Layers, active bone dynamics needing fbf baking, non-in-place Actions, unsaved document state, and gltf_* layer userTags.
| Parameter | Type | Description |
|---|---|---|
inPlaceTolerance | number | Max allowed root translation drift in Regular Actions before flagging warning (default: 0.15) |
rig_audit
Read-only Moho Pro 14.4 Rig Health Linter: checks for non-zero strength on Pin Bones / IK Targets / Smart Bone dials, rigid-bound GroupLayers trapping bone-bound children, Animated Layer Order collisions across multiple Smart Bone Actions, BoneLayers stuck in an active Action, unbound artwork under BoneLayers, and missing pre-roll for active Bone Dynamics or ParticleLayers.
| Parameter | Type | Description |
|---|---|---|
checkDynamicsPreRoll | boolean | Flag active Bone Dynamics or ParticleLayers when document startFrame <= 1 (default: true) |
checkUnboundArtwork | boolean | Flag Vector/Image child layers under a BoneLayer without explicit rigid, flexi-subset, or point binding (default: true) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
strengthEpsilon | number | Threshold above which control-bone strength is reported as an error (default: 0.001) |
rig_getControls
Read-only Puppet Control Surface inspector for any Moho character rig: call this BEFORE animating an existing character to discover all Smart Bone Dials (with exact angle sweeps, limits, and inferred roles like blink/mouth/body_turn), Foot/Hand IK Targets, Pin Bones, SwitchLayer controls, Vitruvian Bone groups, and Regular Actions in one call.
| Parameter | Type | Description |
|---|---|---|
frame | number | Frame at which to sample current dial angles, IK positions, and active switch children (default: current frame) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
layercomp_list
List all Layer Comps in the open document along with their member layers.
layercomp_manage
Create, update layer membership, apply, rename, additively show/hide, snapshot visible layers, expose on timeline, or delete Layer Comps.
| Parameter | Type | Description |
|---|---|---|
operation * | string | Layer Comp operation to execute |
clearFirst | boolean | Clear prior layers before adding (for set_layers, default: true) |
exclusive | boolean | For expose_timeline: hide non-comp layers from timeline (default: false) |
frame | number | Frame for apply/show/hide/snapshot_visible operations |
includeChildren | boolean | Recursively include descendant layers of specified Group/Bone/Switch layers (default: true) |
index | number | Zero-based Layer Comp index (alternative selector to name) |
layerIds | array | Layer IDs to include (for create/set_layers) |
layerNames | array | Layer names to include (for create/set_layers) |
name | string | Layer Comp name (target for all operations, or new name for create/snapshot_visible) |
newName | string | New Layer Comp name (required for rename) |
shown | boolean | For expose_timeline: show (true) or hide (false) comp layers on timeline (default: true) |
layer_list
Return the full recursive layer tree with IDs, UUIDs, types, masking, warp/curver flags, bone counts, Vitruvian group counts, and active switch children.
layer_getProperties
Inspect transform, opacity, visibility, blur, origin, blending mode, masking mode, bone parent, tags/comments, and image/warp info of a layer.
| Parameter | Type | Description |
|---|---|---|
frame | number | Frame at which to sample animated properties (default: current frame) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
layer_create
Create a new layer live inside Moho (vector, image, bone, group, switch, framebyframe, particle, patch, text, note, audio). For framebyframe, auto-creates an initial child vector frame unless createInitialFrame=false.
| Parameter | Type | Description |
|---|---|---|
type * | string | Moho layer type to create |
createInitialFrame | boolean | For type='framebyframe': auto-create initial vector child layer (default: true) |
editOnly | boolean | Mark layer as edit-only guide (excluded from render) |
initialFrameName | string | For type='framebyframe': initial child vector layer name (default: 'Frame 1') |
insertAtTop | boolean | Insert at top of parent group instead of bottom (default: true) |
name | string | Layer display name |
noteText | string | Text content when type='note' |
parentLayerId | number | Optional parent Group/Bone/Switch layer ID |
parentLayerName | string | Optional parent Group/Bone/Switch layer name |
sourceImage | string | Image file path when type='image' |
layer_delete
Delete a layer by ID, name, or UUID (undoable).
| Parameter | Type | Description |
|---|---|---|
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
layer_duplicate
Duplicate a layer (or create a live Moho Referenced Layer when asReference=true).
| Parameter | Type | Description |
|---|---|---|
asReference | boolean | Create a synced Moho Reference Layer instead of an independent copy (default: false) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
newName | string | Optional name for the duplicated or referenced layer |
layer_reparent
Move a layer into a Group/Bone/Switch/Particle layer or reorder it behind or in front of another layer.
| Parameter | Type | Description |
|---|---|---|
behindLayerId | number | Place immediately behind this sibling layer ID |
behindLayerName | string | Place immediately behind this sibling layer name |
inFrontOfLayerId | number | Place immediately in front of this sibling layer ID |
inFrontOfLayerName | string | Place immediately in front of this sibling layer name |
insertAtTop | boolean | Insert at top of parent group when using parentLayerId/Name (default: true) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
parentLayerId | number | Destination Group/Bone/Switch layer ID |
parentLayerName | string | Destination Group/Bone/Switch layer name |
layer_select
Make a layer the active selection in Moho.
| Parameter | Type | Description |
|---|---|---|
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
layer_setProperties
Modify layer transform, parallax Z (with preserveApparentSize), timingOffset, shownOnTimeline, immuneToDof, Layer FX (colorize/outline/shadow/shading), vectorNoise, opacity, blur, blendingMode, and metadata.
| Parameter | Type | Description |
|---|---|---|
additiveCycle | boolean | Enable additive cycle accumulation |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
blendingMode | Blending mode name (e.g. 'multiply', 'screen', 'add') or numeric code | |
blur | number | Raw document-unit blur radius (prefer blurPx for pixel units) |
blurPx | number | Layer blur radius in pixels (converted via moho:PixelToDoc) |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
colorize | object | Layer Colorize tint overlay |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
depthSort | boolean | Trigger FullDepthSort on Group or DepthSort on document |
editOnly | boolean | Show in editor only (omit from renders) |
flipH | boolean | Flip layer horizontally |
flipV | boolean | Flip layer vertically |
frame | number | Target frame for keyframed properties (default: current frame) |
hold | number | Frames to hold prior value before interpolating |
immuneToDof | boolean | Exclude layer from project Depth of Field blur |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
labelColor | number | Layer panel label color tag index (0..11) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
locked | boolean | Lock layer against accidental edits |
name | string | New layer name |
opacity | number | Layer opacity (0.0 .. 1.0) |
origin | object | Layer pivot origin {x, y} |
outline | object | Layer Outline stroke effect |
preserveApparentSize | boolean | Auto-adjust X/Y and scale when translation.z changes (Moho Alt+Shift parallax) |
renderOnly | boolean | Include in renders only (hide in editor) |
rotationX | number | 3D X tilt rotation in degrees |
rotationY | number | 3D Y turn rotation in degrees |
rotationZ | number | 2D Z rotation in degrees |
scale | object | Layer scale {x, y, z} |
shading | object | Layer inner shading effect |
shadow | object | Layer drop shadow effect |
shownOnTimeline | boolean | Pin layer visibly on the timeline |
stagger | boolean | Enable Moho Stagger step interpolation flag |
timingOffset | number | Sequencer frame offset |
translation | object | Layer translation {x, y, z} |
userComments | string | Layer user comments |
userTags | string | Layer metadata tags (including gltf_* export tags) |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
vectorNoise | object | VectorLayer procedural line/fill boil noise settings |
visible | boolean | Layer visibility toggle (keyframed at frame) |
layer_bindToBone
Rigid-bind a layer to one bone (`boneId`, or -1 to unbind) OR flexi-bind it to an exact subset of bones (`flexiBoneIds`) with optional elbow smooth-joint binding (`elbowBind`).
| Parameter | Type | Description |
|---|---|---|
boneId | number | Rigid-bind layer to one parent bone index (-1 to unbind) |
elbowBind | boolean | Mark flexi-bone subset for smooth joint / elbow deformation |
flexiBoneIds | array | Flexi-bind layer to an explicit subset of bone indices |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
layer_setWarpLayer
Link (or unlink when warpLayerId/Name omitted) a Smart Warp or Curver VectorLayer to a target layer.
| Parameter | Type | Description |
|---|---|---|
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
warpLayerId | number | Smart Warp or Curver VectorLayer ID to assign (omit to unlink) |
warpLayerName | string | Smart Warp or Curver VectorLayer name to assign (omit to unlink) |
layer_setMasking
Configure Group masking (`groupMask` or one-shot `preset: 'mask_inside_bottom'`) and per-layer masking (`maskingMode`, `expandByPixel`, guarded `excludeStrokes`).
| Parameter | Type | Description |
|---|---|---|
excludeStrokes | boolean | Exclude strokes from mask if exposed by active Moho version |
expandByPixel | boolean | Expand mask by one pixel to prevent seam halos |
groupMask | string | Group-level masking mode (requires Group/Bone/Switch/Particle layer) |
invisibleMask | boolean | Use add_mask_invis for bottom layer with mask_inside_bottom preset |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
maskingMode | string | Per-layer masking role inside a masked group |
preset | string | One-shot setup: group hide_all, bottom child add_mask, siblings masked |
layer_setLayerOrder
Inspect or keyframe Animated Layer Order (`GroupLayer:EnableLayerOrdering` / `GetLayerOrdering`) on a Group/Bone/Switch layer at any frame (works inside Smart Bone Actions).
| Parameter | Type | Description |
|---|---|---|
additiveCycle | boolean | Enable additive cycle accumulation |
allowPartial | boolean | Auto-append omitted children keeping relative order (default: true) |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
enabled | boolean | Enable/disable Animated Layer Order |
frame | number | Frame to inspect or keyframe layer order (default: current frame) |
hold | number | Frames to hold prior value before interpolating |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
moveLayerId | number | Relative move: child layer ID |
moveLayerName | string | Relative move: child layer name |
order | array | Child layer names, IDs, or UUIDs (bottom-to-top unless topToBottom=true) |
position | string | Relative move target |
referenceLayerId | number | Reference sibling layer ID for position='above' or 'below' |
referenceLayerName | string | Reference sibling layer name for position='above' or 'below' |
stagger | boolean | Enable Moho Stagger step interpolation flag |
topToBottom | boolean | Interpret `order` array as top-to-bottom instead of bottom-to-top |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
layer_convertType
Convert a Group, Bone, or Switch layer to another container type preserving children, transforms, animation channels, masking, Layer Order, and Layer Comp membership.
| Parameter | Type | Description |
|---|---|---|
targetType * | string | Target container layer type |
deleteOriginal | boolean | Delete source layer after copying children/channels (default: true) |
frameByFrame | boolean | Enable Frame-by-Frame when targetType='switch' |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
newName | string | Name for converted layer when deleteOriginal=false |
layer_groupSelection
Wrap multiple existing layers into a new Group, Bone, or Switch container preserving stacking order, with optional masking preset.
| Parameter | Type | Description |
|---|---|---|
expandByPixel | boolean | Enable 1px mask expansion on children when applying masking |
groupMask | string | Optional group masking mode |
groupType | string | Container type to create (default: 'group') |
invisibleMask | boolean | Use invisible bottom mask when applying maskPreset |
layerIds | array | Layer IDs to wrap inside the new group |
layerNames | array | Layer names to wrap inside the new group |
maskPreset | string | Optional masking preset applied immediately to the new group |
name | string | Name of the new container layer |
layer_followPath
Attach/detach a layer along a VectorLayer curve with optional Alt-bend (`bendLayer`) and keyframeable `percent` progress.
| Parameter | Type | Description |
|---|---|---|
additiveCycle | boolean | Enable additive cycle accumulation |
bendLayer | boolean | Deform layer along the path curve (Moho Alt-bend) |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
curveIndex | number | Zero-based curve index in followLayer (default: 0) |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
detach | boolean | Detach layer from its current path |
followLayerId | number | VectorLayer ID providing the path curve |
followLayerName | string | VectorLayer name providing the path curve |
frame | number | Frame for keyframing `percent` progress (default: current frame) |
hold | number | Frames to hold prior value before interpolating |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
percent | number | Position percentage along curve (0.0 .. 1.0+) |
stagger | boolean | Enable Moho Stagger step interpolation flag |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
layer_referenceManage
Inspect status, break link, sync/update (`MohoLayerRefSyncOptions`), mark outdated, or import external Moho Referenced Layers.
| Parameter | Type | Description |
|---|---|---|
operation * | string | Reference layer management operation |
addNewLayers | boolean | Sync flag: add new layers from source (default: true) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
mode | number | Fallback FileImport mode |
path | string | Source .moho path for import_reference |
removeMissingLayers | boolean | Sync flag: remove deleted layers (default: true) |
replaceMismatchedBones | boolean | Sync flag: replace mismatched bone layers (default: true) |
replaceMismatchedVectors | boolean | Sync flag: replace mismatched vector layers (default: true) |
layer_renderImage
Render a single isolated layer directly to a transparent PNG via Moho 14.4 RenderLayerImage and return its world bounds and image.
| Parameter | Type | Description |
|---|---|---|
embedColorProfile | boolean | Embed ICC color profile in rendered PNG |
frame | number | Frame to render (default: current frame) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
maxDimension | number | Maximum pixel dimension (default: 2048) |
minDimension | number | Minimum pixel dimension (default: 512) |
outputPath | string | Optional destination PNG path |
returnImage | boolean | Include base64 PNG in MCP response (default: true) |
trimResult | boolean | Trim transparent padding around layer bounds (default: false) |
switch_setActive
Inspect or keyframe active child layers on a SwitchLayer (single frame or explicit keyframes array, Frame-by-Frame flag, vector sub-layer interpolation). For Papagayo .dat or Rhubarb JSON lip-sync files, use switch_importLipSync.
| Parameter | Type | Description |
|---|---|---|
childName | string | Child layer name to activate at `frame` |
frame | number | Target frame to read or keyframe (defaults to current frame) |
frameByFrame | boolean | Toggle Frame-by-Frame layer flag |
interpMode | boolean | Enable smooth vector interpolation between switch children |
keyframes | array | Optional batch of { frame, childName } switch keyframes |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
switch_importLipSync
Import Papagayo (.dat MohoSwitch1), Rhubarb Lip Sync JSON (mouthCues), or explicit phoneme cues onto a SwitchLayer with optional Preston Blair mapping, fallback child, frame offset, and missing-child reporting.
| Parameter | Type | Description |
|---|---|---|
allowFrame0 | boolean | Allow writing or clearing Frame 0 setup key (default: false) |
caseInsensitive | boolean | Match SwitchLayer child names case-insensitively (default: true) |
clearExisting | boolean | Delete existing switch keyframes at frame >= clearFromFrame before importing (default: false; Frame 0 is preserved) |
clearFromFrame | number | First frame to clear when clearExisting=true (default: 1) |
cues | array | Explicit array of { frame or timeSec, phoneme } entries (alternative to filePath/data) |
data | string | Inline Papagayo MohoSwitch1 text or Rhubarb JSON text (alternative to filePath) |
dedupeAdjacent | boolean | Skip consecutive cues that resolve to the same child layer (default: true) |
fallbackChild | string | Fallback child layer name (e.g. 'rest') when a cue phoneme has no matching child |
filePath | string | Path on disk to a Papagayo .dat or Rhubarb .json lip-sync file |
format | string | Input format parser (default: 'auto') |
fps | number | Frame rate used to convert timeSec/start seconds to frames (defaults to document FPS) |
frameOffset | number | Frame offset added to parsed cues (defaults to 0 for frame-based Papagayo, 1 for time-based Rhubarb so 0.0s lands on Frame 1) |
interpMode | boolean | Optional toggle for smooth vector sub-layer interpolation |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
phonemeMap | object | Custom dictionary mapping source phoneme names to SwitchLayer child names (overrides preset) |
preset | string | Built-in phoneme mapping preset: 'rhubarb_to_preston_blair' maps A->MBP, B->etc, C->E, D->AI, E->O, F->U, G->FV, H->L, X->rest (default: 'none') |
fbf_manage
Author Frame-by-Frame (FBF) animation on a SwitchLayer: list_timeline, add_blank_frame, duplicate_frame (new copy), clone_frame (reuse existing drawing), delete_frame, and push_frames (shift exposure timing).
| Parameter | Type | Description |
|---|---|---|
operation * | string | FBF operation to execute |
autoEnableFbf | boolean | Automatically enable IsFBFLayer flag on mutating ops (default: true) |
deleteLayer | boolean | For delete_frame: also delete child layer if no other keys reference it (default: false) |
delta | number | For push_frames: positive or negative frame shift |
frame | number | Target frame for add/duplicate/clone/delete (defaults to current frame) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
name | string | Optional child layer name for add_blank_frame / duplicate_frame |
sourceChildName | string | Source child layer name for duplicate_frame / clone_frame |
sourceFrame | number | Source frame for duplicate_frame / clone_frame |
startFrame | number | For push_frames: first frame to shift |
particle_configure
Inspect or configure Moho Pro ParticleLayer emission, velocity, direction, acceleration, damping, source dimensions, and simulation flags (read-only when no mutating fields are passed; returns full 18-field state).
| Parameter | Type | Description |
|---|---|---|
accelerationDeg | number | Acceleration/gravity direction in degrees |
accelerationRate | number | Acceleration magnitude |
damping | number | Air resistance / velocity damping |
directionDeg | number | Emission direction angle in degrees |
directionSpreadDeg | number | Emission cone spread angle in degrees |
emitInOrder | boolean | Cycle through child layers sequentially instead of randomly |
evenlySpaced | boolean | Emit particles at uniform intervals |
frame | number | Frame for reading/keying the `running` track (default: 0) |
freeFloating | boolean | Detach emitted particles from emitter layer movement |
fullSpeedStart | boolean | Pre-populate particles at frame 0 |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
lifetime | number | Particle lifetime in frames (0 = infinite) |
numParticles | number | Total particle count |
orientation | boolean | Orient particles along travel direction |
playbackTimeShift | number | Playback time offset in frames |
previewCount | number | Viewport preview particle count |
previewPercentage | number | Preview percentage (0..100) |
randomSeed | number | Deterministic integer random seed |
randomStartTime | boolean | Randomize child animation start frame per particle |
running | boolean | Turn particle emitter on or off at `frame` |
sourceDimensions | object | Emitter box dimensions in document units |
useBaseLayerAsSource | boolean | Emit particles from vertices of the bottom vector child layer |
velocity | number | Initial launch velocity |
velocitySpread | number | Random velocity spread |
bone_list
List all bones in a BoneLayer with world head/tail positions, local transforms, parent links, IK targets, constraints, shy flag, and Moho 14 dynamics.
| Parameter | Type | Description |
|---|---|---|
frame | number | Frame at which to sample bone transforms (default: current frame) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
bone_create
Create a new bone in a BoneLayer from world-space (headX/Y -> tailX/Y), geometry-snapped refs (headRef/tailRef), or parent-local (x/y, angleDeg, length).
| Parameter | Type | Description |
|---|---|---|
angleDeg | number | Parent-local bone angle in degrees |
headRef | object | Snap bone endpoint to a layer anchor, vector point, or shape centroid (auto-transformed into BoneLayer space) |
headX | number | World-space bone head X coordinate |
headY | number | World-space bone head Y coordinate |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
length | number | Bone length (0 creates a Pin Bone) |
name | string | Bone name |
parentBoneId | number | Parent bone index (-1 for root bone) |
parentBoneName | string | Parent bone name (alternative to parentBoneId) |
pinBone | boolean | Create a zero-length Pin Bone (fLength=0, default strength=0) |
scale | number | Initial bone scale at frame 0 (default: 1) |
strength | number | Bone influence strength radius (set 0 for control/pin/IK target bones) |
tags | number | Moho bone color tag index (0..11) |
tailRef | object | Snap bone endpoint to a layer anchor, vector point, or shape centroid (auto-transformed into BoneLayer space) |
tailX | number | World-space bone tail X coordinate |
tailY | number | World-space bone tail Y coordinate |
x | number | Parent-local bone head X (alternative to headX/headRef) |
y | number | Parent-local bone head Y (alternative to headY/headRef) |
bone_createSmartDial
One-shot studio Smart Bone Dial builder (mirrors Moho Bone > Make Smart Bone Dial): creates a zero-strength, labeled, color-tagged, IK-ignored dial bone beside the character with angle limit wedges and its 96-frame linear Smart Bone Action(s) (<name>, plus <name> 2 when bidirectional=true) for Blink, Mouth, Head Turn, Body Turn, Eyebrows, or Hand controls.
| Parameter | Type | Description |
|---|---|---|
name * | string | Dial bone and primary Smart Bone Action name (e.g. 'Blink', 'Mouth Open', 'Body Turn') |
addMidpointKey | boolean | In 360 mode, add a midpoint +/-180 deg linear key (default: true) |
bidirectional | boolean | Create two opposing Smart Bone Actions (<name> and <name> 2) with symmetric angle limits (default: false) |
clockwise | boolean | In 360 mode, sweep -360 deg instead of +360 deg when deltaAngleDeg omitted |
colorTag | number | Moho bone color tag index (default: 1 = red studio dial) |
deltaAngleDeg | number | Primary action rotation delta in degrees from restAngleDeg (default: +90, or +/-360 in 360 mode) |
duration | number | Smart Bone Action length in frames (default: 96) |
enableConstraints | boolean | Enable red angle-limit wedges on the dial bone (default: true for standard mode) |
interpolation | string | Driving bone keyframe interpolation inside the Smart Bone Action (default: 'linear') |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
leaveActive | string | Leave 'first' (<name>) or 'second' (<name> 2) Action active for immediate pose authoring, or 'none' to return to Mainline (default: 'none') |
length | number | Dial bone length in document units (default: 0.22) |
maxDeg | number | Maximum angle constraint limit in degrees relative to rest angle |
minDeg | number | Minimum angle constraint limit in degrees relative to rest angle |
mirrorFrame0ToEnd | boolean | Mirror Frame 0 transforms/points to endFrame (default: true for 360 mode, false for standard) |
mode | string | Standard constrained dial or unwrapped +/-360-degree turnaround dial (default: 'standard') |
parentBoneId | number | Optional parent control-panel root bone ID (-1 for unparented) |
parentBoneName | string | Optional parent control-panel root bone name |
restAngleDeg | number | Neutral Frame-0 bone angle in degrees (default: 90, pointing straight up) |
secondDeltaAngleDeg | number | Secondary '<name> 2' rotation delta in degrees when bidirectional=true (default: -90) |
showLabel | boolean | Display bone name label beside dial in Moho viewport (default: true) |
side | string | Side of the character for auto-layout when x/y omitted (default: 'right') |
x | number | Optional explicit local X position (omit to auto-stack in a side control panel beside the character) |
y | number | Optional explicit local Y position (omit to auto-stack beside the character) |
bone_delete
Delete a bone by index or name from a BoneLayer.
| Parameter | Type | Description |
|---|---|---|
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
bone_setTransform
Set/keyframe a bone's position (x, y), angleDeg, scale, flipH/V, parentBoneId/Name, or targetBone/Name at a frame with optional interpolation.
| Parameter | Type | Description |
|---|---|---|
additiveCycle | boolean | Enable additive cycle accumulation |
angleDeg | number | Local bone rotation angle in degrees |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
flipH | boolean | Flip bone horizontally |
flipV | boolean | Flip bone vertically |
frame | number | Target frame (default: current frame) |
hold | number | Frames to hold prior value before interpolating |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
parentBoneId | number | Animated parent bone index (-1 to unparent) |
parentBoneName | string | Animated parent bone name ('' to unparent) |
scale | number | Bone length scale multiplier |
stagger | boolean | Enable Moho Stagger step interpolation flag |
targetBone | number | IK target bone index (-1 to clear) |
targetBoneName | string | IK target bone name ('' to clear) |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
x | number | Local bone X position |
y | number | Local bone Y position |
bone_setProperties
Update bone name, length (0 for Pin Bone), strength, offset, flipH/V, parentBoneId/Name, IK targetBone/Name, ignoredByIK, fixedAngle, shy, showLabel, or color tags.
| Parameter | Type | Description |
|---|---|---|
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
fixedAngle | boolean | Keep bone angle independent of parent rotation |
flipH | boolean | Horizontal flip state |
flipV | boolean | Vertical flip state |
frame | number | Frame for animated properties like targetBone/flip (default: 0) |
ignoredByIK | boolean | Exclude bone from IK chain solving |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
length | number | Bone length (0 for Pin Bone) |
name | string | New bone name |
offset | object | Offset Bone vector (fOffset) |
parentBoneId | number | Parent bone index (-1 for root) |
parentBoneName | string | Parent bone name ('' for root) |
showLabel | boolean | Show bone name label in viewport |
shy | boolean | Hide bone when Shy Bones toggle is active |
strength | number | Bone influence strength radius (0 for control/pin/IK target bones) |
tags | number | Moho bone color tag index (0..11) |
targetBone | number | IK target bone index (-1 to clear) |
targetBoneName | string | IK target bone name ('' to clear) |
bone_setConstraints
Configure bone angle limits, angle/pos/scale delayed control constraints (single bone or chainBoneIds/Names), squash&stretch, maxIKStretching, and arcSolver.
| Parameter | Type | Description |
|---|---|---|
angleControlDelay | number | Angle control frame delay |
angleControlParent | number | Driver bone ID for angle control constraint (-1 to clear) |
angleControlParentName | string | Driver bone name for angle control constraint |
angleControlScale | number | Angle control multiplier |
arcSolver | boolean | Enable Moho Arc IK solver |
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
chainBoneIds | array | Apply delayed follow-through constraints across a bone chain by ID |
chainBoneNames | array | Apply delayed follow-through constraints across a bone chain by name |
chainDelay | number | Per-link frame delay applied across chain bones |
chainMode | string | Channels linked in chain mode (default: 'angle') |
chainScale | number | Control scale applied across chain bones |
controlParentId | number | Optional shared control parent ID for chain mode (defaults to each bone's parent) |
controlParentName | string | Optional shared control parent name for chain mode |
enabled | boolean | Enable or disable angle rotation limits |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
maxAutoScaling | number | Alias for maxIKStretching |
maxDeg | number | Maximum angle limit in degrees (relative to rest angle) |
maxIKStretching | number | Maximum IK bone auto-stretching factor (fMaxAutoScaling) |
minDeg | number | Minimum angle limit in degrees (relative to rest angle) |
posControlDelay | number | Position control frame delay |
posControlParent | number | Driver bone ID for position control constraint (-1 to clear) |
posControlParentName | string | Driver bone name for position control constraint |
posControlScale | Position control scale {x, y} or uniform number | |
scaleControlDelay | number | Scale control frame delay |
scaleControlParent | number | Driver bone ID for scale control constraint (-1 to clear) |
scaleControlParentName | string | Driver bone name for scale control constraint |
scaleControlScale | number | Scale control multiplier |
squashStretch | boolean | Enable Squash & Stretch scaling (fScalingMode=2) |
squashStretchScaling | number | Squash & stretch scaling factor |
bone_setDynamics
Configure Moho Pro 14 Bone Dynamics physics (enabled, angle/pos/scale/wind flags, torque, spring, damping, 3-axis weights, plus optional global enableBoneDynamics).
| Parameter | Type | Description |
|---|---|---|
angle | boolean | Enable rotational bone dynamics (fAngleDynamics) |
angleWeight | number | Angle dynamics mass weight |
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
damping | number | Angle dynamics damping force |
enableBoneDynamics | boolean | Toggle global MOHO.MohoGlobals.EnableBoneDynamics |
enabled | boolean | Enable/disable dynamics on this bone (fBoneDynamics) |
frame | number | Frame to keyframe `enabled` (default: 0) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
pos | boolean | Enable translational bone dynamics (fPosDynamics) |
posDamping | number | Position dynamics damping force |
posSpring | number | Position dynamics spring force |
posTorque | number | Position dynamics torque force |
posWeight | number | Position dynamics mass weight |
scale | boolean | Enable squash/scale bone dynamics (fScaleDynamics) |
scaleDamping | number | Scale dynamics damping force |
scaleSpring | number | Scale dynamics spring force |
scaleTorque | number | Scale dynamics torque force |
scaleWeight | number | Scale dynamics mass weight |
spring | number | Angle dynamics spring force |
torque | number | Angle dynamics torque force |
wind | boolean | Allow BoneLayer wind field to push this bone (fWindDynamics) |
bone_mirror
Duplicate and mirror a bone or bone subtree across an X/Y axis preserving hierarchy, constraints, dynamics, offsets, and remapped IK targets.
| Parameter | Type | Description |
|---|---|---|
axis | string | Mirror axis (default: 'x') |
axisValue | number | Axis coordinate to mirror across (default: 0) |
boneId | number | Zero-based bone index inside the BoneLayer |
boneIds | array | Explicit list of bone IDs to mirror |
boneName | string | Exact bone name |
boneNames | array | Explicit list of bone names to mirror |
findSubstring | string | Explicit substring to replace in mirrored bone names |
includeChildren | boolean | Include descendant bones recursively (default: true) |
keepExternalTargets | boolean | Preserve IK targets pointing outside the mirrored subtree (default: false) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
mirrorConstraints | boolean | Copy and mirror angle limits & control constraints (default: true) |
mirrorParent | boolean | Keep parent link to root's parent when outside mirrored subtree (default: true) |
mirrorTargets | boolean | Remap IK target bones within mirrored subtree (default: true) |
replaceSubstring | string | Replacement substring for findSubstring (e.g. 'R' for 'L') |
bone_freezePose
Freeze Pose (Ctrl+F) or Reset Pose at `frame` across all, selected, non-shy, or listed bones with optional keyframe interpolation.
| Parameter | Type | Description |
|---|---|---|
additiveCycle | boolean | Enable additive cycle accumulation |
allowFrame0 | boolean | Allow freeze at frame 0 (default: false) |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
boneIds | array | Optional explicit bone IDs to freeze or reset |
boneNames | array | Optional explicit bone names to freeze or reset |
channels | array | Channels to freeze/reset (default: ['angle', 'pos', 'scale']) |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
deleteKeys | boolean | In reset mode at frame > 0, delete keyframes instead of keying frame-0 values |
frame | number | Target frame to freeze or reset (default: current frame) |
hold | number | Frames to hold prior value before interpolating |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
mode | string | Default: 'freeze' |
scope | string | Target bone scope when boneIds/Names omitted (default: 'all') |
stagger | boolean | Enable Moho Stagger step interpolation flag |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
bone_listGroups
List all Moho 14 Vitruvian Bone groups (M_BoneGroup) on a BoneLayer and their active bones.
| Parameter | Type | Description |
|---|---|---|
frame | number | Frame at which to read active Vitruvian bone (default: current frame) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
bone_manageGroup
Create, switch active sub-rig bone, add/remove bones, or delete Moho 14 Vitruvian Bone groups.
| Parameter | Type | Description |
|---|---|---|
operation * | string | Vitruvian Bone group operation |
activeLocalIndex | number | Zero-based index inside the group (for set_active) |
boneId | number | Bone ID to activate inside group (for set_active) |
boneIds | array | Bone indices to group, add, or remove |
boneName | string | Bone name to activate inside group (for set_active) |
enabled | boolean | Enable or disable Vitruvian group hiding |
frame | number | Frame to keyframe active Vitruvian bone (for set_active) |
groupIndex | number | Zero-based Vitruvian group index |
groupName | string | Vitruvian group name (new name for create, lookup for other ops) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
bone_setWind
Configure Moho Pro 14 Wind and Gravity dynamics fields on a BoneLayer (supports UI percentage units via *Percent or raw internal units, plus keyframe interpolation).
| Parameter | Type | Description |
|---|---|---|
additiveCycle | boolean | Enable additive cycle accumulation |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
frame | number | Target frame for wind/gravity keyframes (default: current frame) |
gravityDirectionDeg | number | Gravity direction angle in degrees (default downward: 270) |
gravityStrength | number | Raw internal gravity strength (prefer gravityStrengthPercent: 100 = 1G -> raw 10) |
gravityStrengthPercent | number | Gravity strength on Moho UI percentage scale (100 = 1G -> raw 10) |
hold | number | Frames to hold prior value before interpolating |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
stagger | boolean | Enable Moho Stagger step interpolation flag |
turbulentAmplitude | number | Raw internal turbulent amplitude (prefer turbulentAmplitudePercent) |
turbulentAmplitudePercent | number | Turbulent amplitude on Moho UI 0..100 scale (converted via pct / 100 * 2) |
turbulentFrequency | number | Raw internal turbulent frequency (prefer turbulentFrequencyPercent) |
turbulentFrequencyPercent | number | Turbulent frequency on Moho UI 0..100 scale (converted via pct / 100 * 10) |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
windDirectionDeg | number | Wind direction angle in degrees |
windStrength | number | Raw internal wind strength (prefer windStrengthPercent: 0..100 -> raw * 5) |
windStrengthPercent | number | Wind strength on Moho UI 0..100 scale (converted via pct / 100 * 500) |
physics_configure
Inspect or configure Moho Pro 14 2D Physics on a Group/Bone layer (`groupEnabled`, `gravity`, `useBakedPhysics`, `bake`) and/or per-layer rigid-body `MohoPhysicsOptions` (read-only when no mutating fields are passed; returns full state including `pivotOnOrigin`, `respawnInterval`, and `lifetime`).
| Parameter | Type | Description |
|---|---|---|
bake | boolean | Step startFrame..endFrame to evaluate physics and lock UseBakedPhysics(true) |
density | number | Rigid body mass density |
enableMotor | boolean | Enable rotational motor on pivoted body |
enabled | boolean | Per-layer physics participation |
endFrame | number | Last frame to evaluate when bake=true |
forceObject | boolean | Treat layer as a directional force field emitter |
forceVector | object | Animated force field vector {x, y} (fForceVector) |
frame | number | Target frame for animated physics tracks (default: 0) |
friction | number | Surface sliding friction coefficient |
gravity | object | Group gravity vector {x, y} |
groupEnabled | boolean | Enable/disable 2D physics simulation on Group/Bone layer |
initialVelocity | object | Initial launch velocity vector {x, y} |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
lifetime | number | Alias for respawnInterval (MohoPhysicsOptions.fRespawnInterval) |
motorSpeed | number | Animated motor angular speed (fMotorSpeed) |
motorTorque | number | Maximum motor torque |
pivotOnOrigin | boolean | Pin rigid body rotation around layer origin |
respawnInterval | number | MohoPhysicsOptions.fRespawnInterval in frames (0 = no respawn) |
restitution | number | Bounce / elasticity restitution (0..1) |
sleeping | boolean | Start rigid body asleep until collided with |
startFrame | number | First frame to evaluate when bake=true |
staticBody | boolean | Mark layer as immovable static collider (non-moving object) |
useBakedPhysics | boolean | Toggle UseBakedPhysics on the physics GroupLayer |
animation_getKeyframes
Read all keyframes, interpolation, Bezier handles, color tags, and Separate Dimensions from layer, bone, wind/gravity, Vitruvian, switch, vector point/shape, layer order, follow-path, or camera channels.
| Parameter | Type | Description |
|---|---|---|
channel * | string | Target Moho animation channel name (supports *_x/*_y/*_z Separate Dimensions shortcuts) |
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
curveIndex | number | Curve index on point for point_curvature (default: 0) |
dimension | string | Separate Dimension axis for vector channels (x, y, z) |
groupIndex | number | Vitruvian group index for vitruvian_active_bone |
groupName | string | Vitruvian group name for vitruvian_active_bone |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
pointId | number | Zero-based point index for point_pos/point_width/point_curvature |
shapeId | number | Zero-based shape index for shape_* / combo_blend channels |
shapeName | string | Shape name for shape_* / combo_blend channels |
splitDimensions | boolean | Split vector channel dimensions automatically if not already split |
animation_setKeyframes
Batch-write multiple keyframes with Smooth/Linear/Ease/Step/Bezier (with handles)/Cycle/Bounce/Elastic/Stagger/Hold/ColorTag interpolation onto any supported Moho 14.4 animation channel (including Separate Dimensions).
| Parameter | Type | Description |
|---|---|---|
channel * | string | Target Moho animation channel name (supports *_x/*_y/*_z Separate Dimensions shortcuts) |
keyframes * | array | Array of { frame, value, ...interp } keyframes to write onto the channel |
additiveCycle | boolean | Enable additive cycle accumulation |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
curveIndex | number | Curve index on point for point_curvature (default: 0) |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
dimension | string | Separate Dimension axis for vector channels (x, y, z) |
groupIndex | number | Vitruvian group index for vitruvian_active_bone |
groupName | string | Vitruvian group name for vitruvian_active_bone |
hold | number | Frames to hold prior value before interpolating |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
pointId | number | Zero-based point index for point_pos/point_width/point_curvature |
shapeId | number | Zero-based shape index for shape_* / combo_blend channels |
shapeName | string | Shape name for shape_* / combo_blend channels |
splitDimensions | boolean | Split vector channel dimensions automatically if not already split |
stagger | boolean | Enable Moho Stagger step interpolation flag |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
animation_deleteKeyframe
Delete a single keyframe (frame > 0) from any supported Moho 14.4 animation channel.
| Parameter | Type | Description |
|---|---|---|
channel * | string | Target Moho animation channel name (supports *_x/*_y/*_z Separate Dimensions shortcuts) |
frame * | number | Keyframe number to delete (must be > 0) |
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
curveIndex | number | Curve index on point for point_curvature (default: 0) |
dimension | string | Separate Dimension axis for vector channels (x, y, z) |
groupIndex | number | Vitruvian group index for vitruvian_active_bone |
groupName | string | Vitruvian group name for vitruvian_active_bone |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
pointId | number | Zero-based point index for point_pos/point_width/point_curvature |
shapeId | number | Zero-based shape index for shape_* / combo_blend channels |
shapeName | string | Shape name for shape_* / combo_blend channels |
splitDimensions | boolean | Split vector channel dimensions automatically if not already split |
animation_createCycle
Build a seamless multi-channel animation cycle across [startFrame, endFrame]: ensures boundary keys at start/end, copies startFrame to endFrame when needed, and sets Cycle interpolation targeting startFrame + 1 (Frame 2 when starting at Frame 1) to avoid the double-frame stutter.
| Parameter | Type | Description |
|---|---|---|
endFrame * | number | Cycle end frame where Cycle interpolation is applied |
additiveCycle | boolean | Accumulate cycle offsets across repetitions (additive cycle) |
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
channel | string | Target Moho animation channel name (supports *_x/*_y/*_z Separate Dimensions shortcuts) |
channels | array | Optional list of channel names or channel selector objects to cycle together |
colorTag | number | Keyframe color tag index on the cycle keyframe |
copyStartToEnd | boolean | Copy startFrame value to endFrame if endFrame has no key (default: true) |
curveIndex | number | Curve index on point for point_curvature (default: 0) |
cycleMode | string | Default: 'relative' |
cycleTargetFrame | number | Loop target frame (default: startFrame + 1) |
dimension | string | Separate Dimension axis for vector channels (x, y, z) |
ensureStartKey | boolean | Key startFrame if no key exists yet (default: true) |
forceCopyStartToEnd | boolean | Always overwrite endFrame value with startFrame value (default: false) |
groupIndex | number | Vitruvian group index for vitruvian_active_bone |
groupName | string | Vitruvian group name for vitruvian_active_bone |
interpolationAtStart | string | Optional interpolation mode for startFrame (e.g. 'linear') |
interval | number | Step interval in frames for the cycle keyframe (1=ones, 2=twos) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
pointId | number | Zero-based point index for point_pos/point_width/point_curvature |
shapeId | number | Zero-based shape index for shape_* / combo_blend channels |
shapeName | string | Shape name for shape_* / combo_blend channels |
splitDimensions | boolean | Split vector channel dimensions automatically if not already split |
startFrame | number | Cycle start frame (default: 1) |
targets | array | Optional explicit list of { layerName/Id, channel, boneName/Id, dimension, ... } targets |
animation_retime
Scoped keyframe retiming across explicit targets/channels (never accidentally shifts untouched scene layers): push_frames, scale_range (Alt+Drag), relative_offset, and clear_range (always protects frame 0).
| Parameter | Type | Description |
|---|---|---|
operation * | string | Retiming operation to apply across selected channels |
anchorFrame | number | Anchor frame for scale_range (default: startFrame) |
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
channel | string | Target Moho animation channel name (supports *_x/*_y/*_z Separate Dimensions shortcuts) |
channels | array | Optional list of channel names on the selected layer/bone to retime together |
curveIndex | number | Curve index on point for point_curvature (default: 0) |
delta | number | Frame shift delta for push_frames |
dimension | string | Separate Dimension axis for vector channels (x, y, z) |
endFrame | number | Range end frame |
factor | number | Scale multiplier for scale_range (e.g. 1.5 slows down, 0.5 speeds up) |
fromFrame | number | Start frame for push_frames (>= 1) |
groupIndex | number | Vitruvian group index for vitruvian_active_bone |
groupName | string | Vitruvian group name for vitruvian_active_bone |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
newEndFrame | number | Alternative destination end frame for scale_range |
newStartFrame | number | Alternative destination start frame for scale_range |
pointId | number | Zero-based point index for point_pos/point_width/point_curvature |
shapeId | number | Zero-based shape index for shape_* / combo_blend channels |
shapeName | string | Shape name for shape_* / combo_blend channels |
splitDimensions | boolean | Split vector channel dimensions automatically if not already split |
startFrame | number | Range start frame (>= 1) |
targets | array | Explicit list of channel targets to retime |
toFrame | number | Optional inclusive end frame for push_frames |
valueOffset | Numeric or vector/color delta added to every key in range for relative_offset |
animation_tween
Generate a weighted breakdown (0..1), anticipation (weight < 0), or overshoot (weight > 1) keyframe at `frame` interpolated between surrounding keyframes across one or more channels.
| Parameter | Type | Description |
|---|---|---|
frame * | number | Target breakdown frame (>= 1) |
additiveCycle | boolean | Enable additive cycle accumulation |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
channel | string | Target Moho animation channel name (supports *_x/*_y/*_z Separate Dimensions shortcuts) |
channels | array | Optional list of channel names on the selected layer/bone to tween together |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
curveIndex | number | Curve index on point for point_curvature (default: 0) |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
dimension | string | Separate Dimension axis for vector channels (x, y, z) |
groupIndex | number | Vitruvian group index for vitruvian_active_bone |
groupName | string | Vitruvian group name for vitruvian_active_bone |
hold | number | Frames to hold prior value before interpolating |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
nextFrame | number | Optional explicit next keyframe override |
pointId | number | Zero-based point index for point_pos/point_width/point_curvature |
prevFrame | number | Optional explicit previous keyframe override |
shapeId | number | Zero-based shape index for shape_* / combo_blend channels |
shapeName | string | Shape name for shape_* / combo_blend channels |
splitDimensions | boolean | Split vector channel dimensions automatically if not already split |
stagger | boolean | Enable Moho Stagger step interpolation flag |
targets | array | Optional explicit list of channel targets to tween together |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
weight | number | Interpolation weight: 0.5 midpoint, < 0 anticipation, > 1 overshoot (default: 0.5) |
timeline_markers
List, add, update, delete, or clear document-wide (`MohoDoc.fTimelineMarkers`) or layer-specific (`MohoLayer.fTimelineMarkers`) timeline markers with color tags.
| Parameter | Type | Description |
|---|---|---|
operation * | string | Timeline marker operation |
colorTag | number | Marker color tag index (InterpSetting.tags) |
frame | number | Target frame for add, update, or delete |
label | string | Marker text label |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
scope | string | Marker scope (defaults to 'layer' if layer selector passed, else 'document') |
text | string | Alias for label |
action_list
List Regular and Smart Bone Actions on a layer (including isSmartBone, angleSweepDeg, and is360SmartBone flags) and report the active layer/document action.
| Parameter | Type | Description |
|---|---|---|
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
action_activate
Enter or create an Action / Smart Bone Action on a layer (synced with SetCurrentDocAction; pass '' to return to Mainline).
| Parameter | Type | Description |
|---|---|---|
actionName * | string | Action/Bone name, or '' to return to Mainline |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
action_createSmartBone
Create a standard or full +/-360-degree Smart Bone Action (exact unwrapped zeroAngle +/- 2*pi, 96-frame default duration, linear bone keys, optional Frame-0-to-end mirroring across child layers).
| Parameter | Type | Description |
|---|---|---|
actionName | string | Optional explicit action name (defaults to boneName or 'boneName 2' when direction='second') |
addMidpointKey | boolean | In 360 mode, also place a midpoint +/-180 deg linear key |
boneId | number | Zero-based bone index inside the BoneLayer |
boneName | string | Exact bone name |
clockwise | boolean | In 360 mode, sweep -360 deg instead of +360 deg when deltaAngleDeg omitted |
deltaAngleDeg | number | Relative angle delta in degrees from Frame 0 angle (default: +90 for standard, +/-360 for 360 mode) |
direction | string | 'second' creates the '<BoneName> 2' reverse action |
duration | number | Action length in frames (default: 96) |
endFrame | number | End frame (defaults to duration) |
interpolation | string | Driving bone interpolation (default: 'linear') |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
leaveActive | boolean | Keep the newly created Smart Bone Action active for immediate pose editing (default: false -> returns to Mainline) |
mirrorFrame0ToEnd | boolean | Copy Frame 0 transforms and vector point positions to endFrame (and startFrame) for seamless 360 turnarounds |
mirrorFrame0ToStart | boolean | Also mirror Frame 0 to startFrame when mirrorFrame0ToEnd=true (default: true) |
mirrorLayers | array | Optional specific layer names/IDs to mirror (defaults to all child layers under the BoneLayer) |
mode | string | Default: 'standard'; '360' enforces exact unwrapped +/-360 deg sweep |
startFrame | number | Start frame (default: 1) |
targetAngleDeg | number | Absolute target angle in degrees (standard mode only) |
action_manage
Insert (copy or reference), rename, delete, or blend Actions on a layer.
| Parameter | Type | Description |
|---|---|---|
operation * | string | Action management operation |
actionFrames | array | For blend: optional per-action source frame |
actionName | string | Target action name (for insert, rename, delete) |
actionNames | array | For blend: action names to blend |
blendMode | number | For blend: Moho 6-arg BlendActions mode code |
byReference | boolean | For insert: true inserts reference, false copies keyframes (default: false) |
frame | number | Target frame for insert or blend (default: current frame) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
newName | string | New action name (required for rename) |
relative | boolean | For blend: add blended pose relative to current pose |
weights | array | For blend: 0..1 blend weight per action |
camera_get
Read camera track, zoom, rollDeg, and panTiltDeg at a given frame.
| Parameter | Type | Description |
|---|---|---|
frame | number | Frame at which to sample camera state (default: current frame) |
camera_setKeyframe
Set camera track, zoom, rollDeg, and/or panTiltDeg keyframes with optional interpolation.
| Parameter | Type | Description |
|---|---|---|
additiveCycle | boolean | Enable additive cycle accumulation |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
frame | number | Target frame for camera keyframes (default: current frame) |
hold | number | Frames to hold prior value before interpolating |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
panTiltDeg | object | Camera pan/tilt angles in degrees {x, y} |
rollDeg | number | Camera roll angle in degrees |
stagger | boolean | Enable Moho Stagger step interpolation flag |
track | object | Camera position {x, y, z} |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
zoom | number | Camera zoom angle in degrees (default: 60) |
mesh_getData
Inspect points (with width, opacity, colorDrift, curvature, Point Colors, worldPos, handles), curves (with segment visibility and stroke exposure), shapes (Soft Edge, Gradients, Styles, Brushes, Liquid Shape clusters), and warp/curver flags.
| Parameter | Type | Description |
|---|---|---|
frame | number | Frame at which to read point/shape state (default: current frame) |
includeHandles | boolean | Include incoming/outgoing Bezier handle vectors on vertices |
includePointColors | boolean | Include Moho Point Color entries on vertices |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
maxPoints | number | Maximum number of mesh points to serialize (default: 500) |
mesh_createShape
Create a vector shape from new `points`, an `oval`/`rect` `primitive`, or existing `pointIds` (with optional `holes`, Soft Edge, Gradients, Saved Styles, and Brushes).
mesh_editShape
Edit, keyframe, restyle, copy style, reorder stacking, or delete an existing vector shape on a VectorLayer (fill/stroke color & alpha, Soft Edge, Gradients + handles, Saved Style 1/2, Brushes).
mesh_editPoints
Move/animate mesh points, adjust per-point width/opacity/colorDrift, curvature, Point Colors, asymmetric Bezier handles, or point bone bindings.
| Parameter | Type | Description |
|---|---|---|
edits * | array | Per-point edit entries |
additiveCycle | boolean | Enable additive cycle accumulation |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
frame | number | Target frame for keyframed point edits (default: current frame) |
hold | number | Frames to hold prior value before interpolating |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
stagger | boolean | Enable Moho Stagger step interpolation flag |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
mesh_editTopology
Edit vector topology and curve visibility on a VectorLayer. Choose one `operation`: `split_segments` (subdivide curves), `insert_point` (add vertex on segment), `weld_points` (merge vertices), `connect_and_create` (bridge points/shape), `hide_edge` (toggle segment stroke visibility), `delete_points`, `mirror_points` (flip/duplicate across X/Y axis), `merge_shapes` (boolean weld shapes), `triangulate` (convert to Smart Warp mesh), or `stroke_exposure` (animate draw-on/draw-off startPercent..endPercent).
mesh_createSmartWarp
Create a live Moho 14 Smart Warp (`mode='warp'`), Quad Smart Warp (`mode='quad'`), or Curver (`mode='curver'`, with multi-curve `appendToLayerId`, `curverWidth`, guarded `compressible`, and auto bone-binding inheritance).
| Parameter | Type | Description |
|---|---|---|
appendToLayerId | number | Append another curve onto an existing Curver layer ID (Dual/Multi-Curver) |
appendToLayerName | string | Append another curve onto an existing Curver layer by name |
autoBindToTargetBone | boolean | Inherit target layer rigid/flexi bone binding automatically (default: true) |
bindToTarget | boolean | Automatically assign as target layer's WarpLayer (default: true) |
cols | number | Grid columns or Curver points when auto-generating geometry |
compressible | boolean | Enable Compressible Curver if exposed by active Moho version |
continuousTriangulation | boolean | Enable Moho 14 live Continuous Triangulation (default: true for warp, false for quad) |
curverWidth | number | Initial pt.fWidth envelope radius on Curver points |
cx | number | Explicit mesh center X (defaults to target layer bounds center) |
cy | number | Explicit mesh center Y (defaults to target layer bounds center) |
height | number | Explicit mesh height (defaults to target layer bounds height + margin) |
margin | number | Outer padding around target bounds (default: 0.04) |
mode | string | Deformer mode (default: 'warp') |
name | string | Name for the newly created warp/curver VectorLayer |
points | array | Optional custom {x, y, width?} points in local layer coordinates |
rows | number | Grid rows for warp/quad |
targetLayerId | number | Target Vector/Image/Group layer ID to deform |
targetLayerName | string | Target Vector/Image/Group layer name to deform |
width | number | Explicit mesh width (defaults to target layer bounds width + margin) |
mesh_setCurveProfile
Attach, configure repeat/animated offset, or detach a Curve Profile on a VectorLayer curve (lm_curve_profile.lua).
| Parameter | Type | Description |
|---|---|---|
additiveCycle | boolean | Enable additive cycle accumulation |
bezierInAngle | number | Bezier incoming tangent angle (radians, InterpSetting:SetBezierInAngle) |
bezierInPercent | number | Bezier incoming handle percentage (InterpSetting:SetBezierInPercentage) |
bezierOutAngle | number | Bezier outgoing tangent angle (radians, InterpSetting:SetBezierOutAngle) |
bezierOutPercent | number | Bezier outgoing handle percentage (InterpSetting:SetBezierOutPercentage) |
clear | boolean | Remove Curve Profile from target curve |
colorTag | number | Keyframe color tag index (InterpSetting.tags) |
curveId | number | Zero-based target curve index (default: 0) |
cycleBack | number | Relative frame delta for Cycle interpolation (default: frame - 2, loops back to Frame 2) |
cycleMode | string | Cycle targeting mode: 'relative' (val1 delta, val2=-1) or 'absolute' (val2 frame) |
cycleTargetFrame | number | Target loop frame when using Cycle interpolation |
detach | boolean | Alias for clear: remove Curve Profile from target curve |
frame | number | Frame for animated profileOffset keyframe (default: current frame) |
hold | number | Frames to hold prior value before interpolating |
interpolation | string | Keyframe interpolation mode (e.g. smooth, linear, ease, step, bezier, cycle) |
interval | number | Step interval in frames (1 = ones, 2 = twos, 3 = threes) |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
profileCurveId | number | Zero-based curve index inside the profile layer (default: 0) |
profileLayerId | number | VectorLayer ID containing the profile curve |
profileLayerName | string | VectorLayer name containing the profile curve |
profileOffset | number | Animated profile offset along curve |
profileRepeat | number | Integer repeat count >= 1 |
stagger | boolean | Enable Moho Stagger step interpolation flag |
val1 | number | InterpSetting.val1 (relative cycle delta or noisy/bounce/elastic param) |
val2 | number | InterpSetting.val2 (absolute cycle target frame when >= 0, -1 for relative) |
mesh_liquidShapes
Author Moho 14 Liquid Shapes boolean clusters on a VectorLayer: `set_combo` sets fComboMode/fComboBlend on a shape, `combine` merges two shapes into a Liquid cluster, and `bake` converts a Liquid cluster into one editable vector shape.
| Parameter | Type | Description |
|---|---|---|
operation * | string | Liquid Shapes operation to execute |
baseShapeId | number | For combine: base shape index |
baseShapeName | string | For combine: base shape name |
blend | number | Liquid Shapes metaball blend radius (0.0 .. 1.0) |
comboMode | string | Boolean combination mode ('clip' aliases 'intersect') |
flag | boolean | Optional Moho CombineShapes/BakeCombinedShapes internal flag |
frame | number | Frame for animated blend radius (default: 0) |
keepOriginals | boolean | For combine/bake: keep source shapes intact |
layerId | number | Numeric depth-first layer ID (from layer_list) |
layerName | string | Exact layer name |
layerUuid | string | Layer UUID |
otherShapeId | number | For combine: second shape index merged with base |
otherShapeName | string | For combine: second shape name |
placeAboveShapeId | number | Optional shape stacking placement above target ID |
placeBehindShapeId | number | Optional shape stacking placement behind target ID |
shapeId | number | Target shape index (for set_combo or bake) |
shapeName | string | Target shape name (alternative to shapeId) |
style_manage
Manage document-wide Saved Styles and Moho 14 Brushes: `list` (inspect styles), `create` (new Saved Style), `update` (modify style properties/name), `delete` (remove one style), `delete_unused` (purge unreferenced styles), `list_brushes` (enumerate installed brush presets), and `new_from_shape` (extract a Saved Style from an existing shape and optionally bind matching shapes).
batch_execute
Execute up to 100 Moho Studio MCP operations atomically inside one IPC round-trip, one Undo step, and one coalesced UI refresh.
| Parameter | Type | Description |
|---|---|---|
operations * | array | Ordered list of { method, params } RPC calls to execute |
stopOnError | boolean | Abort remaining ops on first failure (default: true) |