diff options
author | Euclid Linden <euclid@lindenlab.com> | 2021-11-16 18:58:21 +0000 |
---|---|---|
committer | Euclid Linden <euclid@lindenlab.com> | 2021-11-16 18:58:21 +0000 |
commit | f2f7034f2d358886ddb4137a7b5ab3c3f5717a4f (patch) | |
tree | f5098b9532f6d7b757b9a8fb345e7aa5e7e69108 /indra/newview/llselectmgr.cpp | |
parent | e95b7efd0b4469ce18bce3bc0261ecc9be06ea9c (diff) | |
parent | 353329c2c2e9e8fa1ff273de2016c9e155585f45 (diff) |
Merged in DV546-merge-6.5.1 (pull request #776)
DRTVWR-546 merge up to 6.5.1
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r-- | indra/newview/llselectmgr.cpp | 43 |
1 files changed, 35 insertions, 8 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index 53247031b4..e7670b5a73 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -1368,11 +1368,8 @@ void LLSelectMgr::getGrid(LLVector3& origin, LLQuaternion &rotation, LLVector3 & } break; case SELECT_TYPE_HUD: - // use HUD-scaled grid - mGridScale = LLVector3(0.25f, 0.25f, 0.25f); - break; case SELECT_TYPE_WORLD: - mGridScale = LLVector3(1.f, 1.f, 1.f) * gSavedSettings.getF32("GridResolution"); + mGridScale = LLVector3(1.f, 1.f, 1.f) * llmin(gSavedSettings.getF32("GridResolution"), 0.5f); break; } } @@ -1939,7 +1936,7 @@ BOOL LLSelectMgr::selectionRevertTextures() return revert_successful; } -void LLSelectMgr::selectionSetBumpmap(U8 bumpmap) +void LLSelectMgr::selectionSetBumpmap(U8 bumpmap, const LLUUID &image_id) { struct f : public LLSelectedTEFunctor { @@ -1955,7 +1952,22 @@ void LLSelectMgr::selectionSetBumpmap(U8 bumpmap) return true; } } setfunc(bumpmap); - getSelection()->applyToTEs(&setfunc); + + LLViewerInventoryItem* item = gInventory.getItem(image_id); + if(item + && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) + && (mSelectedObjects->getNumNodes() > 1) ) + { + LL_WARNS() << "Attempted to apply no-copy texture to multiple objects" << LL_ENDL; + return; + } + if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())) + { + LLViewerObject *object = mSelectedObjects->getFirstRootObject(); + if (!object) return; + LLToolDragAndDrop::handleDropTextureProtections(object, item, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null); + } + getSelection()->applyToTEs(&setfunc); LLSelectMgrSendFunctor sendfunc; getSelection()->applyToObjects(&sendfunc); @@ -1984,7 +1996,7 @@ void LLSelectMgr::selectionSetTexGen(U8 texgen) } -void LLSelectMgr::selectionSetShiny(U8 shiny) +void LLSelectMgr::selectionSetShiny(U8 shiny, const LLUUID &image_id) { struct f : public LLSelectedTEFunctor { @@ -2000,7 +2012,22 @@ void LLSelectMgr::selectionSetShiny(U8 shiny) return true; } } setfunc(shiny); - getSelection()->applyToTEs(&setfunc); + + LLViewerInventoryItem* item = gInventory.getItem(image_id); + if(item + && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) + && (mSelectedObjects->getNumNodes() > 1) ) + { + LL_WARNS() << "Attempted to apply no-copy texture to multiple objects" << LL_ENDL; + return; + } + if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())) + { + LLViewerObject *object = mSelectedObjects->getFirstRootObject(); + if (!object) return; + LLToolDragAndDrop::handleDropTextureProtections(object, item, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null); + } + getSelection()->applyToTEs(&setfunc); LLSelectMgrSendFunctor sendfunc; getSelection()->applyToObjects(&sendfunc); |