Expose material variant switching in generated QML and RuntimeLoader


Instead of importing only one set of materials from an asset with
KHR_materials_variants, keep every variant's materials and let the user
switch between them. The scene description records the variant names,
and each model that varies records one material list per variant next
to its default list.

Components generated by balsam gain a materialVariant property that
those models bind their material lists to, and a read-only
materialVariants list of the available names. RuntimeLoader gets the
same two properties, and re-applies the material lists when
materialVariant changes. In both cases an empty or unknown name selects
the default materials.

Tangents are generated when any variant's material needs them. The
materialVariant import option still bakes a single variant, so that no
unused materials or textures become part of the output.

[ChangeLog][Asset Import] Assets with KHR_materials_variants now import
with all their material variants: components generated by balsam and the
RuntimeLoader both expose a materialVariant property for selecting the
active variant by name at runtime, and a materialVariants property
listing the available names.

Task-number: QTBUG-148576
Change-Id: If80d71f9fd6f8fa4732e4584b9d712986d279af9
Reviewed-by: Christian Strømme <christian.stromme@qt.io>
commit5818e81cab40633ac63d82593a0abb62455de152
parent81202b59d11d07186fbb66925918d05290d005f0
authorAndy Nichols <andy.nichols@qt.io>
committerAndy Nichols <andy.nichols@qt.io>
commit timeTue, 29 Sep 2026 11:22:16 +0000