Skip to content

increment_workfile_version

IncrementWorkfileVersion

Bases: ContextPlugin

Save current file

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

    label = "Save current file"
    order = pyblish.api.ExtractorOrder - 0.49
    hosts = ["speedtree"]
    families = ["workfile"]

    def process(self, context):
        host = registered_host()
        path = context.data["currentFile"]
        self.log.info(f"Increment and save workfile: {path}")
        host.save_workfile(version_up(path))