After Effects general tools
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
|
Object
# static CompactExpression
Associative array that converts property match names to their compact English expression statements.
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
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
|
int
# static readonly LayerPlacement
How to place new layers
Properties:
Name | Type | Description |
---|---|---|
BOTTOM |
int
|
|
UNDER_LAYER |
int
|
|
ABOVE_LAYER |
int
|
|
TOP |
int
|
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
|
string
# static readonly LoopType
Loop types
Properties:
Name | Type | Description |
---|---|---|
HOLD |
string
|
|
NONE |
string
|
|
CYCLE |
string
|
|
PINGPONG |
string
|
|
OFFSET |
string
|
|
CONTINUE |
string
|
int
# static readonly MenuCommandID
Menu Command Ids
These are the ids which can be found using
Use
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
|
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
|
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
|
string
# static readonly TimeAlignment
How to align in time
Properties:
Name | Type | Description |
---|---|---|
CENTER |
string
|
|
IN_POINT |
string
|
|
OUT_POINT |
string
|
int
# static readonly Type
Types of values
Properties:
Name | Type | Description |
---|---|---|
VALUE |
int
|
|
SPEED |
int
|
|
VELOCITY |
int
|
string
# static readonly Unit
Abbreviated units used in the UI.
These strings are localized based on internal After Effects dictionnaries.
These strings are localized based on internal After Effects dictionnaries.
Properties:
Name | Type | Description |
---|---|---|
PIXELS |
string
|
|
DEGREES |
string
|
|
PERCENT |
string
|
string
# static readonly UnitText
Units used in the UI
These strings are localized based on internal After Effects dictionnaries.
These strings are localized based on internal After Effects dictionnaries.
Properties:
Name | Type | Description |
---|---|---|
PERCENT |
string
|
|
DEGREES |
string
|
|
PIXELS |
string
|
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.
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. |
# static convertCollectionToArray(collection) → {Array}
Converts an AE Collection to an Array
This method is deprecated, you should use a
This method is deprecated, you should use a
DuList
otherwise
Parameters:
Name | Type | Description |
---|---|---|
collection |
Array
|
Collection
|
The collection to convert |
- Deprecated:
- Yes
The array
Array
# static copy()
Copies the selection (runs the copy menu command)
# static copyWithPropertyLinks()
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.
Only on versions of After Effects greater than 11.0 (CS6)
On CS6 and below, a standard copy will be done.
# static duplicate()
Duplcates the selection (runs the duplicate menu command)
# 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.
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. |
# 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. |
# static getAeRender() → {File|null}
Gets the aerender binary
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. |
The version.
# 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. |
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 |
# static getDuAEProperty(props) → {Array.<DuAEProperty>}
Gets the DuAEProperty for the properties
Parameters:
Name | Type | Description |
---|---|---|
props |
Array.<PropertyBase>
|
The Properties |
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 |
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 |
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 |
true if the folder is an auto-save folder
boolean
# static isDebuggerEnabled() → {Boolean}
Checks if the javascript debugger is enabled
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 |
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 |
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 |
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" |
# static paste()
Pastes the selection (runs the paste menu command)
# 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"... |
the list of Folder objects.
Array.<Folder>