diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2023-10-13 14:02:51 -0700 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2023-10-13 14:02:51 -0700 |
commit | a91f08ba84844647bbcdecac11e85c449579527c (patch) | |
tree | 9bfdc77c9e7de33413b95f2648cb139b19cb06f0 /indra/newview/llpanelvolume.cpp | |
parent | cc0f831aaa960552b218da436da57b44cb2dfe0f (diff) | |
parent | cba71633559ccdfd394983a6086da816e739a730 (diff) |
Merge branch 'DRTVWR-559' into DRTVWR-592
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r-- | indra/newview/llpanelvolume.cpp | 22 |
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); |