mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merged in hotfix/review_integrate_fix (pull request #337)
Hotfix/review integrate fix
This commit is contained in:
commit
749852fc8b
2 changed files with 14 additions and 5 deletions
|
|
@ -109,7 +109,7 @@ class CollectContextDataSAPublish(pyblish.api.ContextPlugin):
|
|||
if component["preview"]:
|
||||
instance.data["families"].append("review")
|
||||
instance.data["repreProfiles"] = ["h264"]
|
||||
component["tags"] = ["review", "delete"]
|
||||
component["tags"] = ["review"]
|
||||
self.log.debug("Adding review family")
|
||||
|
||||
instance.data["representations"].append(component)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import tempfile
|
||||
|
||||
import pyblish.api
|
||||
from pype.vendor import clique
|
||||
|
|
@ -82,9 +83,10 @@ class ExtractReviewSP(pyblish.api.InstancePlugin):
|
|||
full_input_path = os.path.join(staging_dir, repre["files"])
|
||||
filename = repre["files"].split(".")[0]
|
||||
|
||||
# prepare output file
|
||||
repr_file = filename + "_{0}.{1}".format(name, ext)
|
||||
|
||||
full_output_path = os.path.join(staging_dir, repr_file)
|
||||
out_stagigng_dir = tempfile.mkdtemp(prefix="extract_review_")
|
||||
full_output_path = os.path.join(out_stagigng_dir, repr_file)
|
||||
|
||||
self.log.info("input {}".format(full_input_path))
|
||||
self.log.info("output {}".format(full_output_path))
|
||||
|
|
@ -169,18 +171,25 @@ class ExtractReviewSP(pyblish.api.InstancePlugin):
|
|||
"name": name,
|
||||
"ext": ext,
|
||||
"files": repr_file,
|
||||
"stagingDir": out_stagigng_dir,
|
||||
"tags": new_tags,
|
||||
"outputName": name,
|
||||
"startFrameReview": 1,
|
||||
"endFrameReview": video_len
|
||||
})
|
||||
if repre_new.get("preview"):
|
||||
repre_new.pop("preview")
|
||||
# cleanup thumbnail from new repre
|
||||
if repre_new.get("thumbnail"):
|
||||
repre_new.pop("thumbnail")
|
||||
if "thumbnail" in repre_new["tags"]:
|
||||
repre_new["tags"].remove("thumbnail")
|
||||
|
||||
# adding representation
|
||||
self.log.debug("Adding: {}".format(repre_new))
|
||||
# cleanup repre from preview
|
||||
if "preview" in repre:
|
||||
repre.pop("preview")
|
||||
if "preview" in repre["tags"]:
|
||||
repre["tags"].remove("preview")
|
||||
new_repres.append(repre_new)
|
||||
|
||||
for repre in instance.data["representations"]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue