diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2023-03-07 14:31:17 -0800 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-03-07 14:31:17 -0800 |
commit | baed7a64049901c6756180450da7692891bceb6f (patch) | |
tree | 2dc06eec1a5c33d9b3395bb75542465becdf4d77 | |
parent | dd8569823d97ef243661bf46400c0a92f2ae79e5 (diff) |
SL-19128: Cleanup
-rw-r--r-- | indra/newview/llselectmgr.cpp | 48 |
1 files changed, 12 insertions, 36 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 30a7f34ea8..a5f857395a 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1847,21 +1847,11 @@ void LLSelectMgr::selectionSetImage(const LLUUID& imageid) } if (mItem) { - if (te == -1) // all faces - { - LLToolDragAndDrop::dropTextureAllFaces(objectp, - mItem, - LLToolDragAndDrop::SOURCE_AGENT, - LLUUID::null); - } - else // one face - { - LLToolDragAndDrop::dropTextureOneFace(objectp, - te, - mItem, - LLToolDragAndDrop::SOURCE_AGENT, - LLUUID::null); - } + LLToolDragAndDrop::dropTextureOneFace(objectp, + te, + mItem, + LLToolDragAndDrop::SOURCE_AGENT, + LLUUID::null); } else // not an inventory item { @@ -1931,21 +1921,14 @@ void LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id) f(LLViewerInventoryItem* item, const LLUUID& id) : mItem(item), mMatId(id) {} bool apply(LLViewerObject* objectp, S32 te) { - if (objectp && !objectp->permModify()) - { - return false; - } LLUUID asset_id = mMatId; - if (mItem) + // If success, the material may be copied into the object's inventory + BOOL success = LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null); + if (!success) { - // If success, the material may be copied into the object's inventory - BOOL success = LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null); - if (!success) - { - return false; - } - asset_id = mItem->getAssetUUID(); + return false; } + asset_id = mItem->getAssetUUID(); // Blank out most override data on the object and send to server objectp->setRenderMaterialID(te, asset_id); @@ -1954,15 +1937,8 @@ void LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id) } }; - if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())) - { - getSelection()->applyNoCopyPbrMaterialToTEs(item); - } - else - { - f setfunc(item, mat_id); - getSelection()->applyToTEs(&setfunc); - } + f setfunc(item, mat_id); + getSelection()->applyToTEs(&setfunc); struct g : public LLSelectedObjectFunctor { |