mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
fixed start frame if it doesn't match render
This commit is contained in:
parent
2a1e057716
commit
2195652344
2 changed files with 19 additions and 0 deletions
|
|
@ -256,10 +256,16 @@ class CollectRenderedFrames(pyblish.api.ContextPlugin):
|
|||
)
|
||||
ext = collection.tail.lstrip(".")
|
||||
|
||||
detected_start = min(collection.indexes)
|
||||
detected_end = max(collection.indexes)
|
||||
|
||||
representation = {
|
||||
"name": ext,
|
||||
"ext": "{}".format(ext),
|
||||
"files": list(collection),
|
||||
"frameStart": frame_start,
|
||||
"detectedStart": detected_start,
|
||||
"detectedEnd": detected_end,
|
||||
"stagingDir": root,
|
||||
"anatomy_template": "render",
|
||||
"fps": fps,
|
||||
|
|
@ -323,12 +329,17 @@ class CollectRenderedFrames(pyblish.api.ContextPlugin):
|
|||
if "slate" in instance.data["families"]:
|
||||
frame_start += 1
|
||||
|
||||
detected_start = min(collection.indexes)
|
||||
detected_end = max(collection.indexes)
|
||||
|
||||
representation = {
|
||||
"name": ext,
|
||||
"ext": "{}".format(ext),
|
||||
"files": list(collection),
|
||||
"frameStart": frame_start,
|
||||
"frameEnd": frame_end,
|
||||
"detectedStart": detected_start,
|
||||
"detectedEnd": detected_end,
|
||||
"stagingDir": root,
|
||||
"anatomy_template": "render",
|
||||
"fps": fps,
|
||||
|
|
@ -394,6 +405,9 @@ class CollectRenderedFrames(pyblish.api.ContextPlugin):
|
|||
if "review" not in families:
|
||||
families.append("review")
|
||||
|
||||
detected_start = min(collection.indexes)
|
||||
detected_end = max(collection.indexes)
|
||||
|
||||
instance.data.update(
|
||||
{
|
||||
"name": str(collection),
|
||||
|
|
@ -428,6 +442,8 @@ class CollectRenderedFrames(pyblish.api.ContextPlugin):
|
|||
"files": list(collection),
|
||||
"frameStart": start,
|
||||
"frameEnd": end,
|
||||
"detectedStart": detected_start,
|
||||
"detectedEnd": detected_end,
|
||||
"stagingDir": root,
|
||||
"anatomy_template": "render",
|
||||
"fps": fps,
|
||||
|
|
|
|||
|
|
@ -149,6 +149,9 @@ class ExtractReview(pyblish.api.InstancePlugin):
|
|||
# necessary input data
|
||||
# adds start arg only if image sequence
|
||||
if isinstance(repre["files"], list):
|
||||
|
||||
if start_frame != repre.get("detectedStart", start_frame):
|
||||
start_frame = repre.get("detectedStart")
|
||||
input_args.append(
|
||||
"-start_number {0} -framerate {1}".format(
|
||||
start_frame, fps))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue