diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-11-30 17:47:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-30 17:47:46 +0200 |
commit | 88aefc95eace0bb8ea21cb44514d41d98bdf74cc (patch) | |
tree | 7e4ef5796a8e1da692d32eadf80f0cc9f64d561f /indra/newview | |
parent | 9d4d7477c79d3cf912fd1d0628049ec0a5776567 (diff) |
SL-20655 FIXED Texture permissions not enforced in Material floaters
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llmaterialeditor.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llpanelface.cpp | 3 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 6 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.h | 1 |
4 files changed, 12 insertions, 6 deletions
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp index 70e21cae73..292ddb765f 100644 --- a/indra/newview/llmaterialeditor.cpp +++ b/indra/newview/llmaterialeditor.cpp @@ -436,10 +436,10 @@ BOOL LLMaterialEditor::postBuild() if (!gAgent.isGodlike()) { // Only allow fully permissive textures - mBaseColorTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); - mMetallicTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); - mEmissiveTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); - mNormalTextureCtrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); + mBaseColorTextureCtrl->setFilterPermissionMasks(PERM_COPY | PERM_TRANSFER); + mMetallicTextureCtrl->setFilterPermissionMasks(PERM_COPY | PERM_TRANSFER); + mEmissiveTextureCtrl->setFilterPermissionMasks(PERM_COPY | PERM_TRANSFER); + mNormalTextureCtrl->setFilterPermissionMasks(PERM_COPY | PERM_TRANSFER); } // Texture callback diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index e7b856f743..ffcc4be290 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1980,8 +1980,7 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material, if (objectp->isAttachment()) { - pbr_ctrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER | PERM_MODIFY); - pbr_ctrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER | PERM_MODIFY); + pbr_ctrl->setFilterPermissionMasks(PERM_COPY | PERM_TRANSFER | PERM_MODIFY); } else { diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index f302426a43..28e01c6c21 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -1715,6 +1715,12 @@ void LLTextureCtrl::setImmediateFilterPermMask(PermissionMask mask) } } +void LLTextureCtrl::setFilterPermissionMasks(PermissionMask mask) +{ + setImmediateFilterPermMask(mask); + setDnDFilterPermMask(mask); +} + void LLTextureCtrl::setVisible( BOOL visible ) { if( !visible ) diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index c47df5accb..7a96eea60d 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -196,6 +196,7 @@ public: void setDnDFilterPermMask(PermissionMask mask) { mDnDFilterPermMask = mask; } PermissionMask getImmediateFilterPermMask() { return mImmediateFilterPermMask; } + void setFilterPermissionMasks(PermissionMask mask); void closeDependentFloater(); |