From 7e5e20dbcc0adc089700270e97d893a38f2854c5 Mon Sep 17 00:00:00 2001 From: Milan Kolar Date: Tue, 9 Apr 2019 18:27:26 +0200 Subject: [PATCH] move icons --- pype/plugins/global/publish/collect_templates.py | 10 +++++++--- pype/plugins/global/publish/integrate.py | 8 ++++---- .../global/publish/integrate_rendered_frames.py | 6 +++--- {res => pype/res}/ftrack/sign_in_message.html | 0 {res => pype/res}/icons/Thumbs.db | Bin {res => pype/res}/icons/inventory.png | Bin {res => pype/res}/icons/loader.png | Bin {res => pype/res}/icons/lookmanager.png | Bin {res => pype/res}/icons/workfiles.png | Bin {res => pype/res}/workspace.mel | 0 10 files changed, 14 insertions(+), 10 deletions(-) rename {res => pype/res}/ftrack/sign_in_message.html (100%) rename {res => pype/res}/icons/Thumbs.db (100%) rename {res => pype/res}/icons/inventory.png (100%) rename {res => pype/res}/icons/loader.png (100%) rename {res => pype/res}/icons/lookmanager.png (100%) rename {res => pype/res}/icons/workfiles.png (100%) rename {res => pype/res}/workspace.mel (100%) diff --git a/pype/plugins/global/publish/collect_templates.py b/pype/plugins/global/publish/collect_templates.py index fb6de894bd..3fa603a2ae 100644 --- a/pype/plugins/global/publish/collect_templates.py +++ b/pype/plugins/global/publish/collect_templates.py @@ -1,7 +1,9 @@ -import pype.api as pype +# import pype.api as pype import pyblish.api +from pypeapp import Anatomy +import os class CollectTemplates(pyblish.api.ContextPlugin): @@ -11,6 +13,8 @@ class CollectTemplates(pyblish.api.ContextPlugin): label = "Collect Templates" def process(self, context): - pype.load_data_from_templates() - context.data['anatomy'] = pype.Anatomy + # pype.load_data_from_templates() + + anatomy = Anatomy(project_name=os.environ.get("AVALON_PROJECT")) + context.data['anatomy'] = anatomy self.log.info("Anatomy templates collected...") diff --git a/pype/plugins/global/publish/integrate.py b/pype/plugins/global/publish/integrate.py index be7fc3bcf3..530c00f9ed 100644 --- a/pype/plugins/global/publish/integrate.py +++ b/pype/plugins/global/publish/integrate.py @@ -200,10 +200,10 @@ class IntegrateAsset(pyblish.api.InstancePlugin): src = os.path.join(stagingdir, fname) anatomy_filled = anatomy.format(template_data) - dst = anatomy_filled.publish.path + dst = anatomy_filled["publish"]["path"] instance.data["transfers"].append([src, dst]) - template = anatomy.publish.path + template = anatomy.anatomy["publish"]["path"] else: # Single file @@ -224,10 +224,10 @@ class IntegrateAsset(pyblish.api.InstancePlugin): src = os.path.join(stagingdir, fname) anatomy_filled = anatomy.format(template_data) - dst = anatomy_filled.publish.path + dst = anatomy_filled["publish"]["path"] instance.data["transfers"].append([src, dst]) - template = anatomy.publish.path + template = anatomy.anatomy["publish"]["path"] representation = { "schema": "pype:representation-2.0", diff --git a/pype/plugins/global/publish/integrate_rendered_frames.py b/pype/plugins/global/publish/integrate_rendered_frames.py index ae11d33348..626f03093a 100644 --- a/pype/plugins/global/publish/integrate_rendered_frames.py +++ b/pype/plugins/global/publish/integrate_rendered_frames.py @@ -192,7 +192,7 @@ class IntegrateFrames(pyblish.api.InstancePlugin): template_data["frame"] = src_collection.format( "{padding}") % i anatomy_filled = anatomy.format(template_data) - test_dest_files.append(anatomy_filled.render.path) + test_dest_files.append(anatomy_filled["render"]["path"]) dst_collections, remainder = clique.assemble(test_dest_files) dst_collection = dst_collections[0] @@ -242,8 +242,8 @@ class IntegrateFrames(pyblish.api.InstancePlugin): template_data["frame"] = "#####" anatomy_filled = anatomy.format(template_data) - path_to_save = anatomy_filled.render.path - template = anatomy.render.fullpath + path_to_save = anatomy_filled["render"]["path"] + template = anatomy["render"]["path"] self.log.debug('ext[1:]: {}'.format(ext[1:])) representation = { diff --git a/res/ftrack/sign_in_message.html b/pype/res/ftrack/sign_in_message.html similarity index 100% rename from res/ftrack/sign_in_message.html rename to pype/res/ftrack/sign_in_message.html diff --git a/res/icons/Thumbs.db b/pype/res/icons/Thumbs.db similarity index 100% rename from res/icons/Thumbs.db rename to pype/res/icons/Thumbs.db diff --git a/res/icons/inventory.png b/pype/res/icons/inventory.png similarity index 100% rename from res/icons/inventory.png rename to pype/res/icons/inventory.png diff --git a/res/icons/loader.png b/pype/res/icons/loader.png similarity index 100% rename from res/icons/loader.png rename to pype/res/icons/loader.png diff --git a/res/icons/lookmanager.png b/pype/res/icons/lookmanager.png similarity index 100% rename from res/icons/lookmanager.png rename to pype/res/icons/lookmanager.png diff --git a/res/icons/workfiles.png b/pype/res/icons/workfiles.png similarity index 100% rename from res/icons/workfiles.png rename to pype/res/icons/workfiles.png diff --git a/res/workspace.mel b/pype/res/workspace.mel similarity index 100% rename from res/workspace.mel rename to pype/res/workspace.mel