mirror of
https://git.mirrors.martin98.com/https://github.com/syoyo/tinygltf.git
synced 2025-08-14 15:25:57 +08:00
Material names are stored once in material.name, then duplicated in "additionalValues"
This patch prevent this duplication
This commit is contained in:
parent
0ccc8dc262
commit
dab0daaedf
@ -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