← back to roto on ba3a.dev

Clip

@Serializable
data class Clip(val action: String, val facing: String, val source: String, val trim: TimeRange?, val plate: PlateSource = PlateSource.ClipMedian, val mask: MaskSettings = MaskSettings(), val root: RootSettings = RootSettings(), val depth: DepthSettings = DepthSettings(), val cycle: CycleSettings = CycleSettings(), val markers: List<Int>? = null, val fixes: List<BrushStroke> = emptyList(), val zoning: ZoneSettings = ZoneSettings(), val shading: ShadeSettings = ShadeSettings(), val draft: DraftSettings = DraftSettings(), val loop: Boolean = true, val mirror: Boolean = false, val model: String? = null, val retime: Retime = Retime(), val godotSpeed: Int? = null)

One action filmed from one facing: a trimmed range of a source video in the profile's sources/ folder, or, with no trim, a still: the one frame of a source photo, which needs a photo of the empty wall as its plate and runs through every stage the same way. plate says where its empty background comes from, mask how its figure is told apart from it, root how the figure is tracked and held still, and cycle how its key frames are proposed; markers, once the artist has set them, replace that proposal as KeyFrames boundaries. fixes are the artist's brush strokes on the masks of key frames. zoning splits the figure into zones, each shaded with one of the profile's ramps across the lightness range shading sets, then finished as draft says. loop says whether the published animation repeats; mirror opts this clip in to also being published, mirrored, as the facing roto.json pairs it with; model names the profile's model clip it follows, if any.

action and facing come from the project's roto.json. They are not checked against it here, so a profile still loads after the project renames an action; publishing such a clip fails instead.

Constructors

Link copied to clipboard
constructor(action: String, facing: String, source: String, trim: TimeRange?, plate: PlateSource = PlateSource.ClipMedian, mask: MaskSettings = MaskSettings(), root: RootSettings = RootSettings(), depth: DepthSettings = DepthSettings(), cycle: CycleSettings = CycleSettings(), markers: List<Int>? = null, fixes: List<BrushStroke> = emptyList(), zoning: ZoneSettings = ZoneSettings(), shading: ShadeSettings = ShadeSettings(), draft: DraftSettings = DraftSettings(), loop: Boolean = true, mirror: Boolean = false, model: String? = null, retime: Retime = Retime(), godotSpeed: Int? = null)

Types

Link copied to clipboard
object Companion

Creation of stills.

Properties

Link copied to clipboard

the action filmed, one of the project's

Link copied to clipboard

how the cycle is found and key frames proposed

Link copied to clipboard

whether the figure is kept one size while it walks toward or away from the camera

Link copied to clipboard

how the draft is finished

Link copied to clipboard

the facing filmed, one of the project's

Link copied to clipboard

the artist's brush strokes on key frames' masks

Link copied to clipboard

the frames per second the artist chose for a Godot animation whose own speed is not whole, or null for the rounded suggestion

Link copied to clipboard

Whether anything here counts frames of the clip, which a recut would lose.

Link copied to clipboard
val id: String

<action>_<facing>: names the clip's handoff file and its published manifest's source clip.

Link copied to clipboard

Whether source is a photo rather than a video to cut.

Link copied to clipboard

whether the published animation repeats

Link copied to clipboard

the artist's key-frame boundaries, or null while the proposal stands

Link copied to clipboard

how the figure is told apart from the plate

Link copied to clipboard

whether the clip is also published mirrored, as the facing paired with it

Link copied to clipboard

the key of the profile's model clip this clip follows, or null for none

Link copied to clipboard

where the clean plate comes from

Link copied to clipboard

how the finished art is sped up, slowed or thinned when published

Link copied to clipboard

how the figure is tracked and held still

Link copied to clipboard

the lightness range of each zone

Link copied to clipboard

the video or photo among the profile's sources

Link copied to clipboard

the part of the video used, or null for a still

Link copied to clipboard

the zones and the artist's strokes over them

Functions

Link copied to clipboard
fun keyFrames(proposal: () -> CycleAnalysis): KeyFrames

The key frames drawn: the artist's markers when set, otherwise the cycle stage's proposal.

Link copied to clipboard
fun recut(source: String, trim: TimeRange): Clip

This clip cut from source over trim instead. markers, fixes and zoning samples count frames of the clip, so a new cut leaves them pointing at other pictures and they are dropped; a plate marked in another video goes too. Every other setting stays, except that a still's loop says nothing of a video, and an unchanged cut changes nothing.

Link copied to clipboard
fun reshot(source: String, wall: String): Clip

This clip as the still source against the photo of the empty wall; like recut, it drops its frame work.