-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEF_ExportMissingFootagesPathsToFile.jsx
44 lines (37 loc) · 1.58 KB
/
EF_ExportMissingFootagesPathsToFile.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
33
34
35
36
37
38
39
40
41
42
43
44
/**========================================================================
* ? EF_ExportMissingFootagesPathsToFile.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 : Saves a list of all the missing footages in a project to a text file.
*========================================================================**/
(function exportMissingFootagesPathsToFile(){
var projectItems = app.project.items;
var missingItems = [];
var projectPath = app.project.file;
// Pushes every missing footage to the missingItems Array
for(var item = 1; item <= projectItems.length; item++){
if(projectItems[item].footageMissing){
var footagePath = projectItems[item].mainSource.missingFootagePath;
missingItems.push(footagePath);
}
}
// If project is saved
if(projectPath != null){
var filePath = projectPath.toString().replace(".aep", "");
} else {
alert("Save your project to continue.")
}
// Separates each item with a line break
var missingItemsString = missingItems.join("\n");
// Prompt to save the file
var file = new File(filePath + "_MissingFiles.txt").saveDlg("Select the file destination.", "*.txt");
// Write the file
if (file != null) {
file.open("w");
file.write(missingItemsString);
file.close();
}
// alert(typeof missingItemsString === "string")
})()