Skip to content

collect_project

CollecFlameProject

Bases: ContextPlugin

Inject the current project data into current context.

Source code in client/ayon_flame/plugins/publish/collect_project.py
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
class CollecFlameProject(pyblish.api.ContextPlugin):
    """Inject the current project data into current context."""

    label = "Collect Flame project"
    order = pyblish.api.CollectorOrder - 0.492

    def process(self, context):
        # update context with main project attributes
        project = ayfapi.get_current_project()
        project_data = {
            "flameProject": project,
            "currentFile": f"Flame/{project.name}"
        }

        self.log.debug(f">>> Project data: {pformat(project_data)}")
        context.data.update(project_data)