summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorDave Houlton <euclid@lindenlab.com>2021-11-16 11:44:55 -0700
committerDave Houlton <euclid@lindenlab.com>2021-11-16 11:44:55 -0700
commit353329c2c2e9e8fa1ff273de2016c9e155585f45 (patch)
treef5098b9532f6d7b757b9a8fb345e7aa5e7e69108 /indra/newview/llselectmgr.cpp
parente95b7efd0b4469ce18bce3bc0261ecc9be06ea9c (diff)
parent9957c28ddc5e5c129af2db662da7d69f1509af65 (diff)
DRTVWR-546 merge in master v6.5.1
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp43
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);