← back to roto on ba3a.dev

Profile

@Serializable
data class Profile(val ramps: List<String> = emptyList(), val scale: ScaleSettings? = null, val clips: List<Clip> = emptyList(), val variant: VariantOf? = null)

One character (or prop) of a consuming project: the clips filmed for it, the palette ramps it uses, and the scale it is drawn at once the artist has marked it. Stored as profile.json in the profile's library folder; the folder name is the profile id, so the id is not repeated inside the file. Validated on construction, including that every zone of every clip uses one of ramps.

Clips are listed in the order the artist added them. At most one clip exists per action and facing; their ids must differ even ignoring case, because each names a handoff file and Windows and macOS file systems ignore case.

Constructors

Link copied to clipboard
constructor(ramps: List<String> = emptyList(), scale: ScaleSettings? = null, clips: List<Clip> = emptyList(), variant: VariantOf? = null)

Properties

Link copied to clipboard

the clips filmed for the profile, in the order added

Link copied to clipboard

the names of the project ramps the profile's zones may use

Link copied to clipboard

how big the figure is drawn, or null until the artist has marked it

Link copied to clipboard

the profile this one recolours, or null; a variant has no clips of its own

Functions

Link copied to clipboard
fun clip(action: String, facing: String): Clip?

The clip for action facing facing, or null when none has been set up.

Link copied to clipboard
fun withClip(clip: Clip): Profile

This profile with clip in place of the one for its action and facing, or added last if there is none.