summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelvolume.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2023-09-19 06:52:51 +0800
committerErik Kundiman <erik@megapahit.org>2023-09-19 06:52:51 +0800
commitb96c9ee1f9f8c1bcdda48638bba3e31a90887f86 (patch)
treec6c292132fab5820e24a69913bc50e09ca6883af /indra/newview/llpanelvolume.cpp
parent238c6512a7a6f8cb8bbea71ef612c91526c15f77 (diff)
parent97ee8b207bf43a8acb3f2702d26eb5f3b7471e45 (diff)
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r--indra/newview/llpanelvolume.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index ed244f773c..d6c36bbfb7 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -365,6 +365,15 @@ void LLPanelVolume::getState( )
{
LightTextureCtrl->setEnabled(FALSE);
LightTextureCtrl->setValid(FALSE);
+
+ if (objectp->isAttachment())
+ {
+ LightTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER);
+ }
+ else
+ {
+ LightTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
+ }
}
getChildView("Light Intensity")->setEnabled(false);
@@ -1409,6 +1418,19 @@ void LLPanelVolume::setLightTextureID(const LLUUID &asset_id, const LLUUID &item
if (volobjp)
{
LLViewerInventoryItem* item = gInventory.getItem(item_id);
+
+ if (item && volobjp->isAttachment())
+ {
+ const LLPermissions& perm = item->getPermissions();
+ BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
+ if (!unrestricted)
+ {
+ // Attachments are in world and in inventory simultaneously,
+ // at the moment server doesn't support such a situation.
+ return;
+ }
+ }
+
if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
{
LLToolDragAndDrop::handleDropMaterialProtections(volobjp, item, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);