From 24d84b46e013fd43ad89dc5607edeaf1db92d367 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 20 Jan 2021 15:01:22 +0100 Subject: [PATCH] Harmon to Deadline - performance speedup because of Harmony 17 extract_template is extremely slow in 17, copy full scene for a workfile --- pype/plugins/harmony/publish/extract_workfile.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/pype/plugins/harmony/publish/extract_workfile.py b/pype/plugins/harmony/publish/extract_workfile.py index 09bf0db860..be0444f0e6 100644 --- a/pype/plugins/harmony/publish/extract_workfile.py +++ b/pype/plugins/harmony/publish/extract_workfile.py @@ -10,7 +10,7 @@ import pype.hosts.harmony class ExtractWorkfile(pype.api.Extractor): - """Extract the connected nodes to the composite instance.""" + """Extract and zip complete workfile folder into zip.""" label = "Extract Workfile" hosts = ["harmony"] @@ -18,15 +18,11 @@ class ExtractWorkfile(pype.api.Extractor): def process(self, instance): """Plugin entry point.""" - # Export template. - backdrops = harmony.send( - {"function": "Backdrop.backdrops", "args": ["Top"]} - )["result"] - nodes = instance.context.data.get("allNodes") staging_dir = self.staging_dir(instance) filepath = os.path.join(staging_dir, "{}.tpl".format(instance.name)) - - pype.hosts.harmony.export_template(backdrops, nodes, filepath) + src = os.path.dirname(instance.context.data["currentFile"]) + self.log.info("Copying to {}".format(filepath)) + shutil.copytree(src, filepath) # Prep representation. os.chdir(staging_dir)