Collada: Read all instance_material child nodes
parent
80b0b897ed
commit
e671d087e1
|
@ -2242,7 +2242,11 @@ void ColladaParser::ReadNodeGeometry(XmlNode &node, Node *pNode) {
|
||||||
if (currentName == "bind_material") {
|
if (currentName == "bind_material") {
|
||||||
XmlNode techNode = currentNode.child("technique_common");
|
XmlNode techNode = currentNode.child("technique_common");
|
||||||
if (techNode) {
|
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
|
// read ID of the geometry subgroup and the target material
|
||||||
std::string group;
|
std::string group;
|
||||||
XmlParser::getStdStrAttribute(instanceMatNode, "symbol", group);
|
XmlParser::getStdStrAttribute(instanceMatNode, "symbol", group);
|
||||||
|
@ -2259,6 +2263,8 @@ void ColladaParser::ReadNodeGeometry(XmlNode &node, Node *pNode) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// store it
|
// store it
|
||||||
pNode->mMeshes.push_back(instance);
|
pNode->mMeshes.push_back(instance);
|
||||||
|
|
Loading…
Reference in New Issue