mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
feat(nks): PR comments
This commit is contained in:
parent
7d689cfe25
commit
8f3f3a4d92
3 changed files with 25 additions and 15 deletions
|
|
@ -55,7 +55,8 @@ class CollectClips(api.ContextPlugin):
|
|||
is_sequence = False
|
||||
|
||||
self.log.debug(
|
||||
"__ assets_shared: {}".format(context.data["assetsShared"]))
|
||||
"__ assets_shared: {}".format(
|
||||
context.data["assetsShared"]))
|
||||
match_range = next(
|
||||
(k for k, v in context.data["assetsShared"].items()
|
||||
if (v.get("_clipIn", 0) == clip_in)
|
||||
|
|
|
|||
|
|
@ -36,9 +36,10 @@ class CollectReviews(api.InstancePlugin):
|
|||
return
|
||||
|
||||
if not track:
|
||||
self.log.debug(
|
||||
"Skipping \"{}\" because tag is not having `track` in metadata".format(instance)
|
||||
)
|
||||
self.log.debug((
|
||||
"Skipping \"{}\" because tag is not having"
|
||||
"`track` in metadata"
|
||||
).format(instance))
|
||||
return
|
||||
|
||||
# add to representations
|
||||
|
|
@ -68,10 +69,11 @@ class CollectReviews(api.InstancePlugin):
|
|||
rev_inst.data["name"]))
|
||||
|
||||
if rev_inst is None:
|
||||
raise RuntimeError(
|
||||
"TrackItem from track name `{}` has to be also selected".format(
|
||||
track)
|
||||
)
|
||||
raise RuntimeError((
|
||||
"TrackItem from track name `{}` has to"
|
||||
"be also selected"
|
||||
).format(track))
|
||||
|
||||
instance.data["families"].append("review")
|
||||
|
||||
file_path = rev_inst.data.get("sourcePath")
|
||||
|
|
@ -140,15 +142,18 @@ class CollectReviews(api.InstancePlugin):
|
|||
thumb_path = os.path.join(staging_dir, thumb_file)
|
||||
self.log.debug("__ thumb_path: {}".format(thumb_path))
|
||||
|
||||
thumb_frame = instance.data["sourceIn"] + ((instance.data["sourceOut"] - instance.data["sourceIn"])/2)
|
||||
thumb_frame = instance.data["sourceIn"] + (
|
||||
(instance.data["sourceOut"] - instance.data["sourceIn"]) / 2)
|
||||
self.log.debug("__ thumb_frame: {}".format(thumb_frame))
|
||||
thumbnail = item.thumbnail(thumb_frame).save(
|
||||
thumb_path,
|
||||
format='png'
|
||||
)
|
||||
|
||||
self.log.debug("__ sourceIn: `{}`".format(instance.data["sourceIn"]))
|
||||
self.log.debug("__ thumbnail: `{}`, frame: `{}`".format(thumbnail, thumb_frame))
|
||||
self.log.debug(
|
||||
"__ sourceIn: `{}`".format(instance.data["sourceIn"]))
|
||||
self.log.debug(
|
||||
"__ thumbnail: `{}`, frame: `{}`".format(thumbnail, thumb_frame))
|
||||
|
||||
self.log.debug("__ thumbnail: {}".format(thumbnail))
|
||||
|
||||
|
|
@ -177,7 +182,7 @@ class CollectReviews(api.InstancePlugin):
|
|||
version_data.update({k: instance.data[k] for k in transfer_data})
|
||||
|
||||
if 'version' in instance.data:
|
||||
version_data["version"] = instance.data[version]
|
||||
version_data["version"] = instance.data["version"]
|
||||
|
||||
# add to data of representation
|
||||
version_data.update({
|
||||
|
|
|
|||
|
|
@ -40,9 +40,13 @@ class ExtractReviewCutUpVideo(pype.api.Extractor):
|
|||
|
||||
tags = repre.get("tags", [])
|
||||
|
||||
if not next(
|
||||
(t for t in tags
|
||||
if t in ["_cut-bigger", "_cut-smaller"]), None):
|
||||
# check if supported tags are in representation for activation
|
||||
filter_tag = False
|
||||
for tag in ["_cut-bigger", "_cut-smaller"]:
|
||||
if tag in tags:
|
||||
filter_tag = True
|
||||
break
|
||||
if not filter_tag:
|
||||
continue
|
||||
|
||||
self.log.debug("__ repre: {}".format(repre))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue