Skip to content

Reference

Updated

Scripting reference

Every command a script or MCP can run, with its arguments. A script also runs one as lumit.command("layer.add", { ... }).

A time is a frame on the comp’s rate, or exact seconds as { "num": 1001, "den": 24000 }.

Where the project is saved, how much it holds, and whether undo and redo have anything to do.

Script: lumit.project.info(). MCP tool: project_info.

No arguments.

Save the project, where it was last saved or to a new path.

Script: lumit.project.save({ ... }). MCP tool: project_save.

ArgumentTypeRequiredMeaning
pathstring

Undo the last step.

MCP tool: undo. A script cannot run it.

No arguments.

Redo the last undone step.

MCP tool: redo. A script cannot run it.

No arguments.

Every comp in the project, with its settings.

Script: lumit.comp.list(). MCP tool: comp_list.

No arguments.

One comp’s settings and its layers.

Script: lumit.comp.get({ ... }). MCP tool: comp_get.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name

Make a comp, 1920x1080 at 60 fps for 30 seconds unless told otherwise.

Script: lumit.comp.new({ ... }). MCP tool: comp_new.

ArgumentTypeRequiredMeaning
namestring
widthinteger (16 to 16384)
heightinteger (16 to 16384)
frame_rateinteger (1 to 999) or {num, den}1 to 999 frames a second
durationinteger or {num, den}At most 3 hours
backgroundlist of 4 numbersScene-linear RGBA
folderstring or nullThe folder to file it in, by id or name, or null for the top of the panel. Left out, it goes in the Compositions folder

Change a comp’s name, size, frame rate, duration or background.

Script: lumit.comp.set({ ... }). MCP tool: comp_set.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
namestring
widthinteger (16 to 16384)
heightinteger (16 to 16384)
frame_rateinteger (1 to 999) or {num, den}1 to 999 frames a second
durationinteger or {num, den}At most 3 hours
backgroundlist of 4 numbersScene-linear RGBA

Move layers into a new comp, and put that comp in their place as one layer.

Script: lumit.comp.precompose({ ... }). MCP tool: comp_precompose.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerslist of stringsyesThe layers’ ids, or their names in the comp
namestringThe new comp’s name. Pre-comp and a number if left out
leave_attributesbooleanFor one layer: leave its transform, effects and masks on the new layer, and move only its source

Show a comp in the Viewer.

Script: lumit.comp.open({ ... }). MCP tool: comp_open.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name

The comp open in the Viewer, if there is one.

Script: lumit.comp.active(). MCP tool: comp_active.

No arguments.

Render a frame of a comp to a PNG, and answer its path, width and height.

Script: lumit.comp.frame({ ... }). MCP tool: comp_frame.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
timeinteger or {num, den}The frame, 0 when left out
scalenumber (over 0, at most 1)Of the comp’s size, 1 when left out
outstringThe .png file to write. Without it, a numbered file beside the project

Every item in the project panel: comps, footage, folders and solids, with the folder each is in, and the size, rate and length of footage and solids.

Script: lumit.item.list(). MCP tool: item_list.

No arguments.

Rename an item, file it in a folder, set the rate a footage item plays at, or set its comment.

Script: lumit.item.set({ ... }). MCP tool: item_set.

ArgumentTypeRequiredMeaning
itemstringyesThe item’s id or name
namestring
folderstring or nullThe folder’s id or name, or null for none
frame_rateinteger (1 to 999) or {num, den} or null1 to 999 frames a second, or a video’s own rate
commentstringEmpty for none

Make a folder in the project panel.

Script: lumit.folder.new({ ... }). MCP tool: folder_new.

ArgumentTypeRequiredMeaning
namestring
parentstringThe folder to make it in, by id or name

Add a null, camera, solid, footage or precomp layer to a comp.

Script: lumit.layer.add({ ... }). MCP tool: layer_add.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
kind"null", "camera", "solid", "footage", "precomp"yes
itemstringFor footage: the footage item’s id or name. For a precomp: the comp’s
namestring
indexinteger (at least 0)Where in the stack, 0 is the top
colourlist of 3 numbers (0 to 1)For a solid: its colour as a colour picker shows it, 0 to 1. White if left out
widthinteger (1 to 16384)For a solid, the comp’s if left out
heightinteger (1 to 16384)

Add a shape layer drawn from paths, each item in the form a .lum file keeps it: path, fill, stroke, stroke_width, opacity, gradient and the rest.

Script: lumit.shape.add({ ... }). MCP tool: shape_add.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
namestring
indexinteger (at least 0)Where in the stack, 0 is the top
itemslist of objectyesThe shape items as a .lum file keeps them. Each path is {vertices:[{pos:[x,y],tan_in:[x,y],tan_out:[x,y]}],closed}, in comp pixels with tangents relative to their vertex. Colours are linear-light RGBA. An id and a name are made for any item without one

Set how a layer meets the layers below: its blend mode, and a track matte from another layer of its comp.

Script: lumit.layer.composite({ ... }). MCP tool: layer_composite.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerstringyesThe layer’s id, or its name in the comp
blendstringA blend mode as a .lum file names it: Normal, Add, Screen, Multiply, Overlay, SoftLight and the rest
mattestring or nullThe matte layer’s id or name, or null for none
lumabooleanMatte by brightness rather than alpha
invertedboolean

One layer: its span, parent, switches and transform.

Script: lumit.layer.get({ ... }). MCP tool: layer_get.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerstringyesThe layer’s id, or its name in the comp

Change a layer’s name, parent, span, switches, 3D switch, rotation order or place in the stack.

Script: lumit.layer.set({ ... }). MCP tool: layer_set.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerstringyesThe layer’s id, or its name in the comp
namestring
parentstring or nullThe parent’s id or name, or null for none. The layer stays where it is at the comp’s start
jumpbooleanWith parent: leave the transform as it is, so the layer moves with its new parent
ininteger or {num, den}A frame on the comp’s rate, or exact seconds
outinteger or {num, den}A frame on the comp’s rate, or exact seconds
start_offsetinteger or {num, den}A frame on the comp’s rate, or exact seconds
three_dboolean
indexinteger (at least 0)Where in the stack, 0 is the top
two_nodebooleanFor a camera, whether it aims at its point of interest
after_effects_orderbooleanTurn X, Y and Z Rotation in After Effects’ order rather than Lumit’s. The rotations are rewritten so the layer keeps its pose
switchesobject
switches.visibleboolean
switches.audibleboolean
switches.soloboolean
switches.lockedboolean
switches.shyboolean
switches.guideboolean
switches.motion_blurboolean
switches.fxboolean
switches.accepts_lightsboolean

Delete a layer.

Script: lumit.layer.delete({ ... }). MCP tool: layer_delete.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerstringyesThe layer’s id, or its name in the comp

Set one transform or camera property’s whole animation: a value, a list of keys, or an expression.

Rotation turns about Z.

Script: lumit.layer.keys({ ... }). MCP tool: layer_keys.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerstringyesThe layer’s id, or its name in the comp
property"rotation", "rotation_x", "rotation_y", "opacity", "zoom", "focus_distance", "aperture", "anchor", "scale", "position", "point_of_interest", "orientation"yes
valuenumber or list of 2 numbers or list of 2 to 3 numbers or list of 3 numbersZ is left as it is when there are two; X, Y and Z, in After Effects’ order
keyslist
keys[].timeinteger or {num, den}yesA frame on the comp’s rate, or exact seconds
keys[].valuenumber or list of 2 numbers or list of 2 to 3 numbers or list of 3 numbersyesZ is left as it is when there are two; X, Y and Z, in After Effects’ order
keys[].interp"linear", "hold"
keys[].in"linear", "hold", "auto", "clamped" or {speed, influence} or list of {speed, influence}Linear, hold, auto or clamped, or an ease, or a list with an ease for each value
keys[].in.speednumberUnits a second
keys[].in.influencenumber (0.1 to 100)Per cent of the span
keys[].out"linear", "hold", "auto", "clamped" or {speed, influence} or list of {speed, influence}Linear, hold, auto or clamped, or an ease, or a list with an ease for each value
keys[].out.speednumberUnits a second
keys[].out.influencenumber (0.1 to 100)Per cent of the span
expressionstringA JavaScript expression, as After Effects writes them

