Skip to content

collect_workfile

CollectWorkfile

Bases: InstancePlugin

Collect Workfile representation.

Source code in client/ayon_aftereffects/plugins/publish/collect_workfile.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class CollectWorkfile(pyblish.api.InstancePlugin):
    """Collect Workfile representation."""

    label = "Collect After Effects Workfile"
    order = pyblish.api.CollectorOrder + 0.1
    families = ["workfile"]

    def process(self, instance):
        current_file = instance.context.data["currentFile"]
        staging_dir = os.path.dirname(current_file)
        scene_file = os.path.basename(current_file)

        # creating representation
        instance.data.setdefault("representations", []).append({
            "name": "aep",
            "ext": "aep",
            "files": scene_file,
            "stagingDir": staging_dir,
        })