From a582a2f5c1bcfea1180afae3dcbba5ecbb26644e Mon Sep 17 00:00:00 2001 From: Yann Lanthony Date: Mon, 29 Jan 2018 14:43:29 +0100 Subject: [PATCH] [ui] improve Alembic files loading New version of AlembicEntity always clears itself when setting an url (even if it's invalid/empty). Don't need to re-create the AlembicEntity each time we load a file. --- meshroom/ui/qml/Viewer/Viewer3D.qml | 6 ++---- meshroom/ui/qml/WorkspaceView.qml | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/meshroom/ui/qml/Viewer/Viewer3D.qml b/meshroom/ui/qml/Viewer/Viewer3D.qml index 586923df..05abe36c 100644 --- a/meshroom/ui/qml/Viewer/Viewer3D.qml +++ b/meshroom/ui/qml/Viewer/Viewer3D.qml @@ -122,8 +122,7 @@ FocusScope { function clearAbc() { - abcSource = '' // does not work yet by itself - abcLoaderEntity.reload() // need to re-create the alembic loader + abcSource = '' } Scene3D { @@ -281,8 +280,7 @@ FocusScope { property Entity abcLoader: undefined enabled: showSfMCheckBox.checked - Component.onCompleted: reload() - function reload() { + Component.onCompleted: { if(!root.supportAlembic) // Alembic plugin not available return diff --git a/meshroom/ui/qml/WorkspaceView.qml b/meshroom/ui/qml/WorkspaceView.qml index e8a3c60a..1f738cc5 100644 --- a/meshroom/ui/qml/WorkspaceView.qml +++ b/meshroom/ui/qml/WorkspaceView.qml @@ -42,13 +42,12 @@ Item { Connections { target: reconstruction - onSfmChanged: loadSfmAbc() onSfmReportChanged: loadSfmAbc() } function loadSfmAbc() { - workspaceView.load3DMedia(reconstruction.sfm.attribute('output').value) + load3DMedia(reconstruction.sfm.attribute('output').value) } SystemPalette { id: palette }