diff options
author | Graham Madarasz <graham@lindenlab.com> | 2013-05-11 19:58:56 -0700 |
---|---|---|
committer | Graham Madarasz <graham@lindenlab.com> | 2013-05-11 19:58:56 -0700 |
commit | f356d7eb9fd730f5f6f5a29fb0706e20876ad3bd (patch) | |
tree | 59b643b708e20ec3d56eaa3a0639f1346f80af10 /indra/llprimitive/llprimitive.cpp | |
parent | a0998157746d0429d5b8e75fea973c433dcfd3c4 (diff) |
Fix many issues with selection misapplication and rendering not matching applied materials
Diffstat (limited to 'indra/llprimitive/llprimitive.cpp')
-rwxr-xr-x | indra/llprimitive/llprimitive.cpp | 18 |
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? |