movis.layer.layer_ops.AlphaMatte#
- class movis.layer.layer_ops.AlphaMatte(mask: BasicLayer, target: BasicLayer, opacity: float = 1.0, blending_mode: BlendingMode | str = BlendingMode.NORMAL)[source]#
A layer that applies alpha matte to the target layer using the mask layer.
Alpha Matte is a algorihtm that overlays the target layer on the mask layer without changing the alpha channel. 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 alpha matte.
mask
must comply with theBasicLayer
protocol.- target:
the target layer to which alpha matte is applied.
target
must comply with theBasicLayer
protocol.- opacity:
the opacity of the target layer. Defaults to
1.0
.- blending_mode:
the blending mode of the target layer. Defaults to
BlendingMode.NORMAL
.
- Animatable Attributes:
opacity
Methods
- get_key(time: float) tuple[Hashable, Hashable, Hashable] [source]#
Get the state for the given time.
Attributes
attributes
A dictionary of attributes that are used to generate cache keys.
duration
The duration of the layer.