[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()
{
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

View file

@ -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 }