hierarchy¶
The Scene’s mobs, as a tree a viewer can walk, with their animatable state.
Two things make this less obvious than listing scene.actors:
actorsis flat and holds every Animatable ever constructed, including the component mobs a shape builds itself out of, and in construction order – so a child can appear before its parent. The tree is rebuilt from the roots (not mob.parents) downwards instead. Parents are a list: the hierarchy is a graph, and a mob reached by two paths appears under both.The camera and the lights are not in
actorsat all, so they get their own sections rather than being silently missing.
Mob state does not live on the Mob. Every animatable attribute is a row in the
Scene’s timeline, so reading one at a chosen time means materializing the whole
timeline at that time, reading, and putting it back – which is what
attributes_at() does, and why the caller must hold the session lock.
Functions
- attributes_at(scene, mob, time_seconds=None)[source]¶
A mob’s animatable attributes, optionally as of
time_seconds.Convenience for the single-mob case; reading several mobs at one time should share a single
materialized()block rather than repeat it per mob.
- attributes_of(scene, mob)[source]¶
A mob’s animatable attributes, read from the timeline as it stands.
Wrap the call in
materialized()to read them at a chosen time instead.
- index(scene)[source]¶
Every node the tree can reach, keyed by
node_id().Built once per request rather than cached: a script may keep authoring while the viewer is open, and a stale index would hide the new mobs.
- materialized(scene, time_seconds)[source]¶
Hold the Scene’s timeline at
time_secondsfor the block, then undo it.Materializing points every attribute’s storage at a buffer of values for the requested times, which is what makes an ordinary
mob.locationread return the frame’s value instead of the authored one. It is global mutation of the Scene, so the caller must hold the viewer’s lock, and it must be undone however the block exits.time_secondsofNoneis a no-op, leaving the authoring state in place – the scene as the script last left it.
- mob_by_timeline_id(scene)[source]¶
Mob.id-> mob, for naming the surface behind a rendered fragment.Mob.idis not unique across views and clones, so the first actor holding an id wins; that is the one that owns the timeline rows the render read.