Skip to main content
Justin Taylor-Hyper Brew
Community Expert
Community Expert
September 29, 2022
Open for Voting

Batch Keyframe Label and Value Methods for AE in the API

  • September 29, 2022
  • 2 replies
  • 429 views

Per @Tim Kurkoski 's suggestion ( https://twitter.com/tkurkoski/status/1574877636031311872 ) I'd like to request the ability to batch modify keyframes through the ExtendScript API, specifically for labels and values. ( Basing off of the existing format for prop.setValuesAtTimes() )

// current

prop.setLabelAtKey(index, color);
prop.setValueAtKey(index, value);

// proposed

prop.setLabelsAtKeys([indexA, indexB, indexC], [colorA, colorB, colorC]]);
prop.setValuesAtKeys([indexA, indexB, indexC], [valueA, valueB, valueC]]);

2 replies

JohnColombo17100380
Community Manager
Community Manager
September 29, 2022

Thanks @Justin Taylor-Hyper Brew! This is a great request. Much appreciated! 

- John, After Effects Engineering Team 

TimKurkoski
Community Manager
Community Manager
September 29, 2022

Upvoted!

 

Worth providing context that it's already possible to set the label for an individual keyframe via scripting, using the methods described here:
https://community.adobe.com/t5/after-effects-beta-discussions/updates-to-keyframe-color-labels/m-p/12941519

(We're working on getting the scripting guide updated.)

 

What the new functionality I suggested would be to set the labels on multiple keys at once, which could tie into the existing behavior After Effects performs when you select multiple keyframes in the UI and change them to the same label value. i.e., Right-click on one of the selected keyframes > Label > (insert your favorite label color).

 

I imagine that this functionality would take one of two different forms, depending on the feasibility/difficulty:

1. prop.setMultipleLabelsAtKeys([keyIndex, labelIndex])

2. prop.setMultipleLabelsAtKeys([keyIndex], labelIndex)

 

The difference being that #1 accepts a single, two-dimensional array that would allow you to set the label color of every key individually. That's new and pretty handy functionality, but I would need a dev to verify that this wouldn't require a ton of extra work.  #2 would do what After Effects is capable of via the UI, which is set every keyframe in the array to the same label color.