mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-07 21:31:56 +02:00
[Viewer] Fix of side effects from output sequence in SequencePlayer
Unsync 3D Viewer and SequencePlayer if it is output sequence and set to 0 the frame displayed when changing sequence
This commit is contained in:
parent
b0063b0dde
commit
6e89cb68f6
2 changed files with 14 additions and 7 deletions
|
@ -23,6 +23,7 @@ FloatingPane {
|
||||||
// Exposed properties
|
// Exposed properties
|
||||||
property var sortedViewIds: []
|
property var sortedViewIds: []
|
||||||
property var viewer: null
|
property var viewer: null
|
||||||
|
property bool isOutputSequence: false
|
||||||
readonly property alias sync3DSelected: m.sync3DSelected
|
readonly property alias sync3DSelected: m.sync3DSelected
|
||||||
readonly property alias syncFeaturesSelected: m.syncFeaturesSelected
|
readonly property alias syncFeaturesSelected: m.syncFeaturesSelected
|
||||||
property bool loading: fetchButton.checked || m.playing
|
property bool loading: fetchButton.checked || m.playing
|
||||||
|
@ -35,6 +36,8 @@ FloatingPane {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateReconstructionView() {
|
function updateReconstructionView() {
|
||||||
|
if (isOutputSequence)
|
||||||
|
return
|
||||||
if (_reconstruction && m.frame >= 0 && m.frame < sortedViewIds.length) {
|
if (_reconstruction && m.frame >= 0 && m.frame < sortedViewIds.length) {
|
||||||
if (!m.playing && !frameSlider.pressed){
|
if (!m.playing && !frameSlider.pressed){
|
||||||
_reconstruction.selectedViewId = sortedViewIds[m.frame];
|
_reconstruction.selectedViewId = sortedViewIds[m.frame];
|
||||||
|
@ -47,6 +50,12 @@ FloatingPane {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onIsOutputSequenceChanged: {
|
||||||
|
if (!isOutputSequence) {
|
||||||
|
frameId = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Sequence player model:
|
// Sequence player model:
|
||||||
// - current frame
|
// - current frame
|
||||||
// - data related to automatic sequence playing
|
// - data related to automatic sequence playing
|
||||||
|
|
|
@ -31,7 +31,7 @@ FocusScope {
|
||||||
|
|
||||||
readonly property alias sync3DSelected: sequencePlayer.sync3DSelected
|
readonly property alias sync3DSelected: sequencePlayer.sync3DSelected
|
||||||
property var sequence: []
|
property var sequence: []
|
||||||
property int currentFrame: sequencePlayer.frameId
|
property alias currentFrame: sequencePlayer.frameId
|
||||||
|
|
||||||
QtObject {
|
QtObject {
|
||||||
id: m
|
id: m
|
||||||
|
@ -261,6 +261,7 @@ FocusScope {
|
||||||
let objs = []
|
let objs = []
|
||||||
|
|
||||||
if (displayedNode && displayedNode.hasSequenceOutput) {
|
if (displayedNode && displayedNode.hasSequenceOutput) {
|
||||||
|
currentFrame = 0
|
||||||
objs = Filepath.resolve(path_template, null)
|
objs = Filepath.resolve(path_template, null)
|
||||||
//order by path
|
//order by path
|
||||||
objs.sort()
|
objs.sort()
|
||||||
|
@ -310,11 +311,7 @@ FocusScope {
|
||||||
// store attr name for output attributes that represent images
|
// store attr name for output attributes that represent images
|
||||||
for (var i = 0; i < displayedNode.attributes.count; i++) {
|
for (var i = 0; i < displayedNode.attributes.count; i++) {
|
||||||
var attr = displayedNode.attributes.at(i)
|
var attr = displayedNode.attributes.at(i)
|
||||||
if (attr.isOutput && attr.desc.semantic === "image" && attr.enabled) {
|
if (attr.isOutput && (attr.desc.semantic === "image" || attr.desc.semantic === "sequence") && attr.enabled) {
|
||||||
names.push(attr.name)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (attr.isOutput && attr.desc.semantic === "sequence" && attr.enabled) {
|
|
||||||
names.push(attr.name)
|
names.push(attr.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -324,7 +321,6 @@ FocusScope {
|
||||||
|
|
||||||
outputAttribute.names = names
|
outputAttribute.names = names
|
||||||
if (displayedNode && !displayedNode.hasSequenceOutput) {
|
if (displayedNode && !displayedNode.hasSequenceOutput) {
|
||||||
|
|
||||||
root.source = getImageFile()
|
root.source = getImageFile()
|
||||||
} else {
|
} else {
|
||||||
root.sequence = getSequence()
|
root.sequence = getSequence()
|
||||||
|
@ -1359,6 +1355,7 @@ FocusScope {
|
||||||
|
|
||||||
onNameChanged: {
|
onNameChanged: {
|
||||||
root.source = getImageFile()
|
root.source = getImageFile()
|
||||||
|
root.sequence = getSequence()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1462,6 +1459,7 @@ FocusScope {
|
||||||
viewer: floatImageViewerLoader.status === Loader.Ready ? floatImageViewerLoader.item : null
|
viewer: floatImageViewerLoader.status === Loader.Ready ? floatImageViewerLoader.item : null
|
||||||
visible: root.enableSequencePlayer
|
visible: root.enableSequencePlayer
|
||||||
enabled: root.enableSequencePlayer
|
enabled: root.enableSequencePlayer
|
||||||
|
isOutputSequence: root.displayedNode && root.displayedNode.hasSequenceOutput
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue