Internal commands
Engine commands scripts can't call, and why.
The engine has 173 commands. These 25 aren't callable from scripts, each for the reason given; every other one is part of the API above.
addReferenceLayer— payload carries a raw ReferenceSource (full-resolution image pixels decoded from an imported file) — not something a script can constructautoSlice— an editor command (Sprite > Auto-slice); scripts find their own regions and call app.addSliceinsertFrame— undo/redo plumbing — payload carries a raw Frame plus a Map<CelKey, Cel> snapshot, not something a script can constructinsertLayer— undo/redo plumbing — payload carries raw Layer objects plus Map<CelKey, Cel>/Map<CelKey, ReferenceTransform> snapshots, not something a script can constructinsertSlice— undo/redo plumbing — restores a removed slice at its original position; scripts use app.addSliceinsertTag— undo/redo plumbing — payload carries a raw Tag snapshot, not something a script can constructinsertTilemapTile— payload carries captured pixel buffers + instance lists for undo — internal plumbing, the inverse of removeTilemapTilepasteCels— payload is a clipboard snapshot produced by extractCels (typed RGBA arrays per cel), not something a script constructs; scripts copy with app.moveCels / app.linkCels or setPixelreplaceDocument— undo/redo plumbing — payload carries a whole Sprite snapshot, not something a script can constructreplaceLayerContent— undo/redo plumbing for convertToTilemap / convertToNormalLayer — payload carries a snapshot of a layer's cels and placementsrestoreCel— undo/redo plumbing — payload carries a raw Cel snapshot (or null), not something a script can constructrestoreCelRegion— undo plumbing — the part of a cel a pixel write replaced, captured by the enginerestoreCels— undo/redo plumbing — payload carries raw Cel snapshots (or deletions), not something a script can constructrestoreDocumentParts— undo/redo plumbing for merges, flatten, background conversion, canvas geometry and palette remaps — payload carries raw layers, cels and placementsrestoreFrameDurations— undo/redo plumbing for setAllFrameDurations — app.setAllFrameDurations / app.setFrameDuration already cover the real scripting use casesrestoreLayerTree— undo/redo plumbing for groupLayers / ungroupLayer — payload is a whole layer order plus raw group Layer objects; scripts use app.groupLayers, app.ungroupLayer and app.moveLayerrestoreMoveState— undo plumbing for movePixels — payload carries an exact Cel + Selection snapshot a script has no business constructingrestorePalette— undo/redo plumbing for colour adjustments on a palette: sets the palette verbatim, without remapping pixels (app.setPalette remaps)restoreTilemapState— undo/redo plumbing for paintTilemapPixels — payload carries captured tile buffers and an instance listsetCelText— the editor draws the text with its own fonts and sends the pixels with it; a script has no fonts, so it draws text as pixels (app.pastePixels)setColorCycles— undo/redo plumbing — restores the colour-cycle list; scripts use app.addColorCycle and friendssetGrid— editor view setting (the Grid Settings dialog) — it positions an overlay and snapping, it does not change the artwork a script producessetGuides— editor view setting (View > Guides) — guides position an overlay and snapping, they do not change the artwork a script producessetPerspective— editor view setting (View > Perspective Grid) — it positions an overlay, it does not change the artwork a script producessetSlices— undo/redo plumbing — restores the slice list autoSlice replaced
As Markdown: internal.md.