← back to roto on ba3a.dev

ProjectConfig

@Serializable
data class ProjectConfig(val id: String, val palette: String, val ramps: String, val facings: List<String>, val mirrorPairs: List<MirrorPair> = emptyList(), val actions: List<String>, val canvas: Canvas, val output: @Serializable(with = PathTemplateSerializer::class) PathTemplate, val manifest: @Serializable(with = PathTemplateSerializer::class) PathTemplate, val afterPublish: List<@Serializable(with = TemplateSerializer::class) Template> = emptyList(), val formats: List<OutputFormat> = emptyList())

A consuming project's roto.json: everything Roto is told about the project it publishes into. Roto has no built-in notion of facings, actions, canvas size or folder layout; they all come from here. Validated on construction, so a loaded config is always usable.

id names the project in the library folder (<library>/<id>/<profile>/), so it stays the same across clones and renames of the consuming repository. palette and ramps are RelativePaths from the project root. output names each published frame and must use every TemplateVariable, so no two frames of any clip land on the same file; manifest names each clip's manifest and uses all of them but {frame}. afterPublish is a command run in the project root after a publish; its arguments may use {profile}. formats are the files wanted beside the published frames.

Constructors

Link copied to clipboard
constructor(id: String, palette: String, ramps: String, facings: List<String>, mirrorPairs: List<MirrorPair> = emptyList(), actions: List<String>, canvas: Canvas, output: @Serializable(with = PathTemplateSerializer::class) PathTemplate, manifest: @Serializable(with = PathTemplateSerializer::class) PathTemplate, afterPublish: List<@Serializable(with = TemplateSerializer::class) Template> = emptyList(), formats: List<OutputFormat> = emptyList())

Properties

Link copied to clipboard

the actions the project animates

Link copied to clipboard
val afterPublish: List<@Serializable(with = TemplateSerializer::class) Template>

the command run in the project root after a publish, one template per argument

Link copied to clipboard

the canvas every published frame is drawn on

Link copied to clipboard

the facings the project draws, such as the directions a figure can face

Link copied to clipboard

the files wanted beside the published frames

Link copied to clipboard
val id: String

the project's name in the library folder

Link copied to clipboard
val manifest: @Serializable(with = PathTemplateSerializer::class) PathTemplate

where each clip's manifest goes

Link copied to clipboard

the facings that may be mirrored into each other

Link copied to clipboard
val output: @Serializable(with = PathTemplateSerializer::class) PathTemplate

where each published frame goes

Link copied to clipboard

the palette file, relative to the project root

Link copied to clipboard

the ramps file, relative to the project root

Functions

Link copied to clipboard
fun mirrorFacing(facing: String): String?

The facing facing may be mirrored into, or null when no mirror pair names it.