propertyValueType

app.project.item(index).layer(index).propertySpec.propertyValueType

Description

The type of value stored in thenamed property. The PropertyValueType enumeration has one value for each type of data that can be stored in or retrieved from a property. Each type of data is stored and retrieved in a different kind of structure. All property objects store data according to one of these categories.

For example, a 3D spatial property (such as a layer’s position) is stored as an array of three floating point values. When setting a value for position, pass in such an array, as follows:

mylayer.property(position”).setValue([10 ,20,0]); In contrast, a shape property (such as a layer’s mask shape) is stored as a Shape object. When setting a value for a shape, pass a Shape object, as follows:

var myShape = new Shape();
myShape.vertices = [[0,0],[0,100],[100,100],[100,0]];
var myMask = mylayer.property(“ADBE Mask Parade”).property(1);
myMask.property(“ADBE Mask Shape”).setValue(myShape);

Type

A PropertyValueType enumerated value; read/write. One of:

E

PropertyValueType.NO_VALUE Stores no data.
PropertyValueType.ThreeD_S PATIAL Array of three floating-point positional values. For example, an Anchor Point value might be [10.0, 20.2, 0.0]
PropertyValueType.ThreeD Array of three floating-point quantitative values. For example, a Scale value might be [100.0, 20.2, 0.0]
PropertyValueType.TwoD_SPATIAL Array of 2 floating-point positional values For example, an Anchor Point value might be [5.1, 10.0]
PropertyValueType.TwoD Array of 2 floating-point quantitative values. For example, a Scale value might be [5.1, 100.0]
PropertyValueType.OneD A floating-point value.
PropertyValueType.COLOR Array of 4 floating-point values in the range [0.0..1.0]. For example, [0.8, 0.3, 0.1, 1.0]
PropertyValueType.CUSTOM_VALUE Custom property value, such as the Histogram property for the Levels effect.
PropertyValueType.MARKER MarkerValue object;
PropertyValueType.LAYER_INDEX Integer; a value of 0 means no layer.
PropertyValueType.MASK_INDEX Integer; a value of 0 means no mask.
PropertyValueType.SHAPE Shape object;
PropertyValueType.TEXT_DOCUMENT TextDocument object;

Other Tags

Posted in Property object and tagged , , , , , , , , , , , , , .