Class

DuAEPseudoEffect

DuAEPseudoEffect(binaryFile)

Describes a pseudo effect
Constructor

# new DuAEPseudoEffect(binaryFile)

Constructs a Pseudo Effect.
Parameters:
Name Type Description
binaryFile DuBinary The ffx file encoded as a DuBinary.
Note that the pseudo effect's matchName must start with "Pseudo/".
Properties:
Name Type Description
name string The default (localized) name
matchName string The matchName
valid boolean * Will be false if the ffx can't be correctly parsed.
Note that an invalid pseudo effect can still be applied (if the file exists), but the new effect may not be returned,
or the DuAEPseudoEffect.props Object may be empty.
file File The ffx file.
props Object An object containing information about the properties of the effect, which can be used to generate expressions.
Access properties with their names, using the group hierarchy.
The info available for each property depends on the original pseudo effect, but there's at least the type and the index of the property.

View Source Duik_api_fordoc.jsxinc, line 33076

Members

File

# static readonly file

The ffx file

View Source Duik_api_fordoc.jsxinc, line 33236

string

# static readonly matchName

The matchName

View Source Duik_api_fordoc.jsxinc, line 33108

string

# static readonly name

The default (localized) name

View Source Duik_api_fordoc.jsxinc, line 33129

Object

# static readonly props

An object containing information about the properties of the effect, which can be used to generate expressions.
Access properties with their names, using the group hierarchy.
The info available for each property depends on the original pseudo effect, but there's at least the type and the index of the property.

View Source Duik_api_fordoc.jsxinc, line 33169

Example
var pseudoEffect = new DuAEPseudoEffect( pseudoEffectBin );
var propIndex = pseudoEffect.props["groupName"]["PropertyName"].index;
var effect = pseudoEffect.apply( aLayer );
var expression = 'thisLayer.effect("' + pseudoEffect.name + '")(' + propIndex + ');';
Boolean

# static readonly valid

Will be false if the ffx can't be correctly parsed.
Note that an invalid pseudo effect can still be applied (if the file exists), but the new effect may not be returned,
or the DuAEPseudoEffect.index Object may be empty.

View Source Duik_api_fordoc.jsxinc, line 33095

Methods

# apply(layer, nameopt) → {PropertyGroup|null}

This method adds the pseudo effect to a layer
Parameters:
Name Type Attributes Default Description
layer Layer The layer
name string <optional>
this.name A name for the effect

View Source Duik_api_fordoc.jsxinc, line 33253

The effect. May be null if the pseudo effect was not parsed correctly
PropertyGroup | null