-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEF_CleanPropertyKeyframes.jsx
32 lines (28 loc) · 1.31 KB
/
EF_CleanPropertyKeyframes.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**========================================================================
* ? EF_CleanPropertyKeyframes.jsx
* @author : Eveline Falcão (https://evelinefalcao.com)
* @email : [email protected]
* @version : 1.0.0
* @createdFor : Adobe After Effects CC 2024 (Version 24.1.0 Build 78)
* @description : Removes all keyframes from selected properties. Supports multiple layer and property selections.
*========================================================================**/
(function cleanPropertyKeyframes(){
app.beginUndoGroup("Clean property keyframes.")
var comp = app.project.activeItem;
if (comp instanceof CompItem && comp != null) {
var allProperties = comp.selectedProperties;
if (allProperties.length > 0){
for (var property = 0; property < allProperties.length; property++) {
var selectedProperty = allProperties[property];
while(selectedProperty.numKeys > 0) {
selectedProperty.removeKey(1);
}
}
} else {
alert("Select a property within a layer.")
}
} else {
alert("Select your active Comp in the project panel or timeline.")
}
app.endUndoGroup();
})();