@nexrender/core 1.39.4 → 1.40.0

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.
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@nexrender/core",
3
- "version": "1.39.4",
3
+ "version": "1.40.0",
4
4
  "main": "src/index.js",
5
5
  "author": "Inlife",
6
6
  "scripts": {
7
7
  "pkg-prelink": "node ../../misc/prelink.js"
8
8
  },
9
9
  "dependencies": {
10
- "@nexrender/types": "^1.38.0",
10
+ "@nexrender/types": "^1.40.0",
11
11
  "data-uri-to-buffer": "^3.0.0",
12
12
  "file-uri-to-path": "^2.0.0",
13
13
  "is-wsl": "^2.2.0",
@@ -30,5 +30,5 @@
30
30
  "publishConfig": {
31
31
  "access": "public"
32
32
  },
33
- "gitHead": "fd2070cc094a218062eecb4169ce732e045cfccc"
33
+ "gitHead": "9c2ab173beeed9a531a924841576ee71943817d3"
34
34
  }
@@ -103,7 +103,7 @@ nexrender.selectCompositionsByName = function(name, callback) {
103
103
  };
104
104
 
105
105
  /* call callback for an every layer matching specific name and composition */
106
- nexrender.selectLayersByName = function(compositionName, name, callback, types) {
106
+ nexrender.selectLayersByName = function(compositionName, name, callback, types, continueOnMissing) {
107
107
  var foundOnce = false;
108
108
 
109
109
  if (!compositionName) compositionName = nexrender.defaultCompositionName;
@@ -130,7 +130,7 @@ nexrender.selectLayersByName = function(compositionName, name, callback, types)
130
130
  }
131
131
  });
132
132
 
133
- if (!foundOnce) {
133
+ if (!foundOnce && !continueOnMissing) {
134
134
  throw new Error("nexrender: Couldn't find any layers by provided name (" + name + ") inside a composition: " + compositionName);
135
135
  }
136
136
  };
@@ -140,7 +140,8 @@ nexrender.selectLayersByType = function(
140
140
  compositionName,
141
141
  type,
142
142
  callback,
143
- types
143
+ types,
144
+ continueOnMissing
144
145
  ) {
145
146
  var foundOnce = false;
146
147
 
@@ -169,7 +170,7 @@ nexrender.selectLayersByType = function(
169
170
  }
170
171
  });
171
172
 
