Imports glTF 2 scenes into a Qt 3D Scene. More...
Since: | Kuesa 1.0 |
Instantiates: | GLTF2Importer |
Inherits: |
GLTF2Importer imports glTF 2 scenes into a Qt 3D scene.
import Kuesa 1.1 as Kuesa Kuesa.SceneEntity { id: scene Kuesa.GLTF2Importer { sceneEntity: scene source: "file:///source.gltf" } }
If a Kuesa::SceneEntity has been set on the importer, various Qt 3D resources generated upon import will be registered into named collections. If no name is specified and assignNames is true, a default name will be assigned to the asset. If several assets of the same type share the same name, subsequent assets will be given unique names by appending an index.
Below is a list of Qt 3D resources currently registered into collections:
As far as glTF is concerned, a material could be used for skinned as well as regular meshes. This doesn't match with how Qt 3D works. If a material named "Mat" is used for both skinned and regular meshes, the importer will register two materials:
Specifies which glTF scene should be loaded. Defaults to index GLTF2Importer.DefaultScene.
if true, assets with no names will be added to collections with default names (default is false)
if true, parsing is performed in a non blocking manner from a secondary thread. This is false by default.
options : Kuesa.GLTF2Options |
Holds the Kuesa.GLTF2Options used to select what to import/generate
sceneEntity : Kuesa.SceneEntity |
pointer to the SceneEntity with which assets will be registered as they are loaded from the glTF file.