Merge branch 'develop' into enhancement/OP-5920_abc-options-for-Pointcache-Animation-family

This commit is contained in:
Toke Stuart Jepsen 2024-03-07 08:59:21 +00:00
commit 59c0079858
5 changed files with 50 additions and 5 deletions

View file

@ -72,9 +72,13 @@ class CollectClipEffects(pyblish.api.InstancePlugin):
subset_split.insert(0, "effect")
effect_categories = {
x["name"]: x["effect_classes"] for x in self.effect_categories
}
# Need to convert to dict for AYON settings. This isinstance check can
# be removed in the future when OpenPype is no longer.
effect_categories = self.effect_categories
if isinstance(self.effect_categories, list):
effect_categories = {
x["name"]: x["effect_classes"] for x in self.effect_categories
}
category_by_effect = {"": ""}
for key, values in effect_categories.items():

View file

@ -409,6 +409,10 @@ class ClipLoader:
source_in = int(_clip_property("Start"))
source_out = int(_clip_property("End"))
source_duration = int(_clip_property("Frames"))
# Trim clip start if slate is present
if "slate" in self.data["versionData"]["families"]:
source_in += 1
source_duration = source_out - source_in + 1
if not self.with_handles:
# Load file without the handles of the source media
@ -435,7 +439,7 @@ class ClipLoader:
handle_start = version_data.get("handleStart", 0)
handle_end = version_data.get("handleEnd", 0)
frame_start_handle = frame_start - handle_start
frame_end_handle = frame_start + handle_end
frame_end_handle = frame_end + handle_end
database_frame_duration = int(
frame_end_handle - frame_start_handle + 1
)

View file

@ -470,7 +470,15 @@ class ExtractThumbnail(pyblish.api.InstancePlugin):
# Set video input attributes
max_int = str(2147483647)
video_data = get_ffprobe_data(video_file_path, logger=self.log)
duration = float(video_data["format"]["duration"])
# Use duration of the individual streams since it is returned with
# higher decimal precision than 'format.duration'. We need this
# more precise value for calculating the correct amount of frames
# for higher FPS ranges or decimal ranges, e.g. 29.97 FPS
duration = max(
float(stream.get("duration", 0))
for stream in video_data["streams"]
if stream.get("codec_type") == "video"
)
cmd_args = [
"-y",

View file

@ -69,6 +69,10 @@
"tags_addition": [
"review"
]
},
"CollectClipEffects": {
"enabled": true,
"effect_categories": {}
}
},
"filters": {},

View file

@ -312,6 +312,31 @@
"label": "Tags addition"
}
]
},
{
"type": "dict",
"collapsible": true,
"checkbox_key": "enabled",
"key": "CollectClipEffects",
"label": "Collect Clip Effects",
"is_group": true,
"children": [
{
"type": "boolean",
"key": "enabled",
"label": "Enabled"
},
{
"type": "dict-modifiable",
"key": "effect_categories",
"label": "Effect Categories",
"object_type": {
"type": "list",
"key": "effects_classes",
"object_type": "text"
}
}
]
}
]
},