diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-06-20 16:43:10 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-06-20 16:43:10 +0400 |
commit | d27863733710ab23749b21755be245bc7a303f12 (patch) | |
tree | 267f7098f2edc0a5df09c5383c278d4fca42593d /source/blender/collada/ArmatureImporter.cpp | |
parent | 81f5679ff50fde4085b92cb39f98efd8354fc5ef (diff) |
Fix [#26912] [Collada] Screw up with names/ids on import
Reported by Valeriy Firsov
Use the node name if it exists, fall back to id otherwise.
Diffstat (limited to 'source/blender/collada/ArmatureImporter.cpp')
-rw-r--r-- | source/blender/collada/ArmatureImporter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp index 8987e4ffaf7..8b8e89fd4f5 100644 --- a/source/blender/collada/ArmatureImporter.cpp +++ b/source/blender/collada/ArmatureImporter.cpp @@ -42,12 +42,12 @@ #include "ArmatureImporter.h" -// use this for retrieving bone names, since these must be unique +// use node name, or fall back to original id if not present (name is optional) template<class T> static const char *bc_get_joint_name(T *node) { - const std::string& id = node->getOriginalId(); - return id.size() ? id.c_str() : node->getName().c_str(); + const std::string& id = node->getName(); + return id.size() ? id.c_str() : node->getOriginalId().c_str(); } ArmatureImporter::ArmatureImporter(UnitConverter *conv, MeshImporterBase *mesh, AnimationImporterBase *anim, Scene *sce) : |