Bases: InstancePlugin
Collects all compositions contained in workfile.
Used later in Premiere to choose which composition to load.
Note: previously named ExtractSaveScene, which collided with the real save plug-in in extract_save_scene.py. Because Pyblish discover() dedupes by class name, the actual scene-save plug-in was silently dropped and the workfile was never saved at the extractor stage, causing downstream plug-ins (farm submit) to read a stale workfile from disk. Renaming this class restores the real ExtractSaveScene to the discovered plug-in list.
Source code in client/ayon_aftereffects/plugins/publish/extract_compositions.py
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40 | class ExtractCompositions(pyblish.api.InstancePlugin):
"""Collects all compositions contained in workfile.
Used later in Premiere to choose which composition to load.
Note: previously named ``ExtractSaveScene``, which collided with the
real save plug-in in ``extract_save_scene.py``. Because Pyblish
``discover()`` dedupes by class name, the actual scene-save plug-in
was silently dropped and the workfile was never saved at the
extractor stage, causing downstream plug-ins (farm submit) to read
a stale workfile from disk. Renaming this class restores the real
``ExtractSaveScene`` to the discovered plug-in list.
"""
order = publish.Extractor.order
label = "Extract Compositions"
hosts = ["aftereffects"]
families = ["workfile"]
def process(self, instance):
stub = get_stub()
representation = instance.data["representations"][0]
comp_items = stub.get_items(
comps=True,
folders=False,
footages=False
)
if "data" not in representation:
representation["data"] = {}
data = {
"composition_names_in_workfile": [item.name for item in comp_items]
}
representation["data"].update(data)
|