Namespace

DuAE

DuAE

After Effects general tools

View Source Duik_api_fordoc.jsxinc, line 20419

Members

int

# static readonly Axis

The axis or channels
Properties:
Name Type Description
X int
Y int
Z int
RED int
GREEN int
BLUE int
ALPHA int
HUE int
SATURATION int
VALUE int

View Source Duik_api_fordoc.jsxinc, line 20426

Array.<Array.<int>>

# static readonly ColorLabels

Default color labels
To Do:
  • get real labels (from pref file?)

View Source Duik_api_fordoc.jsxinc, line 20886

Object

# static CompactExpression

Associative array that converts property match names to their compact English expression statements.

View Source Duik_api_fordoc.jsxinc, line 20485

Example
DuAE.CompactExpression["ADBE Transform Group"]
//returns "'transform'"
DuList

# static DuAELayeredFileType

List of file extensions whih may be imported as several items with the same source

View Source Duik_api_fordoc.jsxinc, line 20864

string

# static readonly LayerAttribute

Attributes of layers in Ae
Properties:
Name Type Description
SELECTED string
VISIBLE string
AUDIO string
SOLO string
LOCKED string
SHY string
EFFECTS_ENABLED string
MOTION_BLUR string
THREE_D string
GUIDE string

View Source Duik_api_fordoc.jsxinc, line 20806

int

# static readonly LayerPlacement

How to place new layers
Properties:
Name Type Description
BOTTOM int
UNDER_LAYER int
ABOVE_LAYER int
TOP int

View Source Duik_api_fordoc.jsxinc, line 20777

string

# static readonly LayerType

Types of layers used by Ae
Properties:
Name Type Description
NULL string
SOLID string
SHAPE string
TEXT string
ADJUSTMENT string
LIGHT string
CAMERA string

View Source Duik_api_fordoc.jsxinc, line 20790

string

# static readonly LoopType

Loop types
Properties:
Name Type Description
HOLD string
NONE string
CYCLE string
PINGPONG string
OFFSET string
CONTINUE string

View Source Duik_api_fordoc.jsxinc, line 20825

int

# static readonly MenuCommandID

Menu Command Ids
These are the ids which can be found using app.findMenuCommandID("insertMenuNameHere");
Use app.executeCommand(id) to run them.
Properties:
Name Type Description
CUT int
COPY int
COPY_WITH_PROPERTY_LINKS int
PASTE int
DUPLICATE int
UNDO int
GENERAL_PREFERENCES int
SCRIPTING_PREFERENCES int
LAYER_CONTROLS int
REVEAL_EXPRESSION_ERRORS int
CONVERT_AUDIO_TO_KEYFRAMES int

View Source Duik_api_fordoc.jsxinc, line 20756

Example
app.executeCommand(DuAE.MenuCommandID.COPY); //copies the selection
app.executeCommand(DuAE.MenuCommandID.PASTE); //pastes the selection
int

# static readonly PrefType

The type of AE preferences
Properties:
Name Type Description
BOOL int
STRING int
FLOAT int
LONG int

View Source Duik_api_fordoc.jsxinc, line 20852

int

# static readonly SelectionMode

Enum for selections
Properties:
Name Type Description
SELECTED_PROPERTIES int
SELECTED_LAYERS int
ACTIVE_COMPOSITION int
SELECTED_COMPOSITIONS int
ALL_COMPOSITIONS int

View Source Duik_api_fordoc.jsxinc, line 20872

string

# static readonly TimeAlignment

How to align in time
Properties:
Name Type Description
CENTER string
IN_POINT string
OUT_POINT string

View Source Duik_api_fordoc.jsxinc, line 20840

int

# static readonly Type

Types of values
Properties:
Name Type Description
VALUE int
SPEED int
VELOCITY int

View Source Duik_api_fordoc.jsxinc, line 20445

string

# static readonly Unit

Abbreviated units used in the UI.
These strings are localized based on internal After Effects dictionnaries.
Properties:
Name Type Description
PIXELS string
DEGREES string
PERCENT string

View Source Duik_api_fordoc.jsxinc, line 20458

string

# static readonly UnitText

Units used in the UI
These strings are localized based on internal After Effects dictionnaries.
Properties:
Name Type Description
PERCENT string
DEGREES string
PIXELS string

View Source Duik_api_fordoc.jsxinc, line 20471

DuVersion

# static readonly version

Informations about the version of after effects.

View Source Duik_api_fordoc.jsxinc, line 21001

Methods

# static beginUndoGroup(groupName, autoCloseopt)

Begins an undoGroup.
Automatically prepend the group name with the script name.
Using this method is safer than the native one, as DuAEF will try to avoid opening several undo groups at once.
The group name is translatable.
Parameters:
Name Type Attributes Default Description
groupName string The name of the Undo Group.
autoClose boolean <optional>
true By default, DuAEF will close any previously opened undogroup (which has a different name) to prevent any error.
Set this to false in order to ignore this new group beginning and keep the previously opened one.

View Source Duik_api_fordoc.jsxinc, line 21121

# static convertCollectionToArray(collection) → {Array}

Converts an AE Collection to an Array
This method is deprecated, you should use a DuList otherwise
Parameters:
Name Type Description
collection Array | Collection The collection to convert
Deprecated:
  • Yes

View Source Duik_api_fordoc.jsxinc, line 21306

The array
Array

# static copy()

Copies the selection (runs the copy menu command)

View Source Duik_api_fordoc.jsxinc, line 21194

Copies the selection with property links (runs the copy menu command)
Only on versions of After Effects greater than 11.0 (CS6)
On CS6 and below, a standard copy will be done.

View Source Duik_api_fordoc.jsxinc, line 21210

# static cut()

Cuts the selection (runs the cut menu command)

