From 0cd7b6f537b7b18702ba79169ce1a635639f84f7 Mon Sep 17 00:00:00 2001 From: aardschok Date: Fri, 18 Aug 2017 10:51:17 +0200 Subject: [PATCH] dependency for command line publishing --- .../plugins/publish/collect_current_shell_file.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/colorbleed/plugins/publish/collect_current_shell_file.py b/colorbleed/plugins/publish/collect_current_shell_file.py index e69de29bb2..a467459bc8 100644 --- a/colorbleed/plugins/publish/collect_current_shell_file.py +++ b/colorbleed/plugins/publish/collect_current_shell_file.py @@ -0,0 +1,14 @@ +import os +import pyblish.api + + +class CollectCurrentShellFile(pyblish.api.ContextPlugin): + """Inject the current working file into context""" + + order = pyblish.api.CollectorOrder - 0.5 + label = "Current File" + hosts = ["shell"] + + def process(self, context): + """Inject the current working file""" + context.data["currentFile"] = os.path.join(os.getcwd(), "")