Details
Description
When importing models using Balsam the resulting QML component does not always resolve the .mesh url in the correct context.
When running the attached project I get the following error:
QSSG.warning: Failed to load mesh: C:/example_test/Test3DImport/content/meshes/waterBottle.mesh
The path to the .mesh file is wrong and resolved in relation to the wrong context (Screen01.ui.qml).
WaterBottle.qml is broken while ToyCar.qml works as expected.
The reason is that in WaterBottle.qml the source URL is defined in the root component, while in ToyCar.qml the source URL is defined in a child and the root node is a 'Node'.
If manually add a Node around the Model in WaterBottle.qml the issue is fixed. Alternatively, I can use Qt.resolvedUrl().
The project I used for testing is attached.
This has to be fixed in the importer by either always adding a Node around all Models or by using Qt.resolvedUrl().
//Node { - Adding an extra Node does fix the issue Model { id: waterBottle rotation: Qt.quaternion(0, 0, 1, 0) scale.z: 10 scale.y: 10 scale.x: 10 source: "meshes/waterBottle.mesh" //Qt.resolvedUrl would fix this!
The used models are gltf reference models from Kronos (https://github.com/KhronosGroup/glTF-Sample-Models).
Attachments
Issue Links
- relates to
-
QTBUG-102390 Qt.quaternion() always has precedence over eulerAngles even in derived components
-
- Closed
-