From 1f2d1a55dcf9c29003cf50bc9f1b9697448de146 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 27 Mar 2020 18:59:25 +0100 Subject: [PATCH] few minor changes --- pype/ftrack/lib/ftrack_app_handler.py | 7 +++---- pype/nuke/lib.py | 6 ++---- pype/plugins/global/publish/collect_anatomy.py | 2 -- pype/plugins/global/publish/submit_publish_job.py | 4 +--- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/pype/ftrack/lib/ftrack_app_handler.py b/pype/ftrack/lib/ftrack_app_handler.py index aa57672f09..d36ed9c479 100644 --- a/pype/ftrack/lib/ftrack_app_handler.py +++ b/pype/ftrack/lib/ftrack_app_handler.py @@ -8,7 +8,7 @@ from pype import lib as pypelib from pypeapp import config from .ftrack_base_handler import BaseHandler -from pypeapp import Anatomy, Roots +from pypeapp import Anatomy class AppAction(BaseHandler): @@ -89,8 +89,8 @@ class AppAction(BaseHandler): ''' if ( - len(entities) != 1 or - entities[0].entity_type.lower() != 'task' + len(entities) != 1 + or entities[0].entity_type.lower() != 'task' ): return False @@ -174,7 +174,6 @@ class AppAction(BaseHandler): application = avalonlib.get_application(self.identifier) data = { - "root": Roots(project_name).roots, "project": { "name": entity["project"]["full_name"], "code": entity["project"]["name"] diff --git a/pype/nuke/lib.py b/pype/nuke/lib.py index ad2d576da3..0eb6eaf282 100644 --- a/pype/nuke/lib.py +++ b/pype/nuke/lib.py @@ -192,7 +192,6 @@ def format_anatomy(data): data["version"] = pype.get_version_from_path(file) project_document = pype.get_project() data.update({ - "root": api.Session["AVALON_PROJECTS"], "subset": data["avalon"]["subset"], "asset": data["avalon"]["asset"], "task": api.Session["AVALON_TASK"], @@ -1092,7 +1091,6 @@ class BuildWorkfile(WorkfileSettings): self.to_script = to_script # collect data for formating self.data_tmp = { - "root": root_path or api.Session["AVALON_PROJECTS"], "project": {"name": self._project["name"], "code": self._project["data"].get("code", '')}, "asset": self._asset or os.environ["AVALON_ASSET"], @@ -1109,8 +1107,8 @@ class BuildWorkfile(WorkfileSettings): anatomy_filled = anatomy.format(self.data_tmp) # get dir and file for workfile - self.work_dir = anatomy_filled["avalon"]["work"] - self.work_file = anatomy_filled["avalon"]["workfile"] + ".nk" + self.work_dir = anatomy_filled["work"]["folder"] + self.work_file = anatomy_filled["work"]["path"] + ".nk" def save_script_as(self, path=None): # first clear anything in open window diff --git a/pype/plugins/global/publish/collect_anatomy.py b/pype/plugins/global/publish/collect_anatomy.py index 73ae3bb024..7fd2056213 100644 --- a/pype/plugins/global/publish/collect_anatomy.py +++ b/pype/plugins/global/publish/collect_anatomy.py @@ -26,7 +26,6 @@ class CollectAnatomy(pyblish.api.ContextPlugin): label = "Collect Anatomy" def process(self, context): - root_path = api.registered_root() task_name = api.Session["AVALON_TASK"] project_entity = context.data["projectEntity"] @@ -45,7 +44,6 @@ class CollectAnatomy(pyblish.api.ContextPlugin): hierarchy = os.path.join(*hierarchy_items) context_data = { - "root": root_path, "project": { "name": project_name, "code": project_entity["data"].get("code") diff --git a/pype/plugins/global/publish/submit_publish_job.py b/pype/plugins/global/publish/submit_publish_job.py index ecf8555c57..8b43bec544 100644 --- a/pype/plugins/global/publish/submit_publish_job.py +++ b/pype/plugins/global/publish/submit_publish_job.py @@ -152,9 +152,7 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin): "FTRACK_API_KEY", "FTRACK_SERVER", "PYPE_ROOT", - "PYPE_METADATA_FILE", - "PYPE_STUDIO_PROJECTS_PATH", - "PYPE_STUDIO_PROJECTS_MOUNT", + "PYPE_METADATA_FILE" ] # pool used to do the publishing job