NoExtra

Qualified name: algan.animation\_timeline.animation\_contexts.NoExtra

class NoExtra(runtime=None, runtime_per_part=None, equalize_runtimes=None, lag_ratio=None, priority_level=None, easing=None, composed_easing=None, combine_easing=False, record_funcs=None, record_attr_modifications=None, prev_context=None, spawn_at_end=None, new_animation=False, finished=False, new_mobs=None, child_contexts=None, kwargs=None, animation_manager=None)[source]

Bases: AnimationContext

Suppress enclosing contexts’ spawn/despawn extras inside this block.

Some contexts add behaviour to every spawn or despawn – SlideShow inserts a pause around each one, for instance. Wrapping code in NoExtra stops those additions from applying to spawns inside the block, while leaving the timing behaviour of the enclosing context intact.

Examples

with SlideShow():
    title.spawn()  # gets the slideshow pauses
    with NoExtra(priority_level=1):
        helper.spawn()  # does not

Methods

on_create

Do nothing, dropping enclosing contexts' spawn extras.

on_destroy

Do nothing, dropping enclosing contexts' despawn extras.

Attributes

animation_manager

child_contexts

combine_easing

composed_easing

current_time

Where the authoring cursor sits within this context, in seconds.

easing

end_time

The furthest time anything recorded in this context reaches, in seconds.

equalize_runtimes

finished

kwargs

lag_ratio

new_animation

new_mobs

prev_context

priority_level

record_attr_modifications

record_funcs

runtime

runtime_per_part

spawn_at_end

Parameters:
  • runtime (float | None)

  • runtime_per_part (float | None)

  • equalize_runtimes (bool | None)

  • lag_ratio (float | None)

  • priority_level (float | None)

  • easing (Callable[[], float] | None)

  • composed_easing (Callable[[], float] | None)

  • combine_easing (bool)

  • record_funcs (bool | None)

  • record_attr_modifications (bool | None)

  • prev_context (AnimationContext | None)

  • spawn_at_end (bool | None)

  • new_animation (bool | None)

  • finished (bool)

  • new_mobs (list | None)

  • child_contexts (list | None)

  • kwargs (Any)

  • animation_manager (Any)

on_create(animatable)[source]

Do nothing, dropping enclosing contexts’ spawn extras.

Parameters:

animatable – The Mob being spawned.

Returns:

This context.

Return type:

NoExtra

on_destroy(animatable)[source]

Do nothing, dropping enclosing contexts’ despawn extras.

Parameters:

animatable – The Mob being despawned.

Returns:

This context.

Return type:

NoExtra