movis.layer.layer_ops.LuminanceMatte#

class movis.layer.layer_ops.LuminanceMatte(mask: BasicLayer, target: BasicLayer)[source]#

A layer that replaces the alpha channel of the target layer with the luminance of the mask layer.

Note

The mask layer and the target layer should have the same size and the same duration. Using the Composition layer is preferred if users want to align them.

Args:
mask:

the base mask layer used for luminance matte. mask must comply with the BasicLayer protocol.

target:

the target layer to which luminance matte is applied. target must comply with the BasicLayer protocol.

Methods

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

Get the state for the given time.

Attributes

duration

The duration of the layer.