kt-forpro-tools 1.0.10 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/utils.ts +16 -15
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kt-forpro-tools",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
4
4
  "description": "",
5
5
  "author": "Miguel de Mendoza",
6
6
  "main": "src/index.ts",
package/src/utils.ts CHANGED
@@ -19,20 +19,17 @@ function generateProjectStructure(
19
19
  return newFolder;
20
20
  }
21
21
 
22
- export function createCleanupStructure(name: string = "Project"): FolderItem {
23
- return generateProjectStructure(
24
- {
25
- src: {
26
- esp: {},
27
- cat: {},
28
- },
29
- outputs: {
30
- esp: {},
31
- cat: {},
32
- },
22
+ export function createCleanupStructure(name: string): FolderItem {
23
+ return generateProjectStructure({
24
+ src: {
25
+ esp: {},
26
+ cat: {},
27
+ },
28
+ outputs: {
29
+ esp: {},
30
+ cat: {},
33
31
  },
34
- name + " Cleanup"
35
- );
32
+ });
36
33
  }
37
34
 
38
35
  class __KT_FP_Utils {
@@ -73,9 +70,13 @@ class __KT_FP_Utils {
73
70
  precompAndKeyOut = (lang: string = "esp") => {
74
71
  const footagePaths = [KT_Project.path.join("//src", lang)];
75
72
  const footageItems = KT_Project.find.footage({ relativePath: footagePaths });
76
- const parenFolderPath = KT_Project.path.join("//outputs", lang);
77
- const parentFolder = KT_Project.find.folders(parenFolderPath)[0] || app.project.rootFolder;
73
+ if (footageItems.length === 0) {
74
+ return;
75
+ }
78
76
  const createdComps = this.cleanNamePrecomp(footageItems);
77
+
78
+ const outputFolderPath = KT_Project.path.join("//outputs", lang);
79
+ const parentFolder = KT_Project.find.folders(outputFolderPath)[0] || app.project.rootFolder;
79
80
  KT_Project.move.move(createdComps, parentFolder);
80
81
  const presetsPath = IO.path.sanitize(
81
82
  "C:/Users/orson/Documents/Adobe/After Effects 2025/User Presets/IEF_Chroma.ffx"