mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-02 10:52:03 +02:00
[ui][3D] expose status on EnvironmentMapEntity
get loading status when env map is loading in 3D view
This commit is contained in:
parent
63ffb20819
commit
5a4384916e
2 changed files with 8 additions and 2 deletions
|
@ -22,6 +22,8 @@ Entity {
|
|||
property alias rings: sphereMesh.rings
|
||||
/// Position of the sphere
|
||||
property alias position: transform.translation
|
||||
/// Texture loading status
|
||||
property alias status: textureLoader.status
|
||||
|
||||
components: [
|
||||
SphereMesh {
|
||||
|
@ -39,6 +41,7 @@ Entity {
|
|||
shininess: 0
|
||||
specular: "#000"
|
||||
diffuse: TextureLoader {
|
||||
id: textureLoader
|
||||
magnificationFilter: Texture.Linear
|
||||
mirrored: true
|
||||
source: root.source
|
||||
|
|
|
@ -125,13 +125,16 @@ import Utils 1.0
|
|||
}
|
||||
|
||||
// - [2] as an environment map
|
||||
obj.destroy()
|
||||
obj.destroy();
|
||||
root.status = SceneLoader.Loading;
|
||||
obj = Qt.createComponent("EnvironmentMapEntity.qml").createObject(
|
||||
exrLoaderEntity, {
|
||||
'source': source,
|
||||
'position': Qt.binding(function() { return root.camera.position })
|
||||
});
|
||||
root.status = SceneLoader.Ready;
|
||||
obj.statusChanged.connect(function() {
|
||||
root.status = obj.status;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue