summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llprimitive.cpp
diff options
context:
space:
mode:
authorGraham Madarasz <graham@lindenlab.com>2013-05-11 19:58:56 -0700
committerGraham Madarasz <graham@lindenlab.com>2013-05-11 19:58:56 -0700
commitf356d7eb9fd730f5f6f5a29fb0706e20876ad3bd (patch)
tree59b643b708e20ec3d56eaa3a0639f1346f80af10 /indra/llprimitive/llprimitive.cpp
parenta0998157746d0429d5b8e75fea973c433dcfd3c4 (diff)
Fix many issues with selection misapplication and rendering not matching applied materials
Diffstat (limited to 'indra/llprimitive/llprimitive.cpp')
-rwxr-xr-xindra/llprimitive/llprimitive.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp
index e5905c3a3b..2fa77177f5 100755
--- a/indra/llprimitive/llprimitive.cpp
+++ b/indra/llprimitive/llprimitive.cpp
@@ -374,6 +374,24 @@ S32 LLPrimitive::setTEGlow(const U8 index, const F32 glow)
return mTextureList.setGlow(index, glow);
}
+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?