summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llprimitive.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2013-05-10 10:50:50 +0200
committerKitty Barnett <develop@catznip.com>2013-05-10 10:50:50 +0200
commit269b8b7de53f368791fbffde8a6f8d47d9cbbcdc (patch)
treeecf0e433fb897a2e30d1e283004e8cdb69c0fbbc /indra/llprimitive/llprimitive.cpp
parentd8f2ecd5b3f0cb8475fa1d092cc7a315ca1e8ca9 (diff)
NORSPEC-102 Rapid materials updates are not smooth to viewer which is editing the object
Diffstat (limited to 'indra/llprimitive/llprimitive.cpp')
-rw-r--r--indra/llprimitive/llprimitive.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index 0578f0b192..3f57dbe26d 100644
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -373,6 +373,24 @@ S32 LLPrimitive::setTEMaterialParams(const U8 index, const LLMaterialPtr pMateri
return mTextureList.setMaterialParams(index, pMaterialParams);
}
+void LLPrimitive::setAllTESelected(bool sel)
+{
+ for (int i = 0, cnt = getNumTEs(); i < cnt; i++)
+ {
+ setTESelected(i, sel);
+ }
+}
+
+void LLPrimitive::setTESelected(const U8 te, bool sel)
+{
+ LLTextureEntry* tep = getTE(te);
+ if ( (tep) && (tep->setSelected(sel)) && (!sel) && (tep->hasPendingMaterialUpdate()) )
+ {
+ LLMaterialID material_id = tep->getMaterialID();
+ setTEMaterialID(te, material_id);
+ }
+}
+
LLPCode LLPrimitive::legacyToPCode(const U8 legacy)
{
// TODO: Should this default to something valid?