[ui] override default thumbnail directory with environment variable

This commit is contained in:
mugulmd 2023-01-05 08:59:26 -08:00
parent ff6358ea07
commit 1819eacbdb
2 changed files with 6 additions and 0 deletions

View file

@ -116,6 +116,11 @@ class MeshroomApp(QApplication):
pwd = os.path.dirname(__file__)
self.setWindowIcon(QIcon(os.path.join(pwd, "img/meshroom.svg")))
# User specified thumbnail directory
thumbnailDir = os.getenv('MESHROOM_THUMBNAIL_DIR')
if thumbnailDir is not None:
ThumbnailCache.thumbnailDir = thumbnailDir
# QML engine setup
qmlDir = os.path.join(pwd, "qml")
url = os.path.join(qmlDir, "main.qml")