Skip to content

collect_current_file

Requires

None

Provides

context.data["currentFile"] -> absolute path for workfile

CollectCurrentFile

Bases: ContextPlugin

Inject the current working file path into context

Source code in client/ayon_premiere/plugins/publish/collect_current_file.py
15
16
17
18
19
20
21
22
23
24
25
class CollectCurrentFile(pyblish.api.ContextPlugin):
    """Inject the current working file path into context"""

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

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