Skip to content

Mask Property Group

MaskPropertyGroup

MaskPropertyGroup(
    enabled: bool,
    match_name: str,
    name: str,
    property_depth: int,
    properties: list[Property | PropertyGroup],
    color: list[float],
    inverted: bool,
    locked: bool,
    mask_feather_falloff: MaskFeatherFalloff,
    mask_mode: MaskMode,
    mask_motion_blur: MaskMotionBlur,
    roto_bezier: bool,
)

Bases: PropertyGroup

An individual mask applied to a layer.

The MaskPropertyGroup object encapsulates mask attributes in a layer.

Info

MaskPropertyGroup is a subclass of PropertyGroup object. All methods and attributes of PropertyBase object and PropertyGroup, in addition to those listed below, are available when working with MaskPropertyGroup.

Example
from aep_parser import parse

app = parse("project.aep")
comp = app.project.compositions[0]
layer = comp.layers[0]
mask = layer.masks[0]
print(mask.inverted)

See: https://ae-scripting.docsforadobe.dev/property/maskpropertygroup/

Attributes

active

active: bool

Same as enabled.

can_set_enabled

can_set_enabled: bool

True if the enabled attribute value can be set.

This is True for all layers, effect property groups, shape vector groups, and text path options.

color

color: list[float]

The color used to draw the mask outline as it appears in the user interface (Composition panel, Layer panel, and Timeline panel). The three array values specify the red, green, and blue components of the color.

elided

elided: bool = field(init=False, default=False)

When True, the property is not shown in the UI. An elided property is still present in the timeline but hidden from view.

enabled

enabled: bool

Corresponds to the setting of the eyeball icon.

inverted

inverted: bool

When True, the mask is inverted.

is_effect

is_effect: bool = field(init=False, default=False)

When True, this property is an effect PropertyGroup.

is_mask

is_mask: bool = field(init=False, default=False)

When True, this property is a mask PropertyGroup.

is_modified

is_modified: bool

True if any child property is modified.

For indexed groups (such as Effects or Masks parades), the group is considered modified when it has any children - adding items to an indexed group is itself a modification.

locked

locked: bool

When True, the mask is locked and cannot be edited in the user interface.

mask_feather_falloff

mask_feather_falloff: MaskFeatherFalloff

The feather falloff mode for the mask. Applies to all feather values for the mask.

mask_mode

mask_mode: MaskMode

The blending mode for the mask. Controls how the mask interacts with other masks and with the layer below.

mask_motion_blur

mask_motion_blur: MaskMotionBlur

How motion blur is applied to this mask.

match_name

match_name: str

A special name for the property used to build unique naming paths. The match name is not displayed, but you can refer to it in scripts. Every property has a unique match-name identifier.

name

name: str

Display name of the property.

num_properties

num_properties: int

The number of child properties in this group.

Equivalent to ExtendScript PropertyGroup.numProperties.

parent_property

parent_property: PropertyGroup | None = field(
    init=False, default=None, repr=False
)

The parent PropertyGroup of this property, or None for top-level layer property groups.

properties

properties: list[Property | PropertyGroup]

List of properties in this group.

property_depth

property_depth: int

The number of levels of parent groups between this property and the containing layer. The value is 0 for a layer.

property_index

property_index: int | None

The 0-based position of this property within its parent group.

Returns None for layers (property depth 0).

Warning

Unlike ExtendScript (1-based), this uses Python's 0-based convention so that group.properties[prop.property_index] works directly.

property_type

property_type: PropertyType = field(
    init=False, default=NAMED_GROUP
)

The type of this property. One of PropertyType.PROPERTY, PropertyType.NAMED_GROUP, or PropertyType.INDEXED_GROUP.

roto_bezier

roto_bezier: bool

When True, the mask uses RotoBezier, enabling curved mask segments without direction handles.

selected

selected: bool = field(init=False, default=False)

When True, the property is selected.

Functions

property

property(
    index: int | None = None, name: str | None = None
) -> Property | PropertyGroup

Find and return a child property of this group.

The property can be specified by either its index or name (match name or display name).

Parameters:

  • index
    (int | None, default: None ) –

    The index of the property to return.

  • name
    (str | None, default: None ) –

    The name of the property to return.