[ui] 3D Viewer: Alembic support

* optional and only available if AlembicEntity QML plugin is in QML import path
* 3D viewer can load a 3D model and an Alembic file at the same time
* add contextual menu options to unload model/Alembic
This commit is contained in:
Yann Lanthony 2018-01-09 18:54:57 +01:00
parent de49c00e26
commit cc4a24f5f3
4 changed files with 84 additions and 8 deletions

View file

@ -29,7 +29,10 @@ Item {
// Load a 3D media file in the 3D viewer
function load3DMedia(filepath)
{
viewer3D.source = filepath
if(Filepath.extension(filepath) === ".abc")
viewer3D.abcSource = filepath
else
viewer3D.source = filepath
}
SystemPalette { id: palette }
@ -73,7 +76,7 @@ Item {
anchors.fill: parent
DropArea {
anchors.fill: parent
onDropped: viewer3D.source = drop.urls[0]
onDropped: load3DMedia(drop.urls[0])
}
}