AttributeTimeline

Qualified name: algan.animation\_timeline.timeline.AttributeTimeline

class AttributeTimeline(channels, buffer_size=256, attr_name=None, record_end_points=False)[source]

Bases: object

A Scene-owned timeline recording every Mob row for one attribute.

Edits (EditRecord s) are kept in execution order; materialization sets each row’s base state at time t to the pre-modification value of the row’s earliest-executed edit whose (replay-extended) end is after t, over which AnimationTimeline.set_state_to_times() re-applies the functions whose replay windows cover t, 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

add

begin_replay_scope

Mark every row claimed from now on as replay-born.

clear_buffers

discard_mobs

Forget mob_ids entirely, rewinding the buffer past their rows.

drop_mob

Forget mob_id's rows and cached ranges.

end_replay_scope

get

get_current_values

invalidate_prepared_queries

Drop data derived from the recorded edit log.

materialize_additional_rows

Fill selected rows in an already materialized sparse state.

modify

prepare_for_queries

ranges_for

The mob's own rows as a (cached) single-run RowRanges.

reassign_inds

Point mob_id at inds, invalidating the cached RowRanges (ranges_for()) so callers don't read stale rows.

record

rematerialize_state_at_times

rows_for_mob_ids

Return the global rows owned by mob_ids as coalesced runs.

set_active_time_inds

set_end_point

set_start_point

begin_replay_scope()[source]

Mark every row claimed from now on as replay-born.

discard_mobs(mob_ids)[source]

Forget mob_ids entirely, 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.

drop_mob(mob_id)[source]

Forget mob_id’s rows and cached ranges.

invalidate_prepared_queries(*, retain_edit_prefix=False)[source]

Drop data derived from the recorded edit log.

The temporary active_state produced 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 to current_state does 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.

ranges_for(mob_id)[source]

The mob’s own rows as a (cached) single-run RowRanges.

reassign_inds(mob_id, inds)[source]

Point mob_id at inds, invalidating the cached RowRanges (ranges_for()) so callers don’t read stale rows. Use this for any direct row hand-over that bypasses add() (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.

rows_for_mob_ids(mob_ids)[source]

Return the global rows owned by mob_ids as coalesced runs.