Needs one of value, keys or expression.

Replace a comp’s markers, or a layer’s when a layer is named.

Script: lumit.markers.set({ ... }). MCP tool: markers_set.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerstringThe layer’s id, or its name in the comp
markerslistyes
markers[].idstringAn existing marker’s id, to keep what it was
markers[].timeinteger or {num, den}yesA frame on the comp’s rate, or exact seconds
markers[].labelstring
markers[].colourinteger (0 to 255)
markers[].durationintegerFrames it spans
markers[].chapterbooleanWhether it starts a chapter

The effects on a layer, top first, with their controls.

Script: lumit.effect.list({ ... }). MCP tool: effect_list.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerstringyesThe layer’s id, or its name in the comp

One effect on a layer, with every control it has.

Script: lumit.effect.get({ ... }). MCP tool: effect_get.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerstringyesThe layer’s id, or its name in the comp
effectstring or integer (at least 0)yesThe effect’s id or name, or its place in the stack, 0 the top

Add an effect to the bottom of a layer’s stack, by Lumit’s name for it or After Effects’.

Script: lumit.effect.add({ ... }). MCP tool: effect_add.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerstringyesThe layer’s id, or its name in the comp
effectstringyesLumit’s id or name for the effect, or After Effects’ match name or name, such as ADBE Gaussian Blur 2
namestringThe name it shows

Switch an effect on or off, rename it, or set one of its controls: a value, a list of keys, or an expression.

Script: lumit.effect.set({ ... }). MCP tool: effect_set.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
layerstringyesThe layer’s id, or its name in the comp
effectstring or integer (at least 0)yesThe effect’s id or name, or its place in the stack, 0 the top
enabledboolean
namestring or nullThe name it shows, or null for the effect’s own
paramstringA control’s id or name. After Effects’ match name for one, such as ADBE Gaussian Blur 2-0001, takes After Effects’ values and converts them as importing does
valueanyA number, a list for a point or a colour, true or false for a switch, or an option’s number
keyslist
keys[].timeinteger or {num, den}yesA frame on the comp’s rate, or exact seconds
keys[].valuenumber or list of 1 to 4 numbersyes
keys[].interp"linear", "hold"
keys[].in"linear", "hold", "auto", "clamped" or {speed, influence} or list of {speed, influence}Linear, hold, auto or clamped, or an ease, or a list with an ease for each value
keys[].in.speednumberUnits a second
keys[].in.influencenumber (0.1 to 100)Per cent of the span
keys[].out"linear", "hold", "auto", "clamped" or {speed, influence} or list of {speed, influence}Linear, hold, auto or clamped, or an ease, or a list with an ease for each value
keys[].out.speednumberUnits a second
keys[].out.influencenumber (0.1 to 100)Per cent of the span
expressionstringA JavaScript expression, as After Effects writes them

Import files as footage items.

Script: lumit.footage.import({ ... }). MCP tool: footage_import.

ArgumentTypeRequiredMeaning
pathslist of stringsyes

Start exporting a comp.

Script: lumit.export.start({ ... }). MCP tool: export_start.

ArgumentTypeRequiredMeaning
compstringyesThe comp’s id or name
outstringThe file to write

How an export is going.

Script: lumit.export.status({ ... }). MCP tool: export_status.

ArgumentTypeRequiredMeaning
jobinteger (at least 0)yes

Stop an export.

Script: lumit.export.cancel({ ... }). MCP tool: export_cancel.

ArgumentTypeRequiredMeaning
jobinteger (at least 0)yes