diff --git a/Changelog.md b/Changelog.md index 511931480..91f10e9fa 100644 --- a/Changelog.md +++ b/Changelog.md @@ -14,6 +14,9 @@ ## Ignition Common 3.X.X +1. Fix hierarchical submesh processing in the ColladaLoader. + * [Pull Request 78](https://github.com/ignitionrobotics/ign-common/pull/78) + ## Ignition Common 3.6.0 (2020-06-09) 1. Refactor Image::MaxColor to reduce computation time diff --git a/graphics/src/ColladaLoader.cc b/graphics/src/ColladaLoader.cc index 54f88be26..7812b36cc 100644 --- a/graphics/src/ColladaLoader.cc +++ b/graphics/src/ColladaLoader.cc @@ -466,11 +466,6 @@ void ColladaLoaderPrivate::LoadNode(tinyxml2::XMLElement *_elem, Mesh *_mesh, ignition::math::Matrix4d transform = this->LoadNodeTransform(_elem); transform = _transform * transform; - if (_elem->Attribute("name")) - { - this->currentNodeName = _elem->Attribute("name"); - } - nodeXml = _elem->FirstChildElement("node"); while (nodeXml) { @@ -478,6 +473,11 @@ void ColladaLoaderPrivate::LoadNode(tinyxml2::XMLElement *_elem, Mesh *_mesh, nodeXml = nodeXml->NextSiblingElement("node"); } + if (_elem->Attribute("name")) + { + this->currentNodeName = _elem->Attribute("name"); + } + if (_elem->FirstChildElement("instance_node")) { std::string nodeURLStr =