Skip to content

collect_current_file

CollectCurrentFile

Bases: ContextPlugin

Inject the current working file into context

Source code in client/ayon_photoshop/plugins/publish/collect_current_file.py
 8
 9
10
11
12
13
14
15
16
17
18
class CollectCurrentFile(pyblish.api.ContextPlugin):
    """Inject the current working file into context"""

    order = pyblish.api.CollectorOrder - 0.49
    label = "Current File"
    hosts = ["photoshop"]

    def process(self, context):
        context.data["currentFile"] = os.path.normpath(
            photoshop.stub().get_active_document_full_name()
        ).replace("\\", "/")