Cosmetics - avoid confusion about what preset.get("filename") actually is, it's the path passed to the generated preset.

Remove unused `path` return value from `lib.render_capture_preset`
Match representations logic with other extractors defining the list closer to creation of the representation, match more with ExtractThumbnail
This commit is contained in:
Roy Nieterau 2023-12-20 23:22:42 +01:00
parent 4796bca514
commit d880cdd1bb

View file

@ -57,28 +57,25 @@ class ExtractPlayblast(publish.Extractor):
instance, camera, path,
start=start, end=end,
capture_preset=capture_preset)
path = lib.render_capture_preset(preset)
lib.render_capture_preset(preset)
# Find playblast sequence
collected_files = os.listdir(stagingdir)
patterns = [clique.PATTERNS["frames"]]
collections, remainder = clique.assemble(collected_files,
minimum_items=1,
patterns=patterns)
filename = preset.get("filename", "%TEMP%")
self.log.debug("filename {}".format(filename))
self.log.debug("Searching playblast collection for: %s", path)
frame_collection = None
for collection in collections:
filebase = collection.format("{head}").rstrip(".")
self.log.debug("collection head {}".format(filebase))
if filebase in filename:
self.log.debug("Checking collection head: %s", filebase)
if filebase in path:
frame_collection = collection
self.log.debug(
"we found collection of interest {}".format(
str(frame_collection)))
if "representations" not in instance.data:
instance.data["representations"] = []
"Found playblast collection: %s", frame_collection
)
tags = ["review"]
if not instance.data.get("keepImages"):
@ -92,6 +89,9 @@ class ExtractPlayblast(publish.Extractor):
if len(collected_files) == 1:
collected_files = collected_files[0]
if "representations" not in instance.data:
instance.data["representations"] = []
representation = {
"name": capture_preset["Codec"]["compression"],
"ext": capture_preset["Codec"]["compression"],