@nexrender/core 1.60.12 → 1.61.1

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.60.12",
3
+ "version": "1.61.1",
4
4
  "main": "src/index.js",
5
5
  "author": "Inlife",
6
6
  "homepage": "https://www.nexrender.com",
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "f9a3dd372b155160769bba0100eaf6a76f120935"
46
+ "gitHead": "72e21f60d70b0a84489cccee7898fe8860ecfd33"
47
47
  }
@@ -13,6 +13,12 @@ var nexrender = {
13
13
  types: [CompItem, FolderItem, FootageItem, AVLayer, ShapeLayer, TextLayer, CameraLayer, LightLayer, Property, PropertyGroup],
14
14
  };
15
15
 
16
+ nexrender.log = function (message) {
17
+ if (gAECommandLineRenderer && gAECommandLineRenderer.log_file) {
18
+ gAECommandLineRenderer.log_file.writeln("NX: " + message);
19
+ }
20
+ };
21
+
16
22
  nexrender.typesMatch = function (types, layer) {
17
23
  return nexrender.types.filter(function (t) {
18
24
  return layer instanceof t;
@@ -253,7 +259,6 @@ nexrender.changeValueForKeypath = function (layer, keys, val) {
253
259
  change(layer, keys, val);
254
260
  };
255
261
 
256
-
257
262
  /* end of nexrender script */
258
263
  /* start of custom user script */
259
264
 
@@ -18,8 +18,22 @@ const EnhancedScript = require('./EnhancedScript')
18
18
  * @return string (String) The compiled script with parameter injection outside its original scope to avoid user-defined defaults collision.
19
19
  */
20
20
  const wrapEnhancedScript = (job, settings, { dest, src, parameters = [], keyword, defaults, /* ...asset */ }) => {
21
- const enhancedScript = new EnhancedScript(dest, src, parameters, keyword, defaults, job.uid, settings.logger);
21
+ const builtInParameters = [
22
+ { type: 'string', key: 'nxWorkpath', value: job.workpath },
23
+ { type: 'string', key: 'nxUID', value: job.uid },
24
+ ];
25
+
26
+ const enhancedScript = new EnhancedScript(
27
+ dest,
28
+ src,
29
+ [...builtInParameters, ...parameters],
30
+ keyword,
31
+ defaults,
32
+ job.uid,
33
+ settings.logger
34
+ );
35
+
22
36
  return enhancedScript.build();
23
37
  }
24
38
 
25
- module.exports = wrapEnhancedScript
39
+ module.exports = wrapEnhancedScript