Skip to content

Commit

Permalink
Report back integrate_version_up_workfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-ynput committed Oct 21, 2024
1 parent fdff669 commit b48b58f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions client/ayon_hiero/plugins/publish/integrate_version_up_workfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from pyblish import api

from ayon_core.lib import version_up


class IntegrateVersionUpWorkfile(api.ContextPlugin):
"""Save as new workfile version"""

order = api.IntegratorOrder + 10.1
label = "Version-up Workfile"
hosts = ["hiero"]

optional = True
active = True

def process(self, context):
project = context.data["activeProject"]
path = context.data.get("currentFile")
new_path = version_up(path)

if project:
project.saveAs(new_path)

self.log.info("Project workfile was versioned up")

0 comments on commit b48b58f

Please sign in to comment.