View Source Duik_api_fordoc.jsxinc, line 21187

# static duplicate()

Duplcates the selection (runs the duplicate menu command)

View Source Duik_api_fordoc.jsxinc, line 21201

# static endUndoGroup(groupNameopt)

Ends an undoGroup.
Using this method is safer than the native one, as DuAEF will try to avoid opening several undo groups at once.
Parameters:
Name Type Attributes Description
groupName string <optional>
The name of the Undo Group to end. Use this if you used DuAE.beginUndoGroup with the 'autoClose' argument set to false before.

View Source Duik_api_fordoc.jsxinc, line 21141

# static executeCommand(commandID)

Runs app.executeCommand in a safer way, taking care of undogroups.
Parameters:
Name Type Description
commandID int | string The ID of the command as given by app.findMenuCommandID(), or if it is a string, the name of the command.

View Source Duik_api_fordoc.jsxinc, line 21152

# static getAeRender() → {File|null}

Gets the aerender binary

View Source Duik_api_fordoc.jsxinc, line 21094

The aerender binary, or null if not found
File | null

# static getAEVersion(versionAsFloatopt) → {DuVersion}

Gets the version of After Effects from its public name (like 13.8 for CC2015.3)
Parameters:
Name Type Attributes Description
versionAsFloat float <optional>
The version name.

View Source Duik_api_fordoc.jsxinc, line 21047

The version.
DuVersion

# static getAEVersionName(versionAsFloatopt) → {string}

Gets the public name of a version of After Effects (like CC2015.3 for version 13.8)
Parameters:
Name Type Attributes Description
versionAsFloat float <optional>
The version as a float. If not provided, will default to the current version of the running instance of After Effects.

View Source Duik_api_fordoc.jsxinc, line 21017

The version name.
string

# static getCompactExpression(matchName, nameopt, propopt)

Gets the compact expression synonym of a matchName
Parameters:
Name Type Attributes Description
matchName string The matchName of a property
name string <optional>
A replacement name (or index) in case the compact expression does not exist. If omitted, the matchName will be used.
prop Proeprty <optional>
The original property; may be needed to differenciate between 3D layers / cam / lights, etc

View Source Duik_api_fordoc.jsxinc, line 20911

# static getDuAEProperty(props) → {Array.<DuAEProperty>}

Gets the DuAEProperty for the properties
Parameters:
Name Type Description
props Array.<PropertyBase> The Properties

View Source Duik_api_fordoc.jsxinc, line 20971

The info
Array.<DuAEProperty>

# static getPref(section, key, fileopt, typeopt) → {any|null}

Gets a pref
Parameters:
Name Type Attributes Default Description
section string The section of the preferences
key string The key
file PREFType <optional>
PREFType.PREF_Type_MACHINE_SPECIFIC The preference file, from the PREFType enum value of the After Effects API
type DuAE.PrefType <optional>
DuAE.PrefType.STRING The type of the preference to return

View Source Duik_api_fordoc.jsxinc, line 20947

The pref or null if it does not exists
any | null

# static hasPref(section, key, fileopt) → {Boolean}

Checks if After Effects has the given preference
Parameters:
Name Type Attributes Default Description
section string The section of the preferences
key string The key
file PREFType <optional>
PREFType.PREF_Type_MACHINE_SPECIFIC The preference file, from the PREFType enum value of the After Effects API

View Source Duik_api_fordoc.jsxinc, line 20931

true if the pref exists
Boolean

# static isAutoSaveFolder(folder) → {boolean}

Checks if the Folder is an Auto-Save folder
Parameters:
Name Type Description
folder Folder | string The folder or path to check

View Source Duik_api_fordoc.jsxinc, line 21234

true if the folder is an auto-save folder
boolean

# static isDebuggerEnabled() → {Boolean}

Checks if the javascript debugger is enabled

View Source Duik_api_fordoc.jsxinc, line 21007

true if the debugger is enabled.
Boolean

# static isLayeredFile(fileopt) → {boolean}

Checks if the file is a layered type (psd, ai, psb, fla...)
Parameters:
Name Type Attributes Description
file String | File <optional>
The file or the path

View Source Duik_api_fordoc.jsxinc, line 20990

true if it's a layered file
boolean

# static isVersionAtLeast(versionName) → {boolean}

Checks if the current version is at least a given one
Parameters:
Name Type Description
versionName string The minimum version

View Source Duik_api_fordoc.jsxinc, line 21085

True if the current version is higher or the same
boolean

# static isVersionHigherThan(versionName) → {boolean}

Checks if the current version is higher than a given one
Parameters:
Name Type Description
versionName string The minimum version

View Source Duik_api_fordoc.jsxinc, line 21075

True if the current version is higher (strict, will be false if they're equal)
boolean

# static openScriptUIPanel(panelScriptName)

Opens a ScriptUI Panel if it is installed, or displays an alert otherwise.
Parameters:
Name Type Description
panelScriptName string The Script name of the panel "script.jsx"

View Source Duik_api_fordoc.jsxinc, line 21167

# static paste()

Pastes the selection (runs the paste menu command)

View Source Duik_api_fordoc.jsxinc, line 21218

# static scriptFolders(suboflderopt) → {Array.<Folder>}

Gets the list of folders where scripts may be installed
Parameters:
Name Type Attributes Description
suboflder string <optional>
The name of a subfolder, like "ScriptUI Panels" or "Startup" or "Shutdown"...

View Source Duik_api_fordoc.jsxinc, line 21263

the list of Folder objects.
Array.<Folder>

# static toggleLayerControls()

Shows/hides the layer controls

View Source Duik_api_fordoc.jsxinc, line 21254

# static undo()

Undoes (runs the undo command)

View Source Duik_api_fordoc.jsxinc, line 21225