From 5f302eb95c970618497ed85b9e1ebbf713423963 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 11 Nov 2022 12:20:19 +0100 Subject: [PATCH] OP-4361 - streamline local render Do not do get render queue again, should be already collected. --- .../plugins/publish/extract_local_render.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/aftereffects/plugins/publish/extract_local_render.py b/openpype/hosts/aftereffects/plugins/publish/extract_local_render.py index f2ae91c341..309855f1c7 100644 --- a/openpype/hosts/aftereffects/plugins/publish/extract_local_render.py +++ b/openpype/hosts/aftereffects/plugins/publish/extract_local_render.py @@ -21,30 +21,32 @@ class ExtractLocalRender(publish.Extractor): def process(self, instance): stub = get_stub() staging_dir = instance.data["stagingDir"] - self.log.info("staging_dir::{}".format(staging_dir)) + self.log.debug("staging_dir::{}".format(staging_dir)) - # pull file name from Render Queue Output module - comp_id = instance.data['comp_id'] - render_q = stub.get_render_info(comp_id) # re queue render item - if not render_q: + # pull file name collected value from Render Queue Output module + if not instance.data["file_name"]: raise ValueError("No file extension set in Render Queue") + comp_id = instance.data['comp_id'] stub.render(staging_dir, comp_id) - _, ext = os.path.splitext(os.path.basename(render_q.file_name)) + _, ext = os.path.splitext(os.path.basename(instance.data["file_name"])) ext = ext[1:] first_file_path = None files = [] for file_name in os.listdir(staging_dir): + if not file_name.endswith(ext): + continue + files.append(file_name) if first_file_path is None: first_file_path = os.path.join(staging_dir, file_name) - self.log.debug("files::{}".format(os.listdir(staging_dir))) if not files: - raise ValueError("Nothing rendered!") + self.log.info("no files") + return resulting_files = files if len(files) == 1: