@nexrender/core 1.50.4 → 1.50.7

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@nexrender/core",
3
- "version": "1.50.4",
3
+ "version": "1.50.7",
4
4
  "main": "src/index.js",
5
5
  "author": "Inlife",
6
6
  "homepage": "https://www.nexrender.com",
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "0fbddc7b524498cf83ff6fb67840bbd87eb35542"
40
+ "gitHead": "007bcea7cc5837f89de5087bc2e7337fea2838cb"
41
41
  }
@@ -2,12 +2,16 @@ const fs = require('fs')
2
2
  const os = require('os')
3
3
  const path = require('path')
4
4
 
5
- module.exports = (settings) => {
6
- const filename = 'ae_render_only_node.txt'
7
- const documents = path.join(os.homedir(), 'Documents')
8
- const adobe = path.join(documents, 'Adobe')
9
- const nodefile1 = path.join(documents, filename)
10
- const nodefile2 = path.join(adobe, filename)
5
+ const filename = 'ae_render_only_node.txt'
6
+ const documents = path.join(os.homedir(), 'Documents')
7
+ const adobe = path.join(documents, 'Adobe')
8
+ const nodefile1 = path.join(documents, filename)
9
+ const nodefile2 = path.join(adobe, filename)
10
+
11
+ const add = (settings) => {
12
+ if (!settings.addLicense) {
13
+ return false
14
+ }
11
15
 
12
16
  settings.logger.log('adding default render-only-node licenses for After Effects at:')
13
17
  settings.logger.log(' - ' + nodefile1)
@@ -33,4 +37,28 @@ module.exports = (settings) => {
33
37
  settings.track('Init Render License Added')
34
38
  settings.logger.log('added render-only-node licenses for After Effects')
35
39
  }
40
+
41
+ return applied
36
42
  }
43
+
44
+ const remove = (settings) => {
45
+ let removed = false
46
+
47
+ if (fs.existsSync(nodefile1)) {
48
+ fs.unlinkSync(nodefile1)
49
+ removed = true
50
+ }
51
+
52
+ if (fs.existsSync(nodefile2)) {
53
+ fs.unlinkSync(nodefile2)
54
+ removed = true
55
+ }
56
+
57
+ if (removed) {
58
+ settings.logger.log('removed render-only-node licenses for After Effects')
59
+ }
60
+
61
+ return removed
62
+ }
63
+
64
+ module.exports = { add, remove }
package/src/index.js CHANGED
@@ -114,9 +114,7 @@ const init = (settings) => {
114
114
  }
115
115
 
116
116
  // add license helper
117
- if (settings.addLicense) {
118
- license(settings);
119
- }
117
+ license.add(settings);
120
118
 
121
119
  // attempt to patch the default
122
120
  // Scripts/commandLineRenderer.jsx
@@ -277,7 +277,7 @@ Estimated date of change to the new behavior: 2023-06-01.\n`);
277
277
  fs.writeFileSync(logPath, outputStr);
278
278
 
279
279
  /* resolve job without checking if file exists, or its size for image sequences */
280
- if (settings.skipRender || job.template.imageSequence || ['jpeg', 'jpg', 'png', 'tif'].indexOf(outputFile) !== -1) {
280
+ if (settings.skipRender || job.template.imageSequence || ['jpeg', 'jpg', 'png', 'tif', 'tga'].indexOf(outputFile) !== -1) {
281
281
  settings.track('Job Render Finished', {
282
282
  job_id: job.uid, // anonymized internally
283
283
  job_finish_reason: 'skipped_check',
@@ -36,7 +36,7 @@ An example of how that might look like: { "outputModule": "h264", "outputExt": "
36
36
  }
37
37
 
38
38
  // NOTE: for still (jpg) image sequence frame filename will be changed to result_[#####].jpg
39
- if (job.template.outputExt && ['jpeg', 'jpg', 'png', 'tif'].indexOf(job.template.outputExt) !== -1) {
39
+ if (job.template.outputExt && ['jpeg', 'jpg', 'png', 'tif', 'tga'].indexOf(job.template.outputExt) !== -1) {
40
40
  job.resultname = 'result_[#####].' + job.template.outputExt;
41
41
  job.template.imageSequence = true;
42
42
  }