Merge pull request #4339 from Esri/jere9309/read_collada_materials
Collada: Read all instance_material child nodespull/4346/head
commit
141c6ca270
|
@ -2251,7 +2251,11 @@ void ColladaParser::ReadNodeGeometry(XmlNode &node, Node *pNode) {
|
|||
if (currentName == "bind_material") {
|
||||
XmlNode techNode = currentNode.child("technique_common");
|
||||
if (techNode) {
|
||||
XmlNode instanceMatNode = techNode.child("instance_material");
|
||||
for (XmlNode instanceMatNode = techNode.child("instance_material"); instanceMatNode; instanceMatNode = instanceMatNode.next_sibling())
|
||||
{
|
||||
const std::string &instance_name = instanceMatNode.name();
|
||||
if (instance_name == "instance_material")
|
||||
{
|
||||
// read ID of the geometry subgroup and the target material
|
||||
std::string group;
|
||||
XmlParser::getStdStrAttribute(instanceMatNode, "symbol", group);
|
||||
|
@ -2268,6 +2272,8 @@ void ColladaParser::ReadNodeGeometry(XmlNode &node, Node *pNode) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// store it
|
||||
pNode->mMeshes.push_back(instance);
|
||||
|
|
Loading…
Reference in New Issue