A sequence is a time-span within a video. A sequence can hold multiple prepare tasks and layer tasks. Every prepare task and layer task is evaluated once per video frame, if the video frames is within the temporal boundaries of the sequence.

From a practical point of view, sequences are special user-defined and decorated classes. A user must not instantiate a sequence class. Prepare tasks and layer tasks are special, also decorated methods within those user-defined classes. If a constructor method is present in the user-defined sequence class, it is evaluated once per video rendering run (bewegung.Video.render()). It is also (re-) evaluated if the video object is reset (bewegung.Video.reset()). User-defined sequence classes are eventually “mixed” with the bewegung.animation.Sequence class. All of its methods and properties are therefore available in user-defined sequence classes. From a technical point of view, new classes are generated by making bewegung.core.sequence.Sequence inherit from user-defined sequence classes.

The Video.sequence Decorator

This method is used to decorate user-defined sequence classes. See bewegung.Video.sequence() method for further details.

The Sequence Class


Do not work with this class directly. Use the bewegung.Video.sequence() method instead.

class bewegung.animation.Sequence(start, stop, video)

Holds layers and prepare tasks. “Base class” for user-defined sequences. Actually, new classes are created by making this class inherit from user-defined sequence classes. Do not instantiate this class or derive from it - use the bewegung.Video.sequence() decorator instead!


  • start (TimeABC) – Begin of sequence within video

  • stop (TimeABC) – End of sequence within video

  • video (VideoABC) – Parent video object


Checks whether a Time is within the sequence.


time (TimeABC) – Time within parent video

Return type



Duration of sequence as number of frames

Return type


property ctx: Dict

“Parent” context dictionary

Return type


property length: bewegung.animation._abc.TimeABC

Duration of sequence

Return type



Calls the constructor of the user-defined sequence class. Used to reset the sequence for a (new) rendering run.

property start: bewegung.animation._abc.TimeABC

Begin of sequence within video

Return type


property stop: bewegung.animation._abc.TimeABC

End of sequence within video

Return type


property video: bewegung.animation._abc.VideoABC

“Parent” video object

Return type