Skip to main content

Module override_layer

Module override_layer 

Source
Expand description

Per-part runtime Override Layer

Applies per-part runtime overrides (Visibility, Color, Cell) on the resolved pose at a single seam in Context::get_frame_data — after the source mix, before compose_frame_data. Overriding here (rather than during per-source extract_pose) is what lets an override win over both keyframe values and blend results.

The override table is a dense Vec<Option<PartOverride>> on InstanceState, indexed by part_index (O(1), zero per-frame alloc, no_std — no HashMap).

Structs§

CellOverride
Per-part cell override (mirrors SS6 CellChangeParts). Applied to Normal and Mask parts only. The cell is identified by (cellmap_name_hash, cell_name_hash) and resolved to a ResolvedCellMeta once at set time (cached here); the seam then only writes the resolved geometry / texture / UV meta and repoints the identity index — no per-frame hash lookup.
ColorOverride
Per-part color override (mirrors SS6 PartsColorChange). Applied to Normal parts only. Corners are stored raw (r, g, b, a) in ssruntime order lt, rt, lb, rb; alpha is pre-multiplied at the seam against the part’s composited alpha, matching keyframed PartColor.
PartOverride
A per-part override entry. Absent attributes are None. An all-None entry is equivalent to no override (see PartOverride::is_empty).
VisibilityOverride
Force-hide a part, optionally cascading to its descendants (a faithful port of SS6 HideSet’s flagInvolveChildren). Force-visible (overriding a keyframed hide) is intentionally reserved but not implemented; the FFI reserves force == 2 for it.

Enums§

PriorityMode
Keyframe-vs-override precedence for the attributes that conflict with the animation (Color and Cell). Visibility has no priority mode.

Functions§

apply_part_overrides
Apply the override table on the resolved pose at the seam.
passed_reaches_key
Decide whether an OverwriteOnNextKeyframe override should hand over this update, from the frames the controller actually traversed (passed_frames).