Textures - fix - multiple version loaded at same time fails in better spot

This commit is contained in:
Petr Kalis 2021-07-20 11:19:16 +02:00
parent bf1948b354
commit cb8aa03b64
2 changed files with 8 additions and 3 deletions

View file

@ -421,8 +421,12 @@ class CollectTextures(pyblish.api.ContextPlugin):
"have '{}' key".format(key)
raise ValueError(msg)
parsed_value = regex_result[0][idx]
return parsed_value
try:
parsed_value = regex_result[0][idx]
return parsed_value
except IndexError:
self.log.warning("Wrong index, probably "
"wrong name {}".format(name))
def _update_representations(self, upd_representations):
"""Frames dont have sense for textures, add collected udims instead."""

View file

@ -211,7 +211,8 @@ class DropDataFrame(QtWidgets.QFrame):
folder_path = os.path.dirname(collection.head)
if file_base[-1] in ['.', '_']:
file_base = file_base[:-1]
file_ext = collection.tail
file_ext = os.path.splitext(
collection.format('{head}{padding}{tail}'))[1]
repr_name = file_ext.replace('.', '')
range = collection.format('{ranges}')