diff options
Diffstat (limited to 'indra/newview/llpanelface.cpp')
| -rw-r--r-- | indra/newview/llpanelface.cpp | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 64b31a25f4..9d720b1523 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -975,9 +975,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) color_swatch->setOriginal(color); color_swatch->set(color, force_set_values || (prev_color != color) || !editable); - color_swatch->setValid(editable); - color_swatch->setEnabled( editable ); - color_swatch->setCanApplyImmediately( editable ); + color_swatch->setValid(editable && !has_pbr_material); + color_swatch->setEnabled( editable && !has_pbr_material); + color_swatch->setCanApplyImmediately( editable && !has_pbr_material); } // Color transparency @@ -1434,7 +1434,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) LLSelectedTE::getFullbright(fullbright_flag,identical_fullbright); getChild<LLUICtrl>("checkbox fullbright")->setValue((S32)(fullbright_flag != 0)); - getChildView("checkbox fullbright")->setEnabled(editable); + getChildView("checkbox fullbright")->setEnabled(editable && !has_pbr_material); getChild<LLUICtrl>("checkbox fullbright")->setTentative(!identical_fullbright); } @@ -4232,6 +4232,8 @@ void LLPanelFace::onPasteTexture() LLPanelFaceUpdateFunctor sendfunc(true, true); selected_objects->applyToObjects(&sendfunc); + LLGLTFMaterialList::flushUpdates(); + LLPanelFaceNavigateHomeFunctor navigate_home_func; selected_objects->applyToTEs(&navigate_home_func); } @@ -4366,7 +4368,7 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te) // PBR/GLTF if (te_data["te"].has("pbr")) { - objectp->setRenderMaterialID(te, te_data["te"]["pbr"].asUUID(), false /*send in bulk later*/); + objectp->setRenderMaterialID(te, te_data["te"]["pbr"].asUUID(), false /*managing our own update*/); tep->setGLTFRenderMaterial(nullptr); tep->setGLTFMaterialOverride(nullptr); @@ -4377,12 +4379,14 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te) { override_data["gltf_json"] = te_data["te"]["pbr_override"]; } + else + { + override_data["gltf_json"] = ""; + } + + override_data["asset_id"] = te_data["te"]["pbr"].asUUID(); - LLCoros::instance().launch("modifyMaterialCoro", - std::bind(&LLGLTFMaterialList::modifyMaterialCoro, - gAgent.getRegionCapability("ModifyMaterialParams"), - override_data, - nullptr)); + LLGLTFMaterialList::queueUpdate(override_data); } else { @@ -4391,12 +4395,7 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te) tep->setGLTFMaterialOverride(nullptr); // blank out any override data on the server - LLCoros::instance().launch("modifyMaterialCoro", - std::bind(&LLGLTFMaterialList::modifyMaterialCoro, - gAgent.getRegionCapability("ModifyMaterialParams"), - llsd::map( - "object_id", objectp->getID(), - "side", te), nullptr)); + LLGLTFMaterialList::queueApply(objectp->getID(), te, LLUUID::null); } // Texture map |
