From e33b69a428e1f21a979621817b0cf0b337be260e Mon Sep 17 00:00:00 2001 From: contriteobserver Date: Thu, 28 Jan 2021 13:06:02 -0800 Subject: [PATCH] Collada importer now identifies animations addresses issue #3584 --- code/AssetLib/Collada/ColladaParser.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/code/AssetLib/Collada/ColladaParser.cpp b/code/AssetLib/Collada/ColladaParser.cpp index f78b51047..52d3196df 100644 --- a/code/AssetLib/Collada/ColladaParser.cpp +++ b/code/AssetLib/Collada/ColladaParser.cpp @@ -530,17 +530,17 @@ void ColladaParser::ReadAnimation(XmlNode &node, Collada::Animation *pParent) { // have it read into a channel ChannelMap::iterator newChannel = channels.insert(std::make_pair(id, AnimationChannel())).first; ReadAnimationSampler(currentNode, newChannel->second); - } else if (currentName == "channel") { - std::string source_name, target; - XmlParser::getStdStrAttribute(currentNode, "source", source_name); - XmlParser::getStdStrAttribute(currentNode, "target", target); - if (source_name[0] == '#') { - source_name = source_name.substr(1, source_name.size() - 1); - } - ChannelMap::iterator cit = channels.find(source_name); - if (cit != channels.end()) { - cit->second.mTarget = target; - } + } + } else if (currentName == "channel") { + std::string source_name, target; + XmlParser::getStdStrAttribute(currentNode, "source", source_name); + XmlParser::getStdStrAttribute(currentNode, "target", target); + if (source_name[0] == '#') { + source_name = source_name.substr(1, source_name.size() - 1); + } + ChannelMap::iterator cit = channels.find(source_name); + if (cit != channels.end()) { + cit->second.mTarget = target; } } }