Skip to content

collect_current_file

CollectCurrentFile

Bases: ContextPlugin

Inject the current working file into context

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

    order = pyblish.api.CollectorOrder - 0.5
    label = "Collect Current File"
    hosts = ["openrv"]

    def process(self, context):
        host = registered_host()
        current_file = host.get_current_workfile() or ""
        context.data["currentFile"] = current_file