Skip to content

split_sprite_sheet

Cut a sprite sheet into its cells as separate image files, in reading order.

A deterministic file operation: no model runs and no Creative Units are spent. Frames keep
their full cell so an animation cycle stays registered; use `inset` to drop thin gutters or
divider lines. With `trim_transparent`, each frame is cropped to its subject instead, and
`cut_off_frames` lists those whose subject reaches its cell's edge. The frames are saved to
the workspace library and, when the call runs in a session, placed on its board (each frame
reports `placed_on_board`) — reference them by `file_id` afterwards. All frames are written or none: a failure part-way
deletes the frames already written, so the call can simply be retried.

Parameters

ParameterTypeDefaultDescription
file_idrequiredstring (uuid)—The sheet to cut: a workspace file id — an attachment's id or a forge output's file_id.
columnsrequiredinteger1–16—Cells across. Pass the grid the sheet was generated with.
rowsinteger1–161Cells down.
insetinteger0–2560Pixels trimmed off every side of each cell, to drop gutters or divider lines the generator drew.
trim_transparentbooleanfalseCrop each frame to its subject's bounds, ignoring faint haze, so a subject the generator drew off center comes out centered. Leave off for animation frames: a cycle stays registered only while every frame keeps its full cell.
overlap_xinteger0–20480Pixels neighboring cells share horizontally. Leave 0 for sprite sheets; set it to cut a large image into overlapping chunks for per-chunk editing.
overlap_yinteger0–20480Pixels neighboring cells share vertically.
offset_xinteger-4096–40960Shifts the whole grid right (positive) or left (negative).
offset_yinteger-4096–40960Shifts the whole grid down (positive) or up.
pad_edgesbooleantrueFill the part of a cell an offset pushes past the image with transparency, keeping every frame the same size. False crops those frames to the image.
name_prefixstring0–120 chars—File name stem for the frames. Defaults to the sheet's name.
workspace_idrequiredstring (uuid)—The user's workspace id.
session_idstring (uuid)—Session whose board receives the frames. Omit to only save them to the library.