diff options
Diffstat (limited to 'indra/llprimitive')
-rwxr-xr-x[-rw-r--r--] | indra/llprimitive/llmodel.cpp | 8 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/llprimitive/llmodel.h | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index b486e17194..2a8505e16e 100644..100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1324,6 +1324,14 @@ LLModel* LLModel::loadModelFromDomMesh(domMesh *mesh) return ret; } +std::string LLModel::getName() const +{ + if (!mRequestedLabel.empty()) + return mRequestedLabel; + else + return mLabel; +} + //static LLSD LLModel::writeModel( std::string filename, diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index b81bc662a0..9cc734ff59 100644..100755 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -100,6 +100,7 @@ public: static LLModel* loadModelFromDae(std::string filename); static LLModel* loadModelFromDomMesh(domMesh* mesh); static std::string getElementLabel(daeElement* element); + std::string getName() const; void appendFaces(LLModel* model, LLMatrix4& transform, LLMatrix4& normal_transform); void appendFace(const LLVolumeFace& src_face, std::string src_material, LLMatrix4& mat, LLMatrix4& norm_mat); @@ -185,7 +186,8 @@ public: LLMatrix4 mBindShapeMatrix; std::vector<LLMatrix4> mInvBindMatrix; std::vector<LLMatrix4> mAlternateBindMatrix; - std::string mLabel; + std::string mRequestedLabel; // name requested in UI, if any. + std::string mLabel; // name computed from dae. LLVector3 mNormalizedScale; LLVector3 mNormalizedTranslation; |