summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive')
-rwxr-xr-xindra/llprimitive/llprimitive.cpp5
-rwxr-xr-xindra/llprimitive/llprimitive.h2
-rwxr-xr-xindra/llprimitive/llprimtexturelist.cpp10
-rwxr-xr-xindra/llprimitive/llprimtexturelist.h2
4 files changed, 19 insertions, 0 deletions
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index a505ea04a7..aa44dc67d5 100755
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -324,6 +324,11 @@ S32 LLPrimitive::setTEMaterialParams(const U8 index, const LLMaterialPtr pMateri
return mTextureList.setMaterialParams(index, pMaterialParams);
}
+LLMaterialPtr LLPrimitive::getTEMaterialParams(const U8 index)
+{
+ return mTextureList.getMaterialParams(index);
+}
+
//===============================================================
S32 LLPrimitive::setTEBumpShinyFullbright(const U8 index, const U8 bump)
{
diff --git a/indra/llprimitive/llprimitive.h b/indra/llprimitive/llprimitive.h
index cdb3f273c2..1bf83e36b4 100755
--- a/indra/llprimitive/llprimitive.h
+++ b/indra/llprimitive/llprimitive.h
@@ -389,6 +389,8 @@ public:
virtual BOOL setMaterial(const U8 material); // returns TRUE if material changed
virtual void setTESelected(const U8 te, bool sel);
+ LLMaterialPtr getTEMaterialParams(const U8 index);
+
void copyTEs(const LLPrimitive *primitive);
S32 packTEField(U8 *cur_ptr, U8 *data_ptr, U8 data_size, U8 last_face_index, EMsgVariableType type) const;
S32 unpackTEField(U8 *cur_ptr, U8 *buffer_end, U8 *data_ptr, U8 data_size, U8 face_count, EMsgVariableType type);
diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp
index dfae9699ec..f4f08248b8 100755
--- a/indra/llprimitive/llprimtexturelist.cpp
+++ b/indra/llprimitive/llprimtexturelist.cpp
@@ -377,6 +377,16 @@ S32 LLPrimTextureList::setMaterialParams(const U8 index, const LLMaterialPtr pMa
return TEM_CHANGE_NONE;
}
+LLMaterialPtr LLPrimTextureList::getMaterialParams(const U8 index)
+{
+ if (index < mEntryList.size())
+ {
+ return mEntryList[index]->getMaterialParams();
+ }
+
+ return LLMaterialPtr();
+}
+
S32 LLPrimTextureList::size() const
{
return mEntryList.size();
diff --git a/indra/llprimitive/llprimtexturelist.h b/indra/llprimitive/llprimtexturelist.h
index d7fabbbb79..49c636e40f 100755
--- a/indra/llprimitive/llprimtexturelist.h
+++ b/indra/llprimitive/llprimtexturelist.h
@@ -107,6 +107,8 @@ public:
S32 setMaterialID(const U8 index, const LLMaterialID& pMaterialID);
S32 setMaterialParams(const U8 index, const LLMaterialPtr pMaterialParams);
+ LLMaterialPtr getMaterialParams(const U8 index);
+
S32 size() const;
// void forceResize(S32 new_size);