From 16c90c3bb8a10bb5541d0c088f072751266434af Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Thu, 12 Nov 2020 17:32:01 +0100 Subject: [PATCH 1/3] fix render template when generating path for published files in deadline --- pype/plugins/global/publish/submit_publish_job.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pype/plugins/global/publish/submit_publish_job.py b/pype/plugins/global/publish/submit_publish_job.py index 097761cf4e..444ad28b6c 100644 --- a/pype/plugins/global/publish/submit_publish_job.py +++ b/pype/plugins/global/publish/submit_publish_job.py @@ -151,6 +151,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): deadline_pool_secondary = "" deadline_group = "" deadline_chunk_size = 1 + deadline_priority = None # regex for finding frame number in string R_FRAME_NUMBER = re.compile(r'.+\.(?P[0-9]+)\..+') @@ -902,7 +903,11 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): render_job["Props"]["User"] = context.data.get( "deadlineUser", getpass.getuser()) # Priority is now not handled at all - render_job["Props"]["Pri"] = instance.data.get("priority") + + if self.deadline_priority: + render_job["Props"]["Pri"] = self.deadline_priority + else: + render_job["Props"]["Pri"] = instance.data.get("priority") render_job["Props"]["Env"] = { "FTRACK_API_USER": os.environ.get("FTRACK_API_USER"), @@ -1033,8 +1038,8 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): anatomy_filled = anatomy.format(template_data) - if "folder" in anatomy.templates["publish"]: - publish_folder = anatomy_filled["publish"]["folder"] + if "folder" in anatomy.templates["render"]: + publish_folder = anatomy_filled["render"]["folder"] else: # solve deprecated situation when `folder` key is not underneath # `publish` anatomy @@ -1044,7 +1049,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): " key underneath `publish` (in global of for project `{}`)." ).format(project_name)) - file_path = anatomy_filled["publish"]["path"] + file_path = anatomy_filled["render"]["path"] # Directory publish_folder = os.path.dirname(file_path) From 34be69006d85ec27745f3044e31126e90d9fa626 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Thu, 12 Nov 2020 17:32:20 +0100 Subject: [PATCH 2/3] add render to photoshop loader --- pype/plugins/photoshop/load/load_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/plugins/photoshop/load/load_image.py b/pype/plugins/photoshop/load/load_image.py index 301e60fbb1..44cc96c96f 100644 --- a/pype/plugins/photoshop/load/load_image.py +++ b/pype/plugins/photoshop/load/load_image.py @@ -11,7 +11,7 @@ class ImageLoader(api.Loader): Stores the imported asset in a container named after the asset. """ - families = ["image"] + families = ["image", "render"] representations = ["*"] def load(self, context, name=None, namespace=None, data=None): From 1a85c58965e39d5f9683c5a408cd4ce1a876b292 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Thu, 12 Nov 2020 17:34:39 +0100 Subject: [PATCH 3/3] copy version from context to workfile instance --- pype/plugins/maya/publish/collect_render.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pype/plugins/maya/publish/collect_render.py b/pype/plugins/maya/publish/collect_render.py index 2848a55152..3dde3b1592 100644 --- a/pype/plugins/maya/publish/collect_render.py +++ b/pype/plugins/maya/publish/collect_render.py @@ -254,6 +254,10 @@ class CollectMayaRender(pyblish.api.ContextPlugin): if self.sync_workfile_version: data["version"] = context.data["version"] + for instance in context: + if instance.data['family'] == "workfile": + instance.data["version"] = context.data["version"] + # Apply each user defined attribute as data for attr in cmds.listAttr(layer, userDefined=True) or list(): try: