← back to roto on ba3a.dev

HandoffMerge

Builds a clip's handoff sprite from a HandoffRender, keeping everything the artist made.

The sprite is indexed; palette entry 0 is transparent and entries 1.. are the project palette. Its layers, bottom to top, are REFERENCE — the source frame, at 40 % cel opacity, which every editor honours — then DRAFT, then the artist's layers: ART and any other the artist added.

Re-rendering over an existing handoff rewrites what the reference and draft layers show, keeping whether the artist hid them. Every other layer is the artist's and comes through as it was: same name, flags, cels and positions, and the same colours — its indices are remapped by colour when the palette has changed. Where that is impossible the merge refuses rather than alter the art: the canvas changed size, a colour the art uses left the palette, or fewer key frames would drop a frame that holds art.

Properties

Link copied to clipboard
const val ART: String

The name of the layer the artist paints on.

Link copied to clipboard
const val DRAFT: String

The name of the layer that shows the finished draft.

Link copied to clipboard
const val MODEL: String

The name of the layer that shows the model's frame, at the reference's opacity.

Link copied to clipboard
const val REFERENCE: String

The name of the layer that shows the source frame.

Functions

Link copied to clipboard
fun merge(existing: AseSprite?, render: HandoffRender): AseSprite

The sprite of render with the layers of the existing handoff, if any, carried over; null for a first render.