From d27863733710ab23749b21755be245bc7a303f12 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Mon, 20 Jun 2011 12:43:10 +0000 Subject: 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. --- source/blender/collada/SkinInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/collada/SkinInfo.cpp') diff --git a/source/blender/collada/SkinInfo.cpp b/source/blender/collada/SkinInfo.cpp index 10780de2e70..83b9449c8f2 100644 --- a/source/blender/collada/SkinInfo.cpp +++ b/source/blender/collada/SkinInfo.cpp @@ -48,12 +48,12 @@ #include "SkinInfo.h" #include "collada_utils.h" -// use this for retrieving bone names, since these must be unique +// use name, or fall back to original id if name not present (name is optional) template 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(); } // This is used to store data passed in write_controller_data. -- cgit v1.2.3