[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.
This commit is contained in:
Yann Lanthony 2018-01-29 14:43:29 +01:00
parent 1f223ccc54
commit a582a2f5c1
2 changed files with 3 additions and 6 deletions

View file

@ -122,8 +122,7 @@ FocusScope {
function clearAbc() function clearAbc()
{ {
abcSource = '' // does not work yet by itself abcSource = ''
abcLoaderEntity.reload() // need to re-create the alembic loader
} }
Scene3D { Scene3D {
@ -281,8 +280,7 @@ FocusScope {
property Entity abcLoader: undefined property Entity abcLoader: undefined
enabled: showSfMCheckBox.checked enabled: showSfMCheckBox.checked
Component.onCompleted: reload() Component.onCompleted: {
function reload() {
if(!root.supportAlembic) // Alembic plugin not available if(!root.supportAlembic) // Alembic plugin not available
return return

View file

@ -42,13 +42,12 @@ Item {
Connections { Connections {
target: reconstruction target: reconstruction
onSfmChanged: loadSfmAbc()
onSfmReportChanged: loadSfmAbc() onSfmReportChanged: loadSfmAbc()
} }
function loadSfmAbc() function loadSfmAbc()
{ {
workspaceView.load3DMedia(reconstruction.sfm.attribute('output').value) load3DMedia(reconstruction.sfm.attribute('output').value)
} }
SystemPalette { id: palette } SystemPalette { id: palette }