From 5f8110a68ed2fdfe70e2dbd7363f1194b0f3e67d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Tue, 14 Dec 2010 15:52:26 -0500 Subject: SH-439 FIX: track name requested in UI separately, so we can fall back to name from dae if needed --- indra/llprimitive/llmodel.cpp | 8 ++++++++ indra/llprimitive/llmodel.h | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) mode change 100644 => 100755 indra/llprimitive/llmodel.cpp mode change 100644 => 100755 indra/llprimitive/llmodel.h (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp old mode 100644 new mode 100755 index b486e17194..2a8505e16e --- 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 old mode 100644 new mode 100755 index b81bc662a0..9cc734ff59 --- 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 mInvBindMatrix; std::vector mAlternateBindMatrix; - std::string mLabel; + std::string mRequestedLabel; // name requested in UI, if any. + std::string mLabel; // name computed from dae. LLVector3 mNormalizedScale; LLVector3 mNormalizedTranslation; -- cgit v1.2.3