PropertyInfo(property)

Get some handy informations about a property
This class is able to "fix" effects properties which have been broken by the addition of another effect on the same layer, as long as the class has been instanciated before the effect has been broken.

new PropertyInfo(property)

Constructs a new PropertyInfo
Parameters:
Name Type Description
property PropertyBase | PropertyInfo The property. If a PropertyInfo is provided, the constructor returns it (it does not make a copy).
This makes it easy to avoid type checking, as you can always pass any property or PropertyInfo to the constructor to be sure to handle a PropertyInfo, without any impact on performance.
Properties:
Name Type Description
index int The propertyIndex
isEffect boolean true if this is an effect (sub)property
riggable boolean true if this prop can be rigged (it's a value which can set expressions)
layer Layer The layer containing the property
dimensions int The number of dimensions, 0 if this is not a dimensionnal value (text, shape...)
name string The name of the property
matchName string The matchName of the property
effect PropertyGroup | null The effect containing the property
editable boolean true if the value of the property can be changed
numerical boolean true if the value is a number or an array of numbers
isPercent boolean true if the unit is a percentage
isAngle boolean true if the unit is a degree
isPixels boolean true if the unit is a pixel
numKeys int the number of keyframes on the property
group bool true if the property is a PropertyGroup
unitsText string the name of the unit (localized)
unit string the abbreviated unit, as displayed in the UI (localized)
expression string the expression in the property
Examples
var propInfo = new PropertyInfo(property);
layer("ADBE effect parade").addProperty("ADBE layer control"); //now the property object is broken
property = propInfo.getProperty(); // You can retrieve the property like this, fixed if it's an effect
myFunction (prop) //This function can be passed either a property or a PropertyInfo
{
propInfo = new PropertyInfo(prop);
prop = propInfo.getProperty();
}

Methods

getProperty() → {PropertyBase}

Gets the original Property
Always works even if this PropertyInfo represents an effect which has been broken
---AE Hack---
Returns:
PropertyBase - The property
To Do:
  • When returning an effect, check if the matchName corresponds too.