mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
incrment workfile version
This commit is contained in:
parent
28b424bf2f
commit
47052f7445
1 changed files with 20 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
||||||
|
import pyblish.api
|
||||||
|
from openpype.lib import version_up
|
||||||
|
from pymxs import runtime as rt
|
||||||
|
|
||||||
|
|
||||||
|
class IncrementWorkfileVersion(pyblish.api.ContextPlugin):
|
||||||
|
"""Increment current workfile version."""
|
||||||
|
|
||||||
|
order = pyblish.api.IntegratorOrder + 0.9
|
||||||
|
label = "Increment Workfile Version"
|
||||||
|
optional = True
|
||||||
|
hosts = ["max"]
|
||||||
|
families = ["workfile"]
|
||||||
|
|
||||||
|
def process(self, context):
|
||||||
|
path = context.data["currentFile"]
|
||||||
|
filepath = version_up(path)
|
||||||
|
|
||||||
|
rt.saveMaxFile(filepath)
|
||||||
|
self.log.info('Incrementing file version')
|
||||||
Loading…
Add table
Add a link
Reference in a new issue