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.
maskmust comply with theBasicLayerprotocol.- target:
the target layer to which alpha matte is applied.
targetmust comply with theBasicLayerprotocol.- 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
Attributes
attributesA dictionary of attributes that are used to generate cache keys.
durationThe duration of the layer.