RuntimeLoader: Add query() and queryAll() methods
Add two new methods to QQuick3DRuntimeLoader that allow callers to
inspect the scene after a successful load:
query(string) looks up a single object by name or by hierarchical path
(e.g. "/RuntimeLoaderRoot/Wall/Material") and returns null when not
found.
queryAll(QueryFilter) returns all objects of the requested category
(Materials, Textures, Cameras, Lights, Models, or plain Nodes).
A new simpleruntimeloader example demonstrates both methods by
populating material, camera and light lists from the loaded glTF scene
and allowing interactive colour changes, camera switching, and toggling
the lights on and off.
Change-Id: I3779c1d3a19e5687874884f2376702ea37451a36
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| commit | 716ade54d0ea447b2550cf3ad3d3a0b7fb647f59 |
| parent | 48e1be7bc16379dc832b3bf510884d84c6387aa4 |
| author | Christian Strømme <christian.stromme@qt.io> |
| committer | Christian Strømme <christian.stromme@qt.io> |
| commit time | Mon, 1 Jun 2026 13:01:32 +0000 |
- M REUSE.toml
- M examples/quick3d/CMakeLists.txt
- A examples/quick3d/simpleruntimeloader/CMakeLists.txt
- A examples/quick3d/simpleruntimeloader/doc/images/simpleruntimeloader.jpg
- A examples/quick3d/simpleruntimeloader/doc/src/simpleruntimeloader.qdoc
- A examples/quick3d/simpleruntimeloader/main.cpp
- A examples/quick3d/simpleruntimeloader/main.qml
- A examples/quick3d/simpleruntimeloader/torus_and_cone.glb
- M src/assetutils/qquick3druntimeloader.cpp
- M src/assetutils/qquick3druntimeloader_p.h
- M src/assetutils/qssgqmlutilities.cpp
- M src/assetutils/qssgqmlutilities_p.h
- M src/assetutils/qssgrtutilities.cpp
- M src/assetutils/qssgrtutilities_p.h
- M src/assetutils/qtquick3dassetutilsglobal_p.h
- M src/plugins/assetimporters/assimp/assimpimporter_rt.cpp
- M tests/auto/quick3d_visual/CMakeLists.txt
- A tests/auto/quick3d_visual/runtimeloader/CMakeLists.txt
- A tests/auto/quick3d_visual/runtimeloader/data/queryall.qml
- A tests/auto/quick3d_visual/runtimeloader/data/torus_and_cone.glb
- A tests/auto/quick3d_visual/runtimeloader/tst_runtimeloader.cpp