← back to roto on ba3a.dev

Publisher

class Publisher(project: Project, repository: ProfileRepository, runner: ProcessRunner = SystemProcessRunner)

Publishes a profile's finished clips into the consuming project:

  1. each clip's art is read from its handoff, retimed and written frame by frame where the project's output template says, with a ClipManifest where its manifest template says; frame files a longer earlier publish left beyond the new last frame are removed;

  2. a clip that opted in to mirroring is also published, flipped, as the facing its mirror pair names — never over a facing the profile has filmed itself;

  3. the engine files the project's formats ask for are rebuilt from what is published, reading the other profiles that share them from repository;

  4. the project's afterPublish command runs last, in the project root.

A variant has no clips: it publishes the finished clips of its BaseProfile, each retimed, recoloured and then mirrored as the base's opt-in says, under the variant's own profile id. Unfinished base clips are skipped and named in the Report.

Every rule about names, sizes and places comes from roto.json; Roto knows nothing of what the consuming project does with the files.

Constructors

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

Types

Link copied to clipboard
class Report(val files: List<Path>, val hook: ProcessResult?, val skipped: List<String> = emptyList(), val unpublished: List<String> = emptyList())

What a publish did: every files it wrote, and the afterPublish hook's result, if one ran.

Functions

Link copied to clipboard
fun publish(profileId: String, profile: Profile, folder: ProfileFolder, clips: List<Clip> = profile.clips, base: BaseProfile? = null): Publisher.Report

Publishes clips — all of profile's unless told otherwise — of the profile profileId stored in folder. When profile is a variant, base is the profile it recolours and clips are ignored: every finished clip of base is published.