diff --git a/pype/hosts/harmony/js/PypeHarmony.js b/pype/hosts/harmony/js/PypeHarmony.js index 57137d98c6..504bcc9ba2 100644 --- a/pype/hosts/harmony/js/PypeHarmony.js +++ b/pype/hosts/harmony/js/PypeHarmony.js @@ -183,11 +183,11 @@ PypeHarmony.color = function(rgba) { /** * get all dependencies for given node. * @function - * @param {string} node node path. + * @param {string} _node node path. * @return {array} List of dependent nodes. */ -PypeHarmony.getDependencies = function(node) { - var target_node = node; +PypeHarmony.getDependencies = function(_node) { + var target_node = _node; var numInput = node.numberOfInputPorts(target_node); var dependencies = []; for (var i = 0 ; i < numInput; i++) { diff --git a/pype/plugins/harmony/publish/extract_palette.py b/pype/plugins/harmony/publish/extract_palette.py index 0996079dea..029a4f0f11 100644 --- a/pype/plugins/harmony/publish/extract_palette.py +++ b/pype/plugins/harmony/publish/extract_palette.py @@ -38,7 +38,7 @@ class ExtractPalette(pype.api.Extractor): os.path.basename(palette_file) .split(".plt")[0] + "_swatches.png" ) - self.log.info(f"Temporary humbnail path {tmp_thumb_path}") + self.log.info(f"Temporary thumbnail path {tmp_thumb_path}") palette_version = str(instance.data.get("version")).zfill(3) @@ -52,6 +52,11 @@ class ExtractPalette(pype.api.Extractor): palette_version, palette_file, tmp_thumb_path) + except OSError as e: + # FIXME: this happens on Mac where PIL cannot access fonts + # for some reason. + self.log.warning("Thumbnail generation failed") + self.log.warning(e) except ValueError: self.log.error("Unsupported palette type for thumbnail.") diff --git a/pype/plugins/harmony/publish/extract_template.py b/pype/plugins/harmony/publish/extract_template.py index 06c4c1efcf..b8437c85ea 100644 --- a/pype/plugins/harmony/publish/extract_template.py +++ b/pype/plugins/harmony/publish/extract_template.py @@ -31,7 +31,11 @@ class ExtractTemplate(pype.api.Extractor): for backdrop in self.get_backdrops(dependency): backdrops[backdrop["title"]["text"]] = backdrop unique_backdrops = [backdrops[x] for x in set(backdrops.keys())] - + if not unique_backdrops: + self.log.error(("No backdrops detected for template. " + "Please move template instance node onto " + "some backdrop and try again.")) + raise AssertionError("No backdrop detected") # Get non-connected nodes within backdrops. all_nodes = instance.context.data.get("allNodes") for node in [x for x in all_nodes if x not in dependencies]: