diff --git a/pype/hosts/hiero/tags.py b/pype/hosts/hiero/tags.py index 152d054a8a..551dc1698d 100644 --- a/pype/hosts/hiero/tags.py +++ b/pype/hosts/hiero/tags.py @@ -3,6 +3,8 @@ import os import json import hiero +from pprint import pformat + from pype.api import Logger from avalon import io @@ -71,15 +73,17 @@ def add_tags_from_presets(): # Get project task types. tasks = io.find_one({"type": "project"})["config"]["tasks"] nks_pres_tags["[Tasks]"] = {} + log.debug("__ tasks: {}".format(pformat(tasks))) for task_type in tasks.keys(): - nks_pres_tags["[Tasks]"][task_type] = { + nks_pres_tags["[Tasks]"][task_type.lower()] = { "editable": "1", "note": "", "icon": { "path": "icons:TagGood.png" }, "metadata": { - "family": "task" + "family": "task", + "type": task_type } } diff --git a/pype/plugins/ftrack/publish/integrate_hierarchy_ftrack.py b/pype/plugins/ftrack/publish/integrate_hierarchy_ftrack.py index 7d4e0333d6..2ee0898711 100644 --- a/pype/plugins/ftrack/publish/integrate_hierarchy_ftrack.py +++ b/pype/plugins/ftrack/publish/integrate_hierarchy_ftrack.py @@ -143,15 +143,17 @@ class IntegrateHierarchyToFtrack(pyblish.api.ContextPlugin): # existing_tasks.append(child['type']['name']) for task in tasks: - if task.lower() in existing_tasks: + task_name = next(iter(task)) + task_type = task[task_name]["type"] + if task_name.lower() in existing_tasks: print("Task {} already exists".format(task)) continue - tasks_to_create.append(task) + tasks_to_create.append((task_name, task_type)) - for task in tasks_to_create: + for task_name, task_type in tasks_to_create: self.create_task( - name=task, - task_type=task, + name=task_name, + task_type=task_type, parent=entity ) try: diff --git a/pype/plugins/global/publish/extract_burnin.py b/pype/plugins/global/publish/extract_burnin.py index a613e39113..353f2f27f0 100644 --- a/pype/plugins/global/publish/extract_burnin.py +++ b/pype/plugins/global/publish/extract_burnin.py @@ -23,7 +23,7 @@ class ExtractBurnin(pype.api.Extractor): "nuke", "maya", "shell", - "nukestudio", + "hiero", "premiere", "standalonepublisher", "harmony" diff --git a/pype/plugins/global/publish/extract_hierarchy_avalon.py b/pype/plugins/global/publish/extract_hierarchy_avalon.py index 2d82eca6b2..64df672709 100644 --- a/pype/plugins/global/publish/extract_hierarchy_avalon.py +++ b/pype/plugins/global/publish/extract_hierarchy_avalon.py @@ -100,12 +100,13 @@ class ExtractHierarchyToAvalon(pyblish.api.ContextPlugin): # Do not override data, only update cur_entity_data = entity.get("data") or {} new_tasks = data.pop("tasks", {}) - if "tasks" in cur_entity_data and new_tasks: - for task_name in new_tasks.keys(): - if task_name \ - not in cur_entity_data["tasks"].keys(): - cur_entity_data["tasks"][task_name] = \ - new_tasks[task_name] + if "tasks" not in cur_entity_data and not new_tasks: + continue + for task in new_tasks: + task_name = next(iter(task)) + if task_name in cur_entity_data["tasks"].keys(): + continue + cur_entity_data["tasks"][task_name] = task[task_name] cur_entity_data.update(data) data = cur_entity_data else: diff --git a/pype/plugins/global/publish/extract_review.py b/pype/plugins/global/publish/extract_review.py index 0b1c0f0745..f4a39a7c31 100644 --- a/pype/plugins/global/publish/extract_review.py +++ b/pype/plugins/global/publish/extract_review.py @@ -26,7 +26,7 @@ class ExtractReview(pyblish.api.InstancePlugin): "nuke", "maya", "shell", - "nukestudio", + "hiero", "premiere", "harmony", "standalonepublisher", diff --git a/pype/plugins/global/publish/integrate_new.py b/pype/plugins/global/publish/integrate_new.py index 68549e9186..4dc6006076 100644 --- a/pype/plugins/global/publish/integrate_new.py +++ b/pype/plugins/global/publish/integrate_new.py @@ -521,8 +521,8 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): # get 'files' info for representation and all attached resources self.log.debug("Preparing files information ...") representation["files"] = self.get_files_info( - instance, - self.integrated_file_sizes) + instance, + self.integrated_file_sizes) self.log.debug("__ representation: {}".format(representation)) destination_list.append(dst) @@ -543,10 +543,9 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): repre_ids_to_remove.append(repre["_id"]) io.delete_many({"_id": {"$in": repre_ids_to_remove}}) - self.log.debug("__ representations: {}".format(representations)) for rep in instance.data["representations"]: - self.log.debug("__ represNAME: {}".format(rep['name'])) - self.log.debug("__ represPATH: {}".format(rep['published_path'])) + self.log.debug("__ rep: {}".format(rep)) + io.insert_many(representations) instance.data["published_representations"] = ( published_representations diff --git a/pype/plugins/global/publish/validate_custom_ftrack_attributes.py b/pype/plugins/global/publish/validate_custom_ftrack_attributes.py index 633deaa6d1..4bddcd2e03 100644 --- a/pype/plugins/global/publish/validate_custom_ftrack_attributes.py +++ b/pype/plugins/global/publish/validate_custom_ftrack_attributes.py @@ -46,7 +46,7 @@ class ValidateFtrackAttributes(pyblish.api.InstancePlugin): "houdini", "maya", "nuke", - "nukestudio", + "hiero", "photoshop", "premiere", "resolve", diff --git a/pype/plugins/hiero/publish/collect_hierarchy_context.py b/pype/plugins/hiero/publish/collect_hierarchy_context.py index 249194003b..f18783cd37 100644 --- a/pype/plugins/hiero/publish/collect_hierarchy_context.py +++ b/pype/plugins/hiero/publish/collect_hierarchy_context.py @@ -13,7 +13,7 @@ class CollectHierarchyInstance(pyblish.api.ContextPlugin): """ label = "Collect Hierarchy Clip" - order = pyblish.api.CollectorOrder + 0.101 + order = pyblish.api.CollectorOrder + 0.102 families = ["clip"] def convert_to_entity(self, key, value): diff --git a/pype/plugins/hiero/publish/collect_shots.py b/pype/plugins/hiero/publish/collect_shots.py index 22f23e5742..6f83e08fbe 100644 --- a/pype/plugins/hiero/publish/collect_shots.py +++ b/pype/plugins/hiero/publish/collect_shots.py @@ -43,7 +43,7 @@ class CollectShots(api.InstancePlugin): "{} - {} - tasks:{} - assetbuilds:{} - comments:{}".format( data["asset"], data["subset"], - data["tasks"].keys(), + [task.keys()[0] for task in data["tasks"]], [x["name"] for x in data.get("assetbuilds", [])], len(data.get("comments", [])) ) diff --git a/pype/plugins/hiero/publish/collect_tag_tasks.py b/pype/plugins/hiero/publish/collect_tag_tasks.py index b83e208b58..dbcf5e5260 100644 --- a/pype/plugins/hiero/publish/collect_tag_tasks.py +++ b/pype/plugins/hiero/publish/collect_tag_tasks.py @@ -20,8 +20,9 @@ class CollectClipTagTasks(api.InstancePlugin): # gets only task family tags and collect labels if "task" in t_family: - t_task = t_metadata.get("tag.label", "") - tasks.append(t_task) + t_task_name = t_metadata.get("tag.label", "") + t_task_type = t_metadata.get("tag.type", "") + tasks.append({t_task_name: {"type": t_task_type}}) instance.data["tasks"] = tasks diff --git a/pype/plugins/hiero/publish/extract_review_cutup_video.py b/pype/plugins/hiero/publish/extract_review_cutup_video.py index d1953b5aa2..868d450fd6 100644 --- a/pype/plugins/hiero/publish/extract_review_cutup_video.py +++ b/pype/plugins/hiero/publish/extract_review_cutup_video.py @@ -227,7 +227,7 @@ class ExtractReviewCutUpVideo(pype.api.Extractor): "step": 1, "fps": fps, "name": "cut_up_preview", - "tags": ["review", "delete"] + self.tags_addition, + "tags": ["review"] + self.tags_addition, "ext": ext, "anatomy_template": "publish" }