172
- if (!foundOnce) {
173
+ if (!foundOnce && !continueOnMissing) {
173
174
  throw new Error(
174
175
  "nexrender: Couldn't find any layers by provided type ("
175
176
  + type +
@@ -180,7 +181,7 @@ nexrender.selectLayersByType = function(
180
181
  };
181
182
 
182
183
  /* call callback for an every layer matching specific index and composition */
183
- nexrender.selectLayersByIndex = function(compositionName, index, callback, types) {
184
+ nexrender.selectLayersByIndex = function(compositionName, index, callback, types, continueOnMissing) {
184
185
  var foundOnce = false;
185
186
 
186
187
  if (!compositionName) compositionName = nexrender.defaultCompositionName;
@@ -194,7 +195,7 @@ nexrender.selectLayersByIndex = function(compositionName, index, callback, types
194
195
  }
195
196
  })
196
197
 
197
- if (!foundOnce) {
198
+ if (!foundOnce && !continueOnMissing) {
198
199
  throw new Error("nexrender: Couldn't find any layers by provided index (" + index + ") inside a composition: " + compositionName);
199
200
  }
200
201
  };
@@ -15,6 +15,7 @@ const defaultPaths = {
15
15
  '/Applications/Adobe After Effects 2022',
16
16
  '/Applications/Adobe After Effects CC 2021',
17
17
  '/Applications/Adobe After Effects CC 2022',
18
+ '/Applications/Adobe After Effects CC 2023',
18
19
  ],
19
20
  win32: [
20
21
  'C:\\Program Files\\Adobe\\After Effects CC',
@@ -28,6 +29,7 @@ const defaultPaths = {
28
29
  'C:\\Program Files\\Adobe\\After Effects 2020\\Support Files',
29
30
  'C:\\Program Files\\Adobe\\After Effects 2021\\Support Files',
30
31
  'C:\\Program Files\\Adobe\\After Effects 2022\\Support Files',
32
+ 'C:\\Program Files\\Adobe\\After Effects 2023\\Support Files',
31
33
 
32
34
  'C:\\Program Files\\Adobe\\Adobe After Effects CC',
33
35
  'C:\\Program Files\\Adobe\\Adobe After Effects CC\\Support Files',
@@ -40,6 +42,7 @@ const defaultPaths = {
40
42
  'C:\\Program Files\\Adobe\\Adobe After Effects 2020\\Support Files',
41
43
  'C:\\Program Files\\Adobe\\Adobe After Effects 2021\\Support Files',
42
44
  'C:\\Program Files\\Adobe\\Adobe After Effects 2022\\Support Files',
45
+ 'C:\\Program Files\\Adobe\\Adobe After Effects 2023\\Support Files',
43
46
  ],
44
47
  wsl: [
45
48
  '/mnt/c/Program Files/Adobe/After Effects CC',
@@ -53,6 +56,7 @@ const defaultPaths = {
53
56
  '/mnt/c/Program Files/Adobe/After Effects 2020/Support Files',
54
57
  '/mnt/c/Program Files/Adobe/After Effects 2021/Support Files',
55
58
  '/mnt/c/Program Files/Adobe/After Effects 2022/Support Files',
59
+ '/mnt/c/Program Files/Adobe/After Effects 2023/Support Files',
56
60
 
57
61
  '/mnt/c/Program Files/Adobe/Adobe After Effects CC',
58
62
  '/mnt/c/Program Files/Adobe/Adobe After Effects CC/Support Files',
@@ -65,6 +69,7 @@ const defaultPaths = {
65
69
  '/mnt/c/Program Files/Adobe/Adobe After Effects 2020/Support Files',
66
70
  '/mnt/c/Program Files/Adobe/Adobe After Effects 2021/Support Files',
67
71
  '/mnt/c/Program Files/Adobe/Adobe After Effects 2022/Support Files',
72
+ '/mnt/c/Program Files/Adobe/Adobe After Effects 2023/Support Files',
68
73
  ],
69
74
  }
70
75
 
@@ -1,4 +1,5 @@
1
1
  const rimraf = require('rimraf')
2
+ const path = require('path')
2
3
 
3
4
  /**
4
5
  * Clean up all workpath files and remove folder
@@ -11,12 +12,12 @@ module.exports = function(job, settings) {
11
12
 
12
13
  return new Promise((resolve) => {
13
14
  settings.logger.log(`[${job.uid}] cleaning up...`);
14
-
15
+
15
16
  // sometimes this attribute (workpath) is undefined
16
17
  if (!job.workpath) {
17
- job.workpath = settings.workpath.concat('/', job.uid, '/')
18
+ job.workpath = path.join(settings.workpath, job.uid)
18
19
  }
19
-
20
+
20
21
  rimraf(job.workpath, {glob: false}, (err) => {
21
22
  if (!err) {
22
23
  settings.logger.log(`[${job.uid}] Temporary AfterEffects project deleted. If you want to inspect it for debugging, use "--skip-cleanup"`)
@@ -190,6 +190,13 @@ module.exports = (job, settings) => {
190
190
  const existsMovOutputFile = fs.existsSync(movOutputFile)
191
191
  if (existsMovOutputFile) {
192
192
  job.output = movOutputFile
193
+ } else {
194
+ // AE 2023 use mp4 output files
195
+ const mp4OutputFile = outputFile.replace(/\.avi$/g, '.mp4')
196
+ const existsMp4OutputFile = fs.existsSync(mp4OutputFile)
197
+ if (existsMp4OutputFile) {
198
+ job.output = mp4OutputFile
199
+ }
193
200
  }
194
201
 
195
202
  if (!fs.existsSync(job.output)) {
@@ -12,12 +12,11 @@ const escape = str => {
12
12
  return str
13
13
  }
14
14
 
15
- const selectLayers = ({ composition, layerName, layerIndex }, callbackString) => {
15
+ const selectLayers = ({ composition, layerName, layerIndex, continueOnMissing }, callbackString) => {
16
16
  const method = layerName ? 'selectLayersByName' : 'selectLayersByIndex';
17
17
  const compo = composition === undefined ? 'null' : escape(composition);
18
18
  const value = layerName ? escape(layerName) : layerIndex;
19
-
20
- return (`nexrender.${method}(${compo}, ${value}, ${callbackString});`);
19
+ return (`nexrender.${method}(${compo}, ${value}, ${callbackString},null,${continueOnMissing});`);
21
20
  }
22
21
 
23
22
  const renderIf = (value, string) => {