few minor changes

This commit is contained in:
iLLiCiTiT 2020-03-27 18:59:25 +01:00
parent b6c25f90c7
commit 1f2d1a55dc
4 changed files with 6 additions and 13 deletions

View file

@ -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"]

View file

@ -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

View file

@ -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")

View file

@ -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