mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-05 20:31:56 +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
|
property alias rings: sphereMesh.rings
|
||||||
/// Position of the sphere
|
/// Position of the sphere
|
||||||
property alias position: transform.translation
|
property alias position: transform.translation
|
||||||
|
/// Texture loading status
|
||||||
|
property alias status: textureLoader.status
|
||||||
|
|
||||||
components: [
|
components: [
|
||||||
SphereMesh {
|
SphereMesh {
|
||||||
|
@ -39,6 +41,7 @@ Entity {
|
||||||
shininess: 0
|
shininess: 0
|
||||||
specular: "#000"
|
specular: "#000"
|
||||||
diffuse: TextureLoader {
|
diffuse: TextureLoader {
|
||||||
|
id: textureLoader
|
||||||
magnificationFilter: Texture.Linear
|
magnificationFilter: Texture.Linear
|
||||||
mirrored: true
|
mirrored: true
|
||||||
source: root.source
|
source: root.source
|
||||||
|
|
|
@ -125,13 +125,16 @@ import Utils 1.0
|
||||||
}
|
}
|
||||||
|
|
||||||
// - [2] as an environment map
|
// - [2] as an environment map
|
||||||
obj.destroy()
|
obj.destroy();
|
||||||
|
root.status = SceneLoader.Loading;
|
||||||
obj = Qt.createComponent("EnvironmentMapEntity.qml").createObject(
|
obj = Qt.createComponent("EnvironmentMapEntity.qml").createObject(
|
||||||
exrLoaderEntity, {
|
exrLoaderEntity, {
|
||||||
'source': source,
|
'source': source,
|
||||||
'position': Qt.binding(function() { return root.camera.position })
|
'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