← back to roto on ba3a.dev

AnimationExporter

class AnimationExporter(project: Project, runner: ProcessRunner = SystemProcessRunner)

Exports a clip of a profile of project as one animated file in the profile's exports folder. The frames are the flipbook's: art where painted, else draft, else reference, flipped when mirrored and retimed as a publish would. A variant exports its base's clip with the ramp swaps applied.

A clip that cannot be exported as asked (no handoff, a retime beyond its frames, a facing it cannot be mirrored into, a result too large) fails with an IllegalArgumentException; a file that cannot be read or written, with an java.io.IOException. A format written through ffmpeg, run by runner, is refused with a VideoToolException when unavailableReason says so.

Constructors

Link copied to clipboard
constructor(project: Project, runner: ProcessRunner = SystemProcessRunner)

Functions

Link copied to clipboard

Writes source as options ask, replacing an earlier export of the same name. A background outside the project palette is mapped to the nearest palette colour.

Link copied to clipboard
fun filmed(profileId: String, profile: Profile, folder: ProfileFolder, base: BaseProfile? = null): List<ExportSource>

The clips profile, with the id profileId and stored in folder, exports when none is named: its filmed clips, or for a variant those of its base, none of them mirrored.

Link copied to clipboard

Whether the clip of source has the handoff an export reads.

Link copied to clipboard
fun mapping(colour: Int?): BackgroundMapping?

What a background of colour becomes, or null when there is none or the palette holds it.

Link copied to clipboard
fun named(name: String, filmed: List<ExportSource>): ExportSource?

The export called name (<action>_<facing>) among the filmed ones: the filmed clip of that id, else the mirrored facing of a clip that opted in to mirroring; null when there is neither.

Link copied to clipboard

The frames source would export as they stand now, and how many of them are painted.

Link copied to clipboard

Why format cannot be written on this machine, or null when it can. ffmpeg is asked once.