Add a materialVariant import option for KHR_materials_variants


KHR_materials_variants assets import with their default materials, as
the scene description has no concept of switching material sets. The
new materialVariant option selects a named variant at import time
instead. An unknown name warns, lists the available variants and falls
back to the default materials, since one option may be applied to a
batch of assets that do not all define it.

The parser validates the variant mappings, and the document model
resolves a variant to each primitive's effective material in one
place. The model's material list, the mesh subset names and the
tangent generation decision all go through it. Balsam's command line
handling learns a String option type for the new option.

The change that follows exposes the variant list and the per-model
material tables, so that a variant can also be switched at runtime.

[ChangeLog][Asset Import] The glTF importer's new materialVariant option
selects which KHR_materials_variants variant balsam imports; the default
materials are used when the option is not set.

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