diff --git a/meshroom/ui/qml/Viewer/SequencePlayer.qml b/meshroom/ui/qml/Viewer/SequencePlayer.qml index e9475ec9..6feb789f 100644 --- a/meshroom/ui/qml/Viewer/SequencePlayer.qml +++ b/meshroom/ui/qml/Viewer/SequencePlayer.qml @@ -23,6 +23,7 @@ FloatingPane { // Exposed properties property var sortedViewIds: [] property var viewer: null + property bool isOutputSequence: false readonly property alias sync3DSelected: m.sync3DSelected readonly property alias syncFeaturesSelected: m.syncFeaturesSelected property bool loading: fetchButton.checked || m.playing @@ -35,6 +36,8 @@ FloatingPane { } function updateReconstructionView() { + if (isOutputSequence) + return if (_reconstruction && m.frame >= 0 && m.frame < sortedViewIds.length) { if (!m.playing && !frameSlider.pressed){ _reconstruction.selectedViewId = sortedViewIds[m.frame]; @@ -47,6 +50,12 @@ FloatingPane { } } + onIsOutputSequenceChanged: { + if (!isOutputSequence) { + frameId = 0 + } + } + // Sequence player model: // - current frame // - data related to automatic sequence playing diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index 9f743cd1..32b576e1 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -31,7 +31,7 @@ FocusScope { readonly property alias sync3DSelected: sequencePlayer.sync3DSelected property var sequence: [] - property int currentFrame: sequencePlayer.frameId + property alias currentFrame: sequencePlayer.frameId QtObject { id: m @@ -261,6 +261,7 @@ FocusScope { let objs = [] if (displayedNode && displayedNode.hasSequenceOutput) { + currentFrame = 0 objs = Filepath.resolve(path_template, null) //order by path objs.sort() @@ -310,11 +311,7 @@ FocusScope { // store attr name for output attributes that represent images for (var i = 0; i < displayedNode.attributes.count; i++) { var attr = displayedNode.attributes.at(i) - if (attr.isOutput && attr.desc.semantic === "image" && attr.enabled) { - names.push(attr.name) - } - - if (attr.isOutput && attr.desc.semantic === "sequence" && attr.enabled) { + if (attr.isOutput && (attr.desc.semantic === "image" || attr.desc.semantic === "sequence") && attr.enabled) { names.push(attr.name) } } @@ -324,7 +321,6 @@ FocusScope { outputAttribute.names = names if (displayedNode && !displayedNode.hasSequenceOutput) { - root.source = getImageFile() } else { root.sequence = getSequence() @@ -1359,6 +1355,7 @@ FocusScope { onNameChanged: { root.source = getImageFile() + root.sequence = getSequence() } } @@ -1462,6 +1459,7 @@ FocusScope { viewer: floatImageViewerLoader.status === Loader.Ready ? floatImageViewerLoader.item : null visible: root.enableSequencePlayer enabled: root.enableSequencePlayer + isOutputSequence: root.displayedNode && root.displayedNode.hasSequenceOutput } } }