mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 11:56:07 +08:00
Merge pull request #171 from Ybalrid/fix_double_parse_material_name
Material names are stored once in material.name, then duplicated in "additionalValues"
This commit is contained in:
commit
5f180aaf74
@ -3457,7 +3457,9 @@ static bool ParseMaterial(Material *material, std::string *err, const json &o) {
|
||||
} else {
|
||||
Parameter param;
|
||||
if (ParseParameterProperty(¶m, err, o, it.key(), false)) {
|
||||
material->additionalValues[it.key()] = param;
|
||||
// names of materials have already been parsed. Putting it in this map
|
||||
// doesn't correctly reflext the glTF specification
|
||||
if (it.key() != "name") material->additionalValues[it.key()] = param;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user