From 11f45b8adf5bf7b023af2d1be5b22b1eabfa22d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 4 Aug 2022 16:38:22 +0200 Subject: [PATCH] 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. --- addon/flamenco/bat/shaman.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addon/flamenco/bat/shaman.py b/addon/flamenco/bat/shaman.py index 2d3ca1f6..05e65f46 100644 --- a/addon/flamenco/bat/shaman.py +++ b/addon/flamenco/bat/shaman.py @@ -214,6 +214,13 @@ class Transferrer(submodules.transfer.FileTransferer): # type: ignore size=filesize, 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) self._rel_to_local_path[relpath] = src