From e6144f42b1a134e316f397952e1085b500a98034 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 10 Sep 2021 10:58:50 +0200 Subject: [PATCH 1/3] Fix - explicitly capitalize task type Settings expect task type capitalized --- .../webpublisher/plugins/publish/collect_published_files.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py b/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py index 6584120d973..6a4f83b0fa7 100644 --- a/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py +++ b/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py @@ -174,6 +174,8 @@ def _get_family(self, settings, task_type, is_sequence, extension): (family, [families], subset_template_name, tags) tuple AssertionError if not matching family found """ + if task_type: + task_type = task_type.capitalize() task_obj = settings.get(task_type) assert task_obj, "No family configuration for '{}'".format(task_type) From fd6bd1dbc15122145a29ea89946e6e3e45c658a5 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 10 Sep 2021 15:28:59 +0200 Subject: [PATCH 2/3] Fix - explicitly add frameStart, frameEnd for single frame Temporary files produced to temp folder --- .../webpublisher/plugins/publish/collect_published_files.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py b/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py index 6a4f83b0fa7..434f82d3ea5 100644 --- a/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py +++ b/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py @@ -10,6 +10,7 @@ import os import json import clique +import tempfile import pyblish.api from avalon import io @@ -94,7 +95,7 @@ def _process_batch(self, dir_url): instance.data["families"] = families instance.data["version"] = \ self._get_last_version(asset, subset) + 1 - instance.data["stagingDir"] = task_dir + instance.data["stagingDir"] = tempfile.mkdtemp() instance.data["source"] = "webpublisher" # to store logging info into DB openpype.webpublishes @@ -113,6 +114,8 @@ def _process_batch(self, dir_url): instance.data["frameEnd"] = \ instance.data["representations"][0]["frameEnd"] else: + instance.data["frameStart"] = 0 + instance.data["frameEnd"] = 1 instance.data["representations"] = self._get_single_repre( task_dir, task_data["files"], tags ) From 0a033f4dbe2f3981097d3ca7623e655d939ff245 Mon Sep 17 00:00:00 2001 From: Petr Kalis Date: Fri, 17 Sep 2021 13:28:49 +0200 Subject: [PATCH 3/3] Lowercased task type --- .../plugins/publish/collect_published_files.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py b/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py index 434f82d3ea5..7e9b98956a8 100644 --- a/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py +++ b/openpype/hosts/webpublisher/plugins/publish/collect_published_files.py @@ -177,9 +177,11 @@ def _get_family(self, settings, task_type, is_sequence, extension): (family, [families], subset_template_name, tags) tuple AssertionError if not matching family found """ - if task_type: - task_type = task_type.capitalize() - task_obj = settings.get(task_type) + task_type = task_type.lower() + lower_cased_task_types = {} + for t_type, task in settings.items(): + lower_cased_task_types[t_type.lower()] = task + task_obj = lower_cased_task_types.get(task_type) assert task_obj, "No family configuration for '{}'".format(task_type) found_family = None