Add-on: work around an issue where files are submitted to Shaman twice

It seems that there is an issue in BAT that causes some UDIMs to be
reported multiple times. This is just a quick fix to work around that.
This commit is contained in:
Sybren A. Stüvel 2022-08-04 16:38:22 +02:00
parent 44ccc6c3ca
commit 11f45b8adf

View File

@ -214,6 +214,13 @@ class Transferrer(submodules.transfer.FileTransferer): # type: ignore
size=filesize, size=filesize,
path=relpath, path=relpath,
) )
if filespec in filespecs:
# FIXME: there is an issue in BAT that some UDIM files are
# reported twice. There is no use asking Shaman to check
# them out twice, so avoid duplicates here for now.
# ShamanFileSpec is not a hashable type, so unfortunately we
# can't use a set() here.
continue
filespecs.append(filespec) filespecs.append(filespec)
self._rel_to_local_path[relpath] = src self._rel_to_local_path[relpath] = src