mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge branch 'feature/nuke-slate-prerender' into master-dazzle-prod
This commit is contained in:
commit
af61c41319
4 changed files with 36 additions and 13 deletions
|
|
@ -103,6 +103,7 @@ class CollectRenderedFrames(pyblish.api.ContextPlugin):
|
|||
slate_frame = None
|
||||
families_data = None
|
||||
subset = None
|
||||
version = None
|
||||
if os.environ.get("PYPE_PUBLISH_PATHS"):
|
||||
paths = os.environ["PYPE_PUBLISH_PATHS"].split(os.pathsep)
|
||||
self.log.info("Collecting paths: {}".format(paths))
|
||||
|
|
@ -160,6 +161,7 @@ class CollectRenderedFrames(pyblish.api.ContextPlugin):
|
|||
subset = instance.get("subset")
|
||||
families_data = instance.get("families")
|
||||
slate_frame = instance.get("slateFrame")
|
||||
version = instance.get("version")
|
||||
|
||||
else:
|
||||
# Search in directory
|
||||
|
|
@ -258,12 +260,18 @@ class CollectRenderedFrames(pyblish.api.ContextPlugin):
|
|||
|
||||
# take out review family if mov path
|
||||
# this will make imagesequence none review
|
||||
frame_start = data.get("frameStart")
|
||||
frame_end = data.get("frameEnd")
|
||||
|
||||
if baked_mov_path:
|
||||
self.log.info(
|
||||
"Baked mov is available {}".format(
|
||||
baked_mov_path))
|
||||
families.append("review")
|
||||
|
||||
if "slate" in families:
|
||||
frame_start -= 1
|
||||
|
||||
self.log.info(
|
||||
"Adding representations to subset {}".format(
|
||||
subset))
|
||||
|
|
@ -280,14 +288,15 @@ class CollectRenderedFrames(pyblish.api.ContextPlugin):
|
|||
"asset": data.get(
|
||||
"asset", api.Session["AVALON_ASSET"]),
|
||||
"stagingDir": root,
|
||||
"frameStart": data.get("frameStart"),
|
||||
"frameEnd": data.get("frameEnd"),
|
||||
"frameStart": frame_start,
|
||||
"frameEnd": frame_end,
|
||||
"fps": fps,
|
||||
"source": data.get("source", ""),
|
||||
"pixelAspect": pixel_aspect,
|
||||
"resolutionWidth": resolution_width,
|
||||
"resolutionHeight": resolution_height,
|
||||
"slateFrame": slate_frame
|
||||
"slateFrame": slate_frame,
|
||||
"version": version
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -303,6 +312,8 @@ class CollectRenderedFrames(pyblish.api.ContextPlugin):
|
|||
"name": ext,
|
||||
"ext": "{}".format(ext),
|
||||
"files": list(collection),
|
||||
"frameStart": frame_start,
|
||||
"frameEnd": frame_end,
|
||||
"stagingDir": root,
|
||||
"anatomy_template": "render",
|
||||
"fps": fps,
|
||||
|
|
@ -323,11 +334,16 @@ class CollectRenderedFrames(pyblish.api.ContextPlugin):
|
|||
# add only known types to representation
|
||||
if rem.split(".")[-1] in ['mov', 'jpg', 'mp4']:
|
||||
self.log.info(" . {}".format(rem))
|
||||
|
||||
if "slate" in instance.data["families"]:
|
||||
frame_start += 1
|
||||
|
||||
representation = {
|
||||
"name": rem.split(".")[-1],
|
||||
"ext": "{}".format(rem.split(".")[-1]),
|
||||
"files": rem,
|
||||
"stagingDir": root,
|
||||
"frameStart": frame_start,
|
||||
"anatomy_template": "render",
|
||||
"fps": fps,
|
||||
"tags": ["review"],
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ class ExtractBurnin(pype.api.Extractor):
|
|||
if "representations" not in instance.data:
|
||||
raise RuntimeError("Burnin needs already created mov to work on.")
|
||||
|
||||
version = instance.context.data.get('version')
|
||||
version = instance.context.data.get(
|
||||
'version', instance.data.get('version'))
|
||||
frame_start = int(instance.data.get("frameStart") or 0)
|
||||
frame_end = int(instance.data.get("frameEnd") or 1)
|
||||
duration = frame_end - frame_start + 1
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
# exception for slate workflow
|
||||
if "slate" in instance.data["families"]:
|
||||
index_frame_start -= 1
|
||||
|
||||
|
||||
dst_padding_exp = src_padding_exp
|
||||
dst_start_frame = None
|
||||
for i in src_collection.indexes:
|
||||
|
|
@ -408,6 +408,9 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
}
|
||||
}
|
||||
|
||||
if repre.get("outputName"):
|
||||
representation["context"]["output"] = repre['outputName']
|
||||
|
||||
if sequence_repre and repre.get("frameStart"):
|
||||
representation['context']['frame'] = src_padding_exp % int(repre.get("frameStart"))
|
||||
|
||||
|
|
@ -455,11 +458,11 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
self.hardlink_file(src, dest)
|
||||
|
||||
def unc_convert(self, path):
|
||||
self.log.debug("> __ path: `{}`".format(path))
|
||||
drive, _path = os.path.splitdrive(path)
|
||||
unc = Path(drive).resolve()
|
||||
path = str(unc) + _path
|
||||
self.log.debug("> __ drive, _path: `{}`, `{}`".format(drive, _path))
|
||||
|
||||
if not os.path.exists(str(unc)):
|
||||
if not os.path.exists(drive + "/"):
|
||||
self.log.info("Converting to unc from environments ..")
|
||||
|
||||
path_replace = os.getenv("PYPE_STUDIO_PROJECTS_PATH")
|
||||
|
|
@ -611,7 +614,8 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin):
|
|||
"source": source,
|
||||
"comment": context.data.get("comment"),
|
||||
"machine": context.data.get("machine"),
|
||||
"fps": context.data.get("fps")}
|
||||
"fps": context.data.get(
|
||||
"fps", instance.data.get("fps"))}
|
||||
|
||||
# Include optional data if present in
|
||||
optionals = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue