From 14bbb992be7cc3b26a81232b0687b9a7fd92aaeb Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Tue, 2 Feb 2021 14:32:35 +0100 Subject: [PATCH] Harmony - fix - use of correct PypeHarmony name Fixed wrong condition Used $ fallback --- pype/hosts/harmony/js/PypeHarmony.js | 3 ++- pype/hosts/harmony/js/creators/CreateRender.js | 6 +++--- .../hosts/harmony/js/loaders/ImageSequenceLoader.js | 13 +++++++++---- pype/hosts/harmony/js/loaders/TemplateLoader.js | 10 ++++++---- pype/hosts/harmony/js/publish/CollectCurrentFile.js | 6 +++--- pype/hosts/harmony/js/publish/CollectFarmRender.js | 6 +++--- pype/hosts/harmony/js/publish/CollectPalettes.js | 6 +++--- pype/hosts/harmony/js/publish/ExtractPalette.js | 7 +++---- pype/hosts/harmony/js/publish/ExtractTemplate.js | 6 +++--- 9 files changed, 35 insertions(+), 28 deletions(-) diff --git a/pype/hosts/harmony/js/PypeHarmony.js b/pype/hosts/harmony/js/PypeHarmony.js index 9d05384461..41c8dc56ce 100644 --- a/pype/hosts/harmony/js/PypeHarmony.js +++ b/pype/hosts/harmony/js/PypeHarmony.js @@ -4,7 +4,8 @@ // *************************************************************************** var LD_OPENHARMONY_PATH = System.getenv('LIB_OPENHARMONY_PATH'); -include(LD_OPENHARMONY_PATH + '/openHarmony.js'); +LD_OPENHARMONY_PATH = LD_OPENHARMONY_PATH + '/openHarmony.js'; +LD_OPENHARMONY_PATH = LD_OPENHARMONY_PATH.replace(/\\/g, "/"); diff --git a/pype/hosts/harmony/js/creators/CreateRender.js b/pype/hosts/harmony/js/creators/CreateRender.js index d8283ea30b..cfb0701df4 100644 --- a/pype/hosts/harmony/js/creators/CreateRender.js +++ b/pype/hosts/harmony/js/creators/CreateRender.js @@ -5,9 +5,9 @@ // check if PypeHarmony is defined and if not, load it. -if (typeof PypeHarmony !== 'undefined') { - var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS'); - include(PYPE_HARMONY_JS + '/pype_harmony.js'); +if (typeof PypeHarmony === 'undefined') { + var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js'; + include(PYPE_HARMONY_JS.replace(/\\/g, "/")); } diff --git a/pype/hosts/harmony/js/loaders/ImageSequenceLoader.js b/pype/hosts/harmony/js/loaders/ImageSequenceLoader.js index 3e2c853146..cfa71e2834 100644 --- a/pype/hosts/harmony/js/loaders/ImageSequenceLoader.js +++ b/pype/hosts/harmony/js/loaders/ImageSequenceLoader.js @@ -3,13 +3,15 @@ // * ImageSequenceLoader * // *************************************************************************** - // check if PypeHarmony is defined and if not, load it. -if (typeof PypeHarmony !== 'undefined') { - var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS'); - include(PYPE_HARMONY_JS + '/pype_harmony.js'); +if (typeof PypeHarmony === 'undefined') { + var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js'; + include(PYPE_HARMONY_JS.replace(/\\/g, "/")); } +if (typeof $ === 'undefined'){ + $ = this.__proto__['$']; +} /** * @namespace @@ -92,6 +94,9 @@ ImageSequenceLoader.getUniqueColumnName = function(columnPrefix) { * ]; */ ImageSequenceLoader.prototype.importFiles = function(args) { + MessageLog.trace("ImageSequence:: " + typeof PypeHarmony); + MessageLog.trace("ImageSequence $:: " + typeof $); + MessageLog.trace("ImageSequence OH:: " + typeof PypeHarmony.OpenHarmony); var PNGTransparencyMode = 0; // Premultiplied wih Black var TGATransparencyMode = 0; // Premultiplied wih Black var SGITransparencyMode = 0; // Premultiplied wih Black diff --git a/pype/hosts/harmony/js/loaders/TemplateLoader.js b/pype/hosts/harmony/js/loaders/TemplateLoader.js index 0a0b5706d7..160979f943 100644 --- a/pype/hosts/harmony/js/loaders/TemplateLoader.js +++ b/pype/hosts/harmony/js/loaders/TemplateLoader.js @@ -5,12 +5,14 @@ // check if PypeHarmony is defined and if not, load it. -if (typeof PypeHarmony !== 'undefined') { - var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS'); - include(PYPE_HARMONY_JS + '/pype_harmony.js'); +if (typeof PypeHarmony === 'undefined') { + var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js'; + include(PYPE_HARMONY_JS.replace(/\\/g, "/")); } - +if (typeof $ === 'undefined'){ + $ = this.__proto__['$']; +} /** * @namespace * @classdesc Image Sequence loader JS code. diff --git a/pype/hosts/harmony/js/publish/CollectCurrentFile.js b/pype/hosts/harmony/js/publish/CollectCurrentFile.js index 61cf31ef9d..d39f23712d 100644 --- a/pype/hosts/harmony/js/publish/CollectCurrentFile.js +++ b/pype/hosts/harmony/js/publish/CollectCurrentFile.js @@ -5,9 +5,9 @@ // check if PypeHarmony is defined and if not, load it. -if (typeof PypeHarmony !== 'undefined') { - var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS'); - include(PYPE_HARMONY_JS + '/pype_harmony.js'); +if (typeof PypeHarmony === 'undefined') { + var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js'; + include(PYPE_HARMONY_JS.replace(/\\/g, "/")); } diff --git a/pype/hosts/harmony/js/publish/CollectFarmRender.js b/pype/hosts/harmony/js/publish/CollectFarmRender.js index 70d2aa5aa9..7c0cda5165 100644 --- a/pype/hosts/harmony/js/publish/CollectFarmRender.js +++ b/pype/hosts/harmony/js/publish/CollectFarmRender.js @@ -5,9 +5,9 @@ // check if PypeHarmony is defined and if not, load it. -if (typeof PypeHarmony !== 'undefined') { - var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS'); - include(PYPE_HARMONY_JS + '/pype_harmony.js'); +if (typeof PypeHarmony === 'undefined') { + var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js'; + include(PYPE_HARMONY_JS.replace(/\\/g, "/")); } diff --git a/pype/hosts/harmony/js/publish/CollectPalettes.js b/pype/hosts/harmony/js/publish/CollectPalettes.js index b2ed9aa761..8fda55ff75 100644 --- a/pype/hosts/harmony/js/publish/CollectPalettes.js +++ b/pype/hosts/harmony/js/publish/CollectPalettes.js @@ -5,9 +5,9 @@ // check if PypeHarmony is defined and if not, load it. -if (typeof PypeHarmony !== 'undefined') { - var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS'); - include(PYPE_HARMONY_JS + '/pype_harmony.js'); +if (typeof PypeHarmony === 'undefined') { + var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js'; + include(PYPE_HARMONY_JS.replace(/\\/g, "/")); } diff --git a/pype/hosts/harmony/js/publish/ExtractPalette.js b/pype/hosts/harmony/js/publish/ExtractPalette.js index bc63dcdc7a..794c6fdbb1 100644 --- a/pype/hosts/harmony/js/publish/ExtractPalette.js +++ b/pype/hosts/harmony/js/publish/ExtractPalette.js @@ -5,12 +5,11 @@ // check if PypeHarmony is defined and if not, load it. -if (typeof PypeHarmony !== 'undefined') { - var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS'); - include(PYPE_HARMONY_JS + '/pype_harmony.js'); +if (typeof PypeHarmony === 'undefined') { + var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js'; + include(PYPE_HARMONY_JS.replace(/\\/g, "/")); } - /** * @namespace * @classdesc Code for extracting palettes. diff --git a/pype/hosts/harmony/js/publish/ExtractTemplate.js b/pype/hosts/harmony/js/publish/ExtractTemplate.js index eb3668f833..d36a8947f8 100644 --- a/pype/hosts/harmony/js/publish/ExtractTemplate.js +++ b/pype/hosts/harmony/js/publish/ExtractTemplate.js @@ -5,9 +5,9 @@ // check if PypeHarmony is defined and if not, load it. -if (typeof PypeHarmony !== 'undefined') { - var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS'); - include(PYPE_HARMONY_JS + '/pype_harmony.js'); +if (typeof PypeHarmony === 'undefined') { + var PYPE_HARMONY_JS = System.getenv('PYPE_HARMONY_JS') + '/PypeHarmony.js'; + include(PYPE_HARMONY_JS.replace(/\\/g, "/")); }