Environment:
•After Effects Version: Beta 25.2.0 (Build 122)
•Operating System: MacOS Sequioa 15.1
• Scripting Environment: ExtendScript
Description:
When attempting to programmatically select hold keyframes via scripting, the After Effects scripting API does not mark these keyframes as selected. This issue persists even when attempting common workarounds such as temporarily converting hold keyframes to linear interpolation, inserting dummy keyframes, or using both methods in combination. As a result, scripts that rely on selecting keyframes (e.g., for batch processing or automated editing tasks) fail to work as expected when hold keyframes are involved.
Steps to Reproduce:
1. Create a composition and add a layer with a property (e.g., Position) that has keyframes, including a hold keyframe (especially as the last keyframe).
2. Run a script that deselects all keyframes and then attempts to select specific keyframes using setSelectedAtKey(index, true).
3 .Verify that even after attempting temporary interpolation changes (or inserting a dummy keyframe), the hold keyframe remains unselected.
Expected Behavior:
The scripting API should allow hold keyframes to be marked as selected (or provide a reliable mechanism to do so) so that scripts can handle keyframe selection uniformly regardless of interpolation type.
Actual Behavior:
Hold keyframes remain unselectable via scripting. Even when workarounds are applied (e.g., temporarily switching to linear interpolation), the keyframe does not appear as selected. An error check that sums selectedKeys.length confirms that hold keyframes are not being included.
Impact:
This limitation prevents automated scripts from handling all keyframe types consistently. It forces users to either manually adjust keyframes or develop non-ideal workarounds that may alter the look of the animation (even if temporarily), potentially disrupting production workflows.
Request:
Please consider adding functionality to the After Effects scripting API that enables the selection of hold keyframes, or provide a documented method for programmatically handling hold keyframes without altering their interpolation permanently.
This is the script that I have been attempting to use, it selects all other keyframes as expected but fails to select or even throw an error when attempting to select Hold Keyframes.
https://pastebin.com/jvcAmGbr