diff options
author | Erik Kundiman <erik@megapahit.org> | 2023-09-19 06:52:51 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2023-09-19 06:52:51 +0800 |
commit | b96c9ee1f9f8c1bcdda48638bba3e31a90887f86 (patch) | |
tree | c6c292132fab5820e24a69913bc50e09ca6883af /indra/newview/llpanelface.cpp | |
parent | 238c6512a7a6f8cb8bbea71ef612c91526c15f77 (diff) | |
parent | 97ee8b207bf43a8acb3f2702d26eb5f3b7471e45 (diff) |
Merge remote-tracking branch 'secondlife/DRTVWR-559' into DRTVWR-559
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r-- | indra/newview/llpanelface.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index df464bc7e5..e1f08915fa 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -1010,6 +1010,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) && objectp->permModify()) { BOOL editable = objectp->permModify() && !objectp->isPermanentEnforced(); + BOOL attachment = objectp->isAttachment(); bool has_pbr_material; bool has_faces_without_pbr; @@ -1306,6 +1307,18 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) texture_ctrl->setBakeTextureEnabled(TRUE); } + + if (attachment) + { + // attachments are in world and in inventory, + // server doesn't support changing permissions + // in such case + texture_ctrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); + } + else + { + texture_ctrl->setImmediateFilterPermMask(PERM_NONE); + } } if (shinytexture_ctrl) @@ -1313,6 +1326,15 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) shinytexture_ctrl->setTentative( !identical_spec ); shinytexture_ctrl->setEnabled( editable && !has_pbr_material); shinytexture_ctrl->setImageAssetID( specmap_id ); + + if (attachment) + { + shinytexture_ctrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); + } + else + { + shinytexture_ctrl->setImmediateFilterPermMask(PERM_NONE); + } } if (bumpytexture_ctrl) @@ -1320,6 +1342,15 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) bumpytexture_ctrl->setTentative( !identical_norm ); bumpytexture_ctrl->setEnabled( editable && !has_pbr_material); bumpytexture_ctrl->setImageAssetID( normmap_id ); + + if (attachment) + { + bumpytexture_ctrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER); + } + else + { + bumpytexture_ctrl->setImmediateFilterPermMask(PERM_NONE); + } } } @@ -1904,6 +1935,15 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material, pbr_ctrl->setTentative(identical_pbr ? FALSE : TRUE); pbr_ctrl->setEnabled(settable); pbr_ctrl->setImageAssetID(pbr_id); + + if (objectp->isAttachment()) + { + pbr_ctrl->setImmediateFilterPermMask(PERM_COPY | PERM_TRANSFER | PERM_MODIFY); + } + else + { + pbr_ctrl->setImmediateFilterPermMask(PERM_NONE); + } } getChildView("pbr_from_inventory")->setEnabled(settable); |