From ec54515b8caf08773ef721b6a9e7a6edc3e4ecb5 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Wed, 28 Jun 2023 12:53:28 +0200 Subject: [PATCH] Fix - correct resolution of published workile path --- openpype/modules/royalrender/lib.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openpype/modules/royalrender/lib.py b/openpype/modules/royalrender/lib.py index 1433bac6a2..cbddb22b4e 100644 --- a/openpype/modules/royalrender/lib.py +++ b/openpype/modules/royalrender/lib.py @@ -113,12 +113,15 @@ class BaseCreateRoyalRenderJob(pyblish.api.InstancePlugin, self.scene_path = context.data["currentFile"] if self.use_published: - file_path = get_published_workfile_instance(context) + published_workfile = get_published_workfile_instance(context) # fallback if nothing was set - if not file_path: + if published_workfile is None: self.log.warning("Falling back to workfile") file_path = context.data["currentFile"] + else: + workfile_repre = published_workfile.data["representations"][0] + file_path = workfile_repre["published_path"] self.scene_path = file_path self.log.info(