AttributeTimeline¶
Qualified name: algan.animation\_timeline.timeline.AttributeTimeline
- class AttributeTimeline(channels, buffer_size=256, attr_name=None, record_end_points=False)[source]¶
Bases:
objectA Scene-owned timeline recording every Mob row for one attribute.
Edits (
EditRecords) are kept in execution order; materialization sets each row’s base state at timetto the pre-modification value of the row’s earliest-executed edit whose (replay-extended) end is aftert, over whichAnimationTimeline.set_state_to_times()re-applies the functions whose replay windows covert, in execution order. This makes edits that overlap in time (including edits ending at the same time) rematerialize to the same chain of states they produced when recorded.Methods
addMark every row claimed from now on as replay-born.
clear_buffersForget
mob_idsentirely, rewinding the buffer past their rows.Forget
mob_id's rows and cached ranges.end_replay_scopegetget_current_valuesDrop data derived from the recorded edit log.
Fill selected rows in an already materialized sparse state.
modifyprepare_for_queriesThe mob's own rows as a (cached) single-run
RowRanges.Point
mob_idatinds, invalidating the cachedRowRanges(ranges_for()) so callers don't read stale rows.recordrematerialize_state_at_timesReturn the global rows owned by
mob_idsas coalesced runs.set_active_time_indsset_end_pointset_start_point- discard_mobs(mob_ids)[source]¶
Forget
mob_idsentirely, rewinding the buffer past their rows.Used to undo the row claims of Mobs a replayed updater built (see
AnimationTimeline._discard_replay_born_mobs()). The buffer is rewound to one past the highest row any surviving Mob still owns rather than to a remembered watermark, so it stays correct even if something else re-allocated rows during the same replay.
- invalidate_prepared_queries(*, retain_edit_prefix=False)[source]¶
Drop data derived from the recorded edit log.
The temporary
active_stateproduced while rendering is deliberately not part of this cache. Normal recording-time writes, row allocation, topology migration, and rollback of transient replay-window timestamps call this method; merely returning tocurrent_statedoes not.Ordinary recording and row growth are append-only, so they can retain the already-normalized edit dictionaries. Topology migration and replay-window rollback mutate earlier records and request a full reset.
- materialize_additional_rows(times, rows)[source]¶
Fill selected rows in an already materialized sparse state.
Updater dependency tracing can discover a previously unseen mob while the updater is executing. Materializing those rows lazily keeps that first frame correct; the dependency is retained on the updater so subsequent frame windows include it in their initial working set.
- reassign_inds(mob_id, inds)[source]¶
Point
mob_idatinds, invalidating the cachedRowRanges(ranges_for()) so callers don’t read stale rows. Use this for any direct row hand-over that bypassesadd()(e.g.detach_history()’s history swap). Bumps the structure version so per-mob descendant-row caches (Mob._attr_inds_cache) that may reference the old ownership are rebuilt.