From a43117b2985ff68bd0a461ca0cf149a40022a93b Mon Sep 17 00:00:00 2001 From: Aurore LAFAURIE Date: Tue, 9 Jul 2024 16:31:11 +0200 Subject: [PATCH] [ui] Add MESHROOM_USE_SEQUENCE_PLAYER environment variable --- meshroom/ui/app.py | 4 ++++ meshroom/ui/qml/Viewer/Viewer2D.qml | 3 ++- meshroom/ui/qml/WorkspaceView.qml | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/meshroom/ui/app.py b/meshroom/ui/app.py index 16b2e14d..e2c05c09 100644 --- a/meshroom/ui/app.py +++ b/meshroom/ui/app.py @@ -463,6 +463,9 @@ class MeshroomApp(QApplication): def _default8bitViewerEnabled(self): return bool(os.environ.get("MESHROOM_USE_8BIT_VIEWER", False)) + + def _defaultSequencePlayerEnabled(self): + return bool(os.environ.get("MESHROOM_USE_SEQUENCE_PLAYER", False)) activeProjectChanged = Signal() activeProject = Property(Variant, lambda self: self._activeProject, notify=activeProjectChanged) @@ -476,3 +479,4 @@ class MeshroomApp(QApplication): recentProjectFiles = Property("QVariantList", _recentProjectFiles, notify=recentProjectFilesChanged) recentImportedImagesFolders = Property("QVariantList", _recentImportedImagesFolders, notify=recentImportedImagesFoldersChanged) default8bitViewerEnabled = Property(bool, _default8bitViewerEnabled, constant=True) + defaultSequencePlayerEnabled = Property(bool, _defaultSequencePlayerEnabled, constant=True) diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index 223a5ff1..adcb3094 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -279,6 +279,8 @@ FocusScope { currentFrame = frameRange.min } + enableSequencePlayerAction.checked = true + return resolved } else { for (let i = 0; i < _reconstruction.viewpoints.count; i++) { @@ -347,7 +349,6 @@ FocusScope { } else { root.source = "" root.sequence = getSequence() - enableSequencePlayerAction.checked = true } } diff --git a/meshroom/ui/qml/WorkspaceView.qml b/meshroom/ui/qml/WorkspaceView.qml index 8b1b3a9a..ba01f0e7 100644 --- a/meshroom/ui/qml/WorkspaceView.qml +++ b/meshroom/ui/qml/WorkspaceView.qml @@ -157,7 +157,7 @@ Item { id: enableSequencePlayerAction text: "Enable Sequence Player" checkable: true - checked: true + checked: MeshroomApp.defaultSequencePlayerEnabled } } }