Fix single frame publishing (from e.g. Maya)

Also fixes it for other hosts that use instance.data[`expectedFiles`] with the value being `list[dict[str, list[str]]]` (Basically the files per AOV, where the list of filenames is `list[str]` but the integrator and other areas really want a single `str` insteaf of `list[str]` if it's a single frame)
This commit is contained in:
Roy Nieterau 2024-10-16 00:06:40 +02:00
parent d759c9b41a
commit b239cdd891

View file

@ -788,15 +788,15 @@ def _create_instances_for_aov(instance, skeleton, aov_filter, additional_data,
colorspace = product.colorspace
break
if isinstance(files, (list, tuple)):
files = [os.path.basename(f) for f in files]
if isinstance(collected_files, (list, tuple)):
collected_files = [os.path.basename(f) for f in collected_files]
else:
files = os.path.basename(files)
collected_files = os.path.basename(collected_files)
rep = {
"name": ext,
"ext": ext,
"files": files,
"files": collected_files,
"frameStart": int(skeleton["frameStartHandle"]),
"frameEnd": int(skeleton["frameEndHandle"]),
# If expectedFile are absolute, we need only filenames