Skip to content

collect_current_file

CollectCurrentFile

Bases: MayaContextPlugin

Inject the current working file.

Source code in client/ayon_maya/plugins/publish/collect_current_file.py
 6
 7
 8
 9
10
11
12
13
14
class CollectCurrentFile(plugin.MayaContextPlugin):
    """Inject the current working file."""

    order = pyblish.api.CollectorOrder - 0.4
    label = "Maya Current File"

    def process(self, context):
        """Inject the current working file"""
        context.data['currentFile'] = cmds.file(query=True, sceneName=True)

process(context)

Inject the current working file

Source code in client/ayon_maya/plugins/publish/collect_current_file.py
12
13
14
def process(self, context):
    """Inject the current working file"""
    context.data['currentFile'] = cmds.file(query=True, sceneName=True)