diff options
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 47 |
1 files changed, 1 insertions, 46 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 2475900d0e..e4a67d7982 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1948,52 +1948,7 @@ void LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id) objectp->setParameterEntryInUse(LLNetworkData::PARAMS_RENDER_MATERIAL, TRUE, false /*prevent an update*/); } - if (te != -1) - { - LLTextureEntry* tep = objectp->getTE(te); - if (asset_id.notNull()) - { - tep->setGLTFMaterial(gGLTFMaterialList.getMaterial(asset_id)); - } - else - { - tep->setGLTFMaterial(nullptr); - } - - objectp->faceMappingChanged(); - gPipeline.markTextured(objectp->mDrawable); - - LLRenderMaterialParams* param_block = (LLRenderMaterialParams*)objectp->getParameterEntry(LLNetworkData::PARAMS_RENDER_MATERIAL); - if (param_block) - { - param_block->setMaterial(te, asset_id); - } - } - else // Shouldn't happen? - { - S32 num_faces = objectp->getNumTEs(); - for (S32 face = 0; face < num_faces; face++) - { - LLTextureEntry* tep = objectp->getTE(face); - if (asset_id.notNull()) - { - tep->setGLTFMaterial(gGLTFMaterialList.getMaterial(asset_id)); - } - else - { - tep->setGLTFMaterial(nullptr); - } - - objectp->faceMappingChanged(); - gPipeline.markTextured(objectp->mDrawable); - - LLRenderMaterialParams* param_block = (LLRenderMaterialParams*)objectp->getParameterEntry(LLNetworkData::PARAMS_RENDER_MATERIAL); - if (param_block) - { - param_block->setMaterial(face, asset_id); - } - } - } + objectp->setRenderMaterialID(te, asset_id); return true; } |