movis.attribute.AttributesMixin#

class movis.attribute.AttributesMixin[source]#

A mix-in class with a collection of methods for implementing layers or effects using attributes.

When using attributes, the content of layers or effects changes based on those attributes. Specifically, these attributes influence the generation of cache keys for the composition.

This mixin class adds a feature that, when the get_key() method is called, extracts all attributes from the instance and converts them into a format that can be used for the cache key.

Methods

get_key(time: float) tuple[Hashable, ...][source]#

Returns a tuple of hashable values that represent the state of the instance at a given time.

Attributes

attributes

A dictionary of attributes that are used to generate cache keys.