[ui] Viewer2D: Enable HDR viewer by default if it is available

If the HDR viewer is unavailable, load the classic 8bit image viewer,
but do not allow the user to switch to it anymore if the HDR viewer
is available unless a specific environment variable has been provided.
This commit is contained in:
Candice Bentéjac 2022-10-10 18:22:46 +02:00
parent 243c278bcc
commit ff4620dc2f
2 changed files with 48 additions and 13 deletions

View file

@ -344,8 +344,13 @@ class MeshroomApp(QApplication):
}
]
def _default8bitViewerEnabled(self):
return bool(os.environ.get("MESHROOM_USE_8BIT_VIEWER", False))
licensesModel = Property("QVariantList", _licensesModel, constant=True)
pipelineTemplateFilesChanged = Signal()
recentProjectFilesChanged = Signal()
pipelineTemplateFiles = Property("QVariantList", _pipelineTemplateFiles, notify=pipelineTemplateFilesChanged)
recentProjectFiles = Property("QVariantList", _recentProjectFiles, notify=recentProjectFilesChanged)
default8bitViewerEnabled = Property(bool, _default8bitViewerEnabled, constant=True)