diff options
author | andreykproductengine <akleshchev@productengine.com> | 2014-11-20 18:23:07 +0200 |
---|---|---|
committer | andreykproductengine <akleshchev@productengine.com> | 2014-11-20 18:23:07 +0200 |
commit | bec06763d5e55dde5148ee8882c04ddfee9dd859 (patch) | |
tree | 739fbd378d9c8ccce1e95a03dfc02ed94022ab01 /indra/llprimitive/lldaeloader.cpp | |
parent | 7894a0bb9a72f1e910157d4ac50047b7e894d5e2 (diff) |
MAINT-4631 FIXED [loader mods] door model is missing triangles when uploaded.
Diffstat (limited to 'indra/llprimitive/lldaeloader.cpp')
-rw-r--r-- | indra/llprimitive/lldaeloader.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index b88913cf49..40b78ffa9d 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -53,6 +53,8 @@ #pragma warning (default : 4264) #endif +#include <boost/lexical_cast.hpp> + #include "lldaeloader.h" #include "llsdserialize.h" #include "lljoint.h" @@ -2128,19 +2130,24 @@ std::string LLDAELoader::getElementLabel(daeElement *element) // if we have a parent, use it daeElement* parent = element->getParent(); + std::string index_string; if (parent) { + U32 ind = 0; + parent->getChildren().find(element, ind); + index_string = "_" + boost::lexical_cast<std::string>(ind); + // if parent has a name, use it std::string name = parent->getAttribute("name"); if (name.length()) { - return name; + return name + index_string; } // if parent has an ID, use it if (parent->getID()) { - return std::string(parent->getID()); + return std::string(parent->getID()) + index_string; } } @@ -2148,11 +2155,11 @@ std::string LLDAELoader::getElementLabel(daeElement *element) daeString element_name = element->getElementName(); if (element_name) { - return std::string(element_name); + return std::string(element_name) + index_string; } // if all else fails, use "object" - return std::string("object"); + return std::string("object") + index_string; } LLColor4 LLDAELoader::getDaeColor(daeElement* element) |