From 18248d1ed45d6ea4ee367a39b6f72582034ae33d Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 4 May 2021 19:20:33 +0200 Subject: [PATCH] concatenate output_filename using found collection of files --- openpype/plugins/publish/extract_burnin.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/openpype/plugins/publish/extract_burnin.py b/openpype/plugins/publish/extract_burnin.py index a93a3b21bb..d926d5aa2a 100644 --- a/openpype/plugins/publish/extract_burnin.py +++ b/openpype/plugins/publish/extract_burnin.py @@ -3,6 +3,7 @@ import re import json import copy import tempfile +import clique import openpype import openpype.api @@ -473,7 +474,17 @@ class ExtractBurnin(openpype.api.Extractor): is_sequence = False else: input_filename = new_repre["sequence_file"] + collection = collections[0] + indexes = list(collection.indexes) + padding = len(str(max(indexes))) + head = collection.format("{head}") + tail = collection.format("{tail}") + output_filename = "{}%{:0>2}d{}{}".format( + head, padding, filename_suffix, tail + ) repre_files = [] + for idx in indexes: + repre_files.append(output_filename % idx) if not is_sequence: input_filename = input_filenames