property()

app.project.item(index).layer(index).propertyGroupSpec.property(index)
app.project.item(index).layer(index).propertyGroupSpec.property(name)

Description

Finds and returns a child property of this group, as specified by either its index or name.

A name specification can use the same syntax that is available with expressions. The following are all allowed and are equivalent:
mylayer.position
mylayer(position")
mylayer.property("position")
mylayer(1)
mylayer.property(1)

Some properties of a layer, such as position and zoom, can be accessed only by name.

When using the name to find a property that is multiple levels down, you must make more than one call to this method. For example, the following call searches two levels down, and returns the first mask in the mask group:

myLayer.property(“ADBE Masks”).property(1)

Parameters

index The index for the child property, in this is an indexed group. An integer in the range [0..numProperties].

name The name of the child property. This can be:
• Any match name
• Any name in expression “parenthesis style” syntax, meaning the display name or the compact English name
• Any name in expression “intercap style” syntax For supported property names, see the table below.

Returns

PropertyBase object or null if no child property with the specified string name is found.

Properties accessible by name

From any Layer

• “ADBE Mask Parade”, or “Masks”
• “ADBE Effect Parade”, or “Effects”
• “ADBE MTrackers”, or “Motion Trackers” From an AVLayer • “Anchor Point” or “anchorPoint”
• “Position” or “position”
• “Scale” or “scale”
• “Rotation” or “rotation”
• “Z Rotation” or “zRotation” or “Rotation Z” or “rotationZ”
• “Opacity” or “opacity”
• “Marker” or “marker”
From an AVLayer with a non-still source • “Time Remap” or “timeRemapEnabled”
From an AVLayer with an audio component • “Audio Levels” or “audioLevels”
From a camera layer • “Zoom” or “zoom”
• “Depth of Field” or “depthOfField”
• “Focus Distance” or “focusDistance”
• “Aperture” or “aperture”
• “Blur Level” or “blurLevel”
From a light layer • “Intensity” or “intensity”
• “Color” or “color”
• “Cone Angle” or “coneAngle”
• “Cone Feather” or “coneFeather”
• “Shadow Darkness” or “shadowDarkness”
• “Shadow Diffusion” or “shadowDiffusion”
• “Casts Shadows” or “castsShadows”
From a 3D layer
• “Accepts Shadows” or “acceptsShadows”
• “Accepts Lights” or “acceptsLights”
• “Ambient” or “ambient”
• “Diffuse” or “diffuse”
• “Specular” or “specular” (these are for the Specular Intensity property)
• “Shininess” or “shininess” (these are for the Specular Shininess property)
• “Casts Shadows” or “castsShadows”
• “Light Transmission” or “lightTransmission”
• “Metal” or “metal”
From a camera, light or 3D layer • “X Rotation” or “xRotation” or “Rotation X” or “rotationX”
• “Y Rotation” or “yRotation” or “Rotation Y” or “rotationY”
• “Orientation” or “orientation”
From a text layer • “Source Text” or “sourceText” or “Text” or “text”
From a PropertyGroup “ADBE Mask Parade” • “ADBE Mask Atom”
From a PropertyGroup “ADBE Mask Atom” • “ADBE Mask Shape”, or “maskShape”, or “maskPath”
• “ADBE Mask Feather”, or “maskFeather”
• “ADBE Mask Opacity”, or “maskOpacity”
• “ADBE Mask Offset”, or “maskOffset”
Examples
1 If a layer named “myLayer” has a Box Blur effect, you can retrieve the effect in any of the following ways:
myLayer.property("Effects").property("Box Blur");

myLayer.property("Effects").property("boxBlur");
myLayer.property("Effects").property("ADBE Box Blur");

2 If a layer named “myLayer” has a mask named “Mask 1″ you can retrieve it as follows:
myLayer.property("Masks").property("Mask 1");
3 To get a Bulge Center value from a Bulge effect, you can use either of the following:
myLayer.property("Effects").property("Bulge").property("Bulge Center");
myL ayer.prop erty("Effec ts").proper ty("Bulge").propert y("bulgeC enter");

Other Tags

Posted in PropertyGroup object and tagged , , , , , , , , , , , , , , , , , , .