Skip to content

Commit 04a9219

Browse files
author
John Colombo
committed
Add APIs for reading strings in dropdown menus
1 parent daedbc2 commit 04a9219

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

docs/property/property.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,38 @@ Integer; read-only.
460460

461461
---
462462

463+
### Property.propertyParameters
464+
465+
`app.project.item(index).layer(index).propertySpec.propertyParameters`
466+
467+
!!! note
468+
This functionality was added in After Effects (Beta) 26.0 and is subject to change while it remains in Beta.
469+
470+
#### Description
471+
472+
An array of all item strings in a dropdown menu property. This attribute applies to dropdown menu properties of effects and layers, including custom strings in the Menu property of the Dropdown Menu Control.
473+
474+
This property corresponds to [Property.setPropertyParameters()](#propertysetpropertyparameters), acting as the getter for the strings in a dropdown menu.
475+
476+
#### Examples
477+
478+
```javascript
479+
// Get all options from a Dropdown Menu Control
480+
var comp = app.project.activeItem;
481+
if (comp && comp.selectedLayers.length > 0) {
482+
var lyr = comp.selectedLayers[0];
483+
var fx = lyr.property("ADBE Effect Parade").property("Dropdown Menu Control");
484+
var menuProp = fx.property("Menu");
485+
var options = menuProp.propertyParameters; // Array of strings
486+
}
487+
```
488+
489+
#### Type
490+
491+
Array of strings; read-only.
492+
493+
---
494+
463495
### Property.propertyValueType
464496

465497
`app.project.item(index).layer(index).propertySpec.propertyValueType`
@@ -576,6 +608,36 @@ A value appropriate for the type of the property (see [Property.propertyValueTyp
576608

577609
---
578610

611+
### Property.valueText
612+
613+
`app.project.item(index).layer(index).propertySpec.valueText`
614+
615+
!!! note
616+
This functionality was added in After Effects (Beta) 26.0 and is subject to change while it remains in Beta.
617+
618+
#### Description
619+
620+
The text string of the currently-selected item in a dropdown menu property. This attribute applies to dropdown menu properties of effects and layers, including custom strings in the Menu property of Dropdown Menu Controls.
621+
622+
#### Examples
623+
624+
```javascript
625+
// Get the currently-selected text string from a Dropdown Menu Control
626+
var comp = app.project.activeItem;
627+
if (comp && comp.selectedLayers.length > 0) {
628+
var lyr = comp.selectedLayers[0];
629+
var fx = lyr.property("ADBE Effect Parade").property("Dropdown Menu Control");
630+
var menuProp = fx.property("Menu");
631+
var selectedText = menuProp.valueText; // e.g., "Sunday"
632+
}
633+
```
634+
635+
#### Type
636+
637+
String; read-only.
638+
639+
---
640+
579641
## Methods
580642

581643
### Property.addKey()

0 commit comments

Comments
 (0)