Skip to content

increment_workfile_version

IncrementWorkfileVersion

Bases: ContextPlugin

Increment current workfile version.

Source code in client/ayon_max/plugins/publish/increment_workfile_version.py
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
class IncrementWorkfileVersion(pyblish.api.ContextPlugin):
    """Increment current workfile version."""

    order = pyblish.api.IntegratorOrder + 0.9
    label = "Increment Workfile Version"
    hosts = ["max"]
    families = ["maxrender", "workfile"]

    def process(self, context):
        path = context.data["currentFile"]
        filepath = version_up(path)

        rt.saveMaxFile(filepath)
        self.log.info("Incrementing file version")