mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
feat(nks): optional version sync with project workfile
This commit is contained in:
parent
a206b8fe7a
commit
787e9d1295
3 changed files with 29 additions and 4 deletions
|
|
@ -18,7 +18,6 @@ class CollectClips(api.ContextPlugin):
|
||||||
context.data["assetsShared"] = dict()
|
context.data["assetsShared"] = dict()
|
||||||
|
|
||||||
projectdata = context.data["projectEntity"]["data"]
|
projectdata = context.data["projectEntity"]["data"]
|
||||||
version = context.data.get("version", "001")
|
|
||||||
sequence = context.data.get("activeSequence")
|
sequence = context.data.get("activeSequence")
|
||||||
selection = context.data.get("selection")
|
selection = context.data.get("selection")
|
||||||
|
|
||||||
|
|
@ -108,8 +107,7 @@ class CollectClips(api.ContextPlugin):
|
||||||
"family": "clip",
|
"family": "clip",
|
||||||
"families": [],
|
"families": [],
|
||||||
"handleStart": projectdata.get("handleStart", 0),
|
"handleStart": projectdata.get("handleStart", 0),
|
||||||
"handleEnd": projectdata.get("handleEnd", 0),
|
"handleEnd": projectdata.get("handleEnd", 0)})
|
||||||
"version": int(version)})
|
|
||||||
|
|
||||||
instance = context.create_instance(**data)
|
instance = context.create_instance(**data)
|
||||||
|
|
||||||
|
|
|
||||||
20
pype/plugins/nukestudio/publish/collect_instance_version.py
Normal file
20
pype/plugins/nukestudio/publish/collect_instance_version.py
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
from pyblish import api
|
||||||
|
|
||||||
|
class CollectInstanceVersion(api.InstancePlugin):
|
||||||
|
""" Collecting versions of Hiero project into instances
|
||||||
|
|
||||||
|
If activated then any subset version is created in
|
||||||
|
version of the actual project.
|
||||||
|
"""
|
||||||
|
|
||||||
|
order = api.CollectorOrder + 0.015
|
||||||
|
label = "Collect Instance Version"
|
||||||
|
|
||||||
|
optional = True
|
||||||
|
active = True
|
||||||
|
|
||||||
|
def process(self, instance):
|
||||||
|
version = instance.context.data.get("version", "001")
|
||||||
|
instance.data.update({
|
||||||
|
"version": int(version)
|
||||||
|
})
|
||||||
|
|
@ -126,7 +126,7 @@ class CollectPlatesData(api.InstancePlugin):
|
||||||
transfer_data = [
|
transfer_data = [
|
||||||
"handleStart", "handleEnd", "sourceIn", "sourceOut", "frameStart",
|
"handleStart", "handleEnd", "sourceIn", "sourceOut", "frameStart",
|
||||||
"frameEnd", "sourceInH", "sourceOutH", "clipIn", "clipOut",
|
"frameEnd", "sourceInH", "sourceOutH", "clipIn", "clipOut",
|
||||||
"clipInH", "clipOutH", "asset", "track", "version", "resolutionWidth", "resolutionHeight", "pixelAspect", "fps"
|
"clipInH", "clipOutH", "asset", "track", "resolutionWidth", "resolutionHeight", "pixelAspect", "fps"
|
||||||
]
|
]
|
||||||
|
|
||||||
# pass data to version
|
# pass data to version
|
||||||
|
|
@ -141,6 +141,13 @@ class CollectPlatesData(api.InstancePlugin):
|
||||||
"fps": instance.context.data["fps"]
|
"fps": instance.context.data["fps"]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
version = instance.data.get("version")
|
||||||
|
if version:
|
||||||
|
version_data.update({
|
||||||
|
"version": version
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
basename, ext = os.path.splitext(source_file)
|
basename, ext = os.path.splitext(source_file)
|
||||||
head, padding = os.path.splitext(basename)
|
head, padding = os.path.splitext(basename)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue