diff --git a/openpype/modules/deadline/plugins/publish/collect_pools.py b/openpype/modules/deadline/plugins/publish/collect_pools.py index e221eb00ea6..706374d972e 100644 --- a/openpype/modules/deadline/plugins/publish/collect_pools.py +++ b/openpype/modules/deadline/plugins/publish/collect_pools.py @@ -36,12 +36,21 @@ def process(self, instance): instance.data["primaryPool"] = ( attr_values.get("primaryPool") or self.primary_pool or "none" ) + if instance.data["primaryPool"] == "-": + instance.data["primaryPool"] = None if not instance.data.get("secondaryPool"): instance.data["secondaryPool"] = ( attr_values.get("secondaryPool") or self.secondary_pool or "none" # noqa ) + if instance.data["secondaryPool"] == "-": + instance.data["secondaryPool"] = None + + self.log.info("prima::{}".format(instance.data["primaryPool"])) + self.log.info( + "secondaryPool::{}".format(instance.data["secondaryPool"])) + @classmethod def get_attribute_defs(cls): # TODO: Preferably this would be an enum for the user diff --git a/openpype/modules/deadline/plugins/publish/submit_publish_job.py b/openpype/modules/deadline/plugins/publish/submit_publish_job.py index 0529fb8a70d..2ed21c0621c 100644 --- a/openpype/modules/deadline/plugins/publish/submit_publish_job.py +++ b/openpype/modules/deadline/plugins/publish/submit_publish_job.py @@ -188,6 +188,7 @@ def _submit_deadline_post_job(self, instance, job, instances): deepcopy(instance.data["anatomyData"]), instance.data.get("asset"), instances[0]["subset"], + instance.context, 'render', override_version ) @@ -523,8 +524,8 @@ def process(self, instance): json.dump(publish_job, f, indent=4, sort_keys=True) def _get_publish_folder(self, anatomy, template_data, - asset, subset, - family='render', version=None): + asset, subset, context, + family, version=None): """ Extracted logic to pre-calculate real publish folder, which is calculated in IntegrateNew inside of Deadline process. @@ -550,7 +551,7 @@ def _get_publish_folder(self, anatomy, template_data, based on 'publish' template """ - project_name = self.context.data["projectName"] + project_name = context.data["projectName"] if not version: version = get_last_version_by_subset_name( project_name, @@ -563,7 +564,7 @@ def _get_publish_folder(self, anatomy, template_data, version = 1 template_data["subset"] = subset - template_data["family"] = "render" + template_data["family"] = family template_data["version"] = version render_templates = anatomy.templates_obj["render"]