Namespace

DuAETag

DuAETag

After Effects tag methods
Tags are markers set on the first frame of layers, displaying an info about the layer (usually, a "type" or tag).
These markers are used by DuAEF (and Duik, DuGR, ...) to recognise and manipulate the layers, and to store hidden data.
They're also used assign the layer to groups, which can be used by other scripts, especially DuGR.

View Source DuAEF.jsxinc, line 21492

Members

bool

# static hideTags

Set to true so the markers are created before the composition start time and hidden

View Source DuAEF.jsxinc, line 21547

string

# static readonly Key

The list of paramaters which can be set by DuAEF in tags.
Properties:
Name Type Description
CHILD_LAYERS string Used to temporarily store the list of children of the layers.
GROUPS string A list of groups this layer belongs to.
LAYER_TYPE string A Custom layer type Historically from duik

View Source DuAEF.jsxinc, line 21499

string

# static readonly Name

The list of names used for the markers.
Names are the string shown to the user on the marker, the comment.
Note that these names may change as they may be localized and should not be used to manipulate layers, but only shown to the user.
Properties:
Name Type Description
EDIT_MODE string A layer toggled to edit mode.

View Source DuAEF.jsxinc, line 21522

int

# static readonly Type

The list of types to parse values.
Properties:
Name Type Description
STRING int
BOOL int
INT int
ARRAY int
FLOAT int

View Source DuAEF.jsxinc, line 21535

Methods

# static addGroup(layer, groupName, tagopt)

Assigns the layer to a group.
If the layer does not have a tag yet, a new one will be created with the group name.
Parameters:
Name Type Attributes Description
layer Layer The layer.
groupName string The group.
tag MarkerValue <optional>
If you have the tag as returned by DuAETag.get or DuAETag.set, providing it here improves performance.

View Source DuAEF.jsxinc, line 21795

# static get(layer) → {MarkerValue|null}

Gets the tag.
Parameters:
Name Type Description
layer Layer The layer to get the tag from.

View Source DuAEF.jsxinc, line 21631

The marker (tag) or null if not found.
MarkerValue | null

# static getGroups(layer, tagopt) → {Array.<string>}

Gest the list of the groups this layer belongs to.
Parameters:
Name Type Attributes Description
layer Layer
tag MarkerValue <optional>
If you have the tag as returned by DuAETag.get or DuAETag.set, providing it here improves performance.

View Source DuAEF.jsxinc, line 21779

The list of groups. May be an empty list.
Array.<string>

# static getName(layer) → {string}

Gets the name (comment of the marker) of the tag.
Parameters:
Name Type Description
layer Layer The layer to get the tag from

View Source DuAEF.jsxinc, line 21696

The name.
string

# static getValue(layer, key, typeopt, tagopt) → {any}

Gets the value of a specific key in the tag parameters.
Parameters:
Name Type Attributes Default Description
layer Layer The layer to get the tag from.
key string The key. May be one of DuAETag.Key.
type DuAETag.Type <optional>
DuAETag.Type.STRING The expected type for the value.
tag MarkerValue <optional>
If you have the tag as returned by DuAETag.get or DuAETag.set, providing it here improves performance.

View Source DuAEF.jsxinc, line 21733

The value, null if the key was not found.
any

# static remove(layer, tagopt)

Removes the tag from the layer
Parameters:
Name Type Attributes Description
layer Layer The layer containing the tag.
tag MarkerValue <optional>
If you have the tag as returned by DuAETag.get or DuAETag.set, providing it here improves performance.

View Source DuAEF.jsxinc, line 21663

# static removeGroup(layer, groupName, tagopt)

Unassigns the layer from a group.
Parameters:
Name Type Attributes Description
layer Layer The layer.
groupName string The group.
tag MarkerValue <optional>
If you have the tag as returned by DuAETag.get or DuAETag.set, providing it here improves performance.

View Source DuAEF.jsxinc, line 21817

# static renameGroup(layer, previousName, newName, tagopt)

Renames a group
Parameters:
Name Type Attributes Description
layer Layer The layer.
previousName string The current name
newName string The new name
tag MarkerValue <optional>
If you have the tag as returned by DuAETag.get or DuAETag.set, providing it here improves performance.

View Source DuAEF.jsxinc, line 21838

# static set(layer, tagNameopt, tagopt, hiddenopt) → {MarkerValue}

Sets a new marker/tag (or gets the existing one) on the first frame of the layer.
Parameters:
Name Type Attributes Default Description
layer Layer The layer to set the tag on.
tagName string <optional>
The name to display on the marker (the comment of the marker)
tag MarkerValue <optional>
An existing tag.
hidden Boolean <optional>
DuAETag.hideTags When true, the marker will be created before the layer and comp start time, so it's hidden.

View Source DuAEF.jsxinc, line 21587

The marker (tag), with an extra property keyIndex which is the index of the corresponding keyframe.
MarkerValue

# static setName(layer, tagNameopt, tagopt) → {string}

Sets the name (comment of the marker) of the tag.
Parameters:
Name Type Attributes Description
layer Layer The layer to get the tag from
tagName string <optional>
The name to display on the marker (the comment of the marker)
tag MarkerValue <optional>
If you have the tag as returned by DuAETag.get or DuAETag.set, providing it here improves performance.

View Source DuAEF.jsxinc, line 21679

The name.
string

# static setValue(layer, key, value, tagopt) → {Boolean}

Sets a new parameter (a key/value pair) to the hidden parameters stored in the tag.
Parameters:
Name Type Attributes Description
layer Layer The layer to get the tag from.
key string The key. May be one of DuAETag.Key.
value string The value, which needs to be a string.
tag MarkerValue <optional>
If you have the tag as returned by DuAETag.get or DuAETag.set, providing it here improves performance.

View Source DuAEF.jsxinc, line 21711

Success, may be false if there's no tag on this layer yet.
Boolean