diff options
-rw-r--r-- | indra/newview/app_settings/settings.xml | 2 | ||||
-rw-r--r-- | indra/newview/llpanelface.cpp | 16 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 12 |
3 files changed, 22 insertions, 8 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 0cd63d9d5f..b92a829f36 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -250,7 +250,7 @@ <key>TextureLivePreview</key> <map> <key>Comment</key> - <string>Preview selections in texture picker immediately</string> + <string>Preview selections in texture picker or material picker immediately</string> <key>Persist</key> <integer>1</integer> <key>Type</key> diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index b633ccc5d5..e91b14a453 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -3094,6 +3094,7 @@ void LLPanelFace::onSelectPbr(const LLSD& data) id = pbr_ctrl->getImageAssetID(); } if (!LLSelectMgr::getInstance()->selectionSetGLTFMaterial(id)) + { refresh(); } } @@ -4989,23 +4990,24 @@ void LLPanelFace::onPbrSelectionChanged(LLInventoryItem* itemp) LLSaleInfo sale_info; LLSelectMgr::instance().selectGetSaleInfo(sale_info); - bool can_copy = itemp->getPermissions().allowCopyBy(gAgentID); // do we have perm to copy this texture? - bool can_transfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgentID); // do we have perm to transfer this texture? - bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply texture belong to the agent? - bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply texture not for sale? + bool can_copy = itemp->getPermissions().allowCopyBy(gAgentID); // do we have perm to copy this material? + bool can_transfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgentID); // do we have perm to transfer this material? + bool can_modify = itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgentID); // do we have perm to transfer this material? + bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply material belong to the agent? + bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply material not for sale? - if (can_copy && can_transfer) + if (can_copy && can_transfer && can_modify) { pbr_ctrl->setCanApply(true, true); return; } - // if texture has (no-transfer) attribute it can be applied only for object which we own and is not for sale + // if material has (no-transfer) attribute it can be applied only for object which we own and is not for sale pbr_ctrl->setCanApply(false, can_transfer ? true : is_object_owner && not_for_sale); if (gSavedSettings.getBOOL("TextureLivePreview")) { - LLNotificationsUtil::add("LivePreviewUnavailable"); + LLNotificationsUtil::add("LivePreviewUnavailablePBR"); } } } diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index ca07aacb21..bbc3798034 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -9211,6 +9211,18 @@ We cannot display a preview of this texture because it is no-copy and/or no-tran <notification icon="alertmodal.tga" + name="LivePreviewUnavailablePBR" + type="alert"> + +We cannot display a preview of this material because it is no-copy, no-transfer, and/or no-modify. + <usetemplate + ignoretext="Warn me that Live Preview mode is not available for no-copy, no-transfer, and/or no-modify materials" + name="okignore" + yestext="OK"/> + </notification> + + <notification + icon="alertmodal.tga" name="FacePasteFailed" type="alertmodal"> Paste failed. [REASON] |