summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-10-27 11:27:21 -0500
committerDave Parks <davep@lindenlab.com>2022-10-27 11:27:21 -0500
commit0451d51f4da9780e2f650b67672a29b3d07cb386 (patch)
treef8b559b6b7389f82a1239715f6aa1ae6d74eaa47 /indra/newview/llviewerobject.cpp
parenteb4581edf27a19641e3cd29c54a161548544fbeb (diff)
SL-18459 WIP -- fix for assert in setGLTFMaterial
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index aebeeb21ac..251af1b46e 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -7234,22 +7234,11 @@ void LLViewerObject::setRenderMaterialIDs(const LLRenderMaterialParams* material
{
if (!local_origin)
{
- const S32 num_tes = llmin((S32)getNumTEs(), (S32)getNumFaces()); // avatars have TEs but no faces
- for (S32 te = 0; te < num_tes; ++te)
+ for (S32 te = 0; te < getNumTEs(); ++te)
{
const LLUUID& id = material_params ? material_params->getMaterial(te) : LLUUID::null;
- if (id.notNull())
- {
- getTE(te)->setGLTFMaterial(gGLTFMaterialList.getMaterial(id));
- setHasRenderMaterialParams(true);
- }
- else
- {
- getTE(te)->setGLTFMaterial(nullptr);
- }
+ setRenderMaterialID(te, id, false);
}
- faceMappingChanged();
- gPipeline.markTextured(mDrawable);
}
}