## 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_Duik_api.jsxinc, line 18141

# Members

#### # static hideTags

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

View Source DuAEF_Duik_api.jsxinc, line 18190

Type: `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.

View Source DuAEF_Duik_api.jsxinc, line 18148

Type: `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_Duik_api.jsxinc, line 18166

Type: `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_Duik_api.jsxinc, line 18179

# 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_Duik_api.jsxinc, line 18438

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

Gets the tag.

##### Parameters:

Name | Type | Description
--- | --- | ---
`layer` | `Layer` | The layer to get the tag from.

View Source DuAEF_Duik_api.jsxinc, line 18274

Returns:
The marker (tag) or `null` if not found.
Type: `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_Duik_api.jsxinc, line 18422

Returns:
The list of groups. May be an empty list.
Type: `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_Duik_api.jsxinc, line 18339

Returns:
The name.
Type: `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_Duik_api.jsxinc, line 18376

Returns:
The value, null if the key was not found.
Type: `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_Duik_api.jsxinc, line 18306

#### # 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_Duik_api.jsxinc, line 18460

#### # 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_Duik_api.jsxinc, line 18481

#### # 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_Duik_api.jsxinc, line 18230

Returns:
The marker (tag), with an extra property `keyIndex` which is the index of the corresponding keyframe.
Type: `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_Duik_api.jsxinc, line 18322

Returns:
The name.
Type: `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_Duik_api.jsxinc, line 18354

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