From ef33902f220df35727ba54ee8bc3ed02bc53d6be Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <andreykproductengine@lindenlab.com> Date: Fri, 18 Aug 2023 19:59:14 +0300 Subject: [PATCH] SL-20145 GLTF specific feature notification --- indra/newview/llfloaternewfeaturenotification.cpp | 7 +++++++ indra/newview/llpanelface.cpp | 9 +++++++++ indra/newview/llpanelface.h | 1 + .../xui/en/floater_new_feature_notification.xml | 11 ++++++++++- 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/indra/newview/llfloaternewfeaturenotification.cpp b/indra/newview/llfloaternewfeaturenotification.cpp index 3a2035b9b91..1e500249674 100644 --- a/indra/newview/llfloaternewfeaturenotification.cpp +++ b/indra/newview/llfloaternewfeaturenotification.cpp @@ -50,6 +50,13 @@ BOOL LLFloaterNewFeatureNotification::postBuild() getChild<LLUICtrl>(title_txt)->setValue(getString(title_txt + feature)); getChild<LLUICtrl>(dsc_txt)->setValue(getString(dsc_txt + feature)); + if (getKey().asString() == "gltf") + { + LLRect rect = getRect(); + // make automatic? + reshape(rect.getWidth() + 90, rect.getHeight() + 45); + } + return TRUE; } diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 8f09136ccfd..b502fa3546d 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -492,6 +492,15 @@ LLPanelFace::~LLPanelFace() unloadMedia(); } +void LLPanelFace::onVisibilityChange(BOOL new_visibility) +{ + if (new_visibility) + { + gAgent.showLatestFeatureNotification("gltf"); + } + LLPanel::onVisibilityChange(new_visibility); +} + void LLPanelFace::draw() { updateCopyTexButton(); diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h index d07be2e4b45..d36662c11bb 100644 --- a/indra/newview/llpanelface.h +++ b/indra/newview/llpanelface.h @@ -109,6 +109,7 @@ class LLPanelFace : public LLPanel static void onMaterialOverrideReceived(const LLUUID& object_id, S32 side); + /*virtual*/ void onVisibilityChange(BOOL new_visibility); /*virtual*/ void draw(); LLMaterialPtr createDefaultMaterial(LLMaterialPtr current_material) diff --git a/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml b/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml index 5f0eeab71c4..c8726d36b44 100644 --- a/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml +++ b/indra/newview/skins/default/xui/en/floater_new_feature_notification.xml @@ -20,6 +20,15 @@ New inventory features You can now add preview images to inventory items and view a folder in its own window. Learn more in this [https://community.secondlife.com/blogs/entry/13637-new-features-inventory-item-preview-and-single-folder-view/ blogpost] </floater.string> + <floater.string name="title_txt_gltf"> +New GLTF PBR materials support + </floater.string> + <floater.string name="description_txt_gltf"> +You can now use expanded material support with the ability to import and edit GLTF Physically Based Rendering (PBR) Materials. +In order to support the addition of the GLTF format, some areas in the viewer may appear darker than usual. + +Learn more about [https://wiki.secondlife.com/wiki/PBR_Materials Physically Based Rendering (PBR)] + </floater.string> <text type="string" length="1" @@ -37,7 +46,7 @@ New feature <text type="string" length="1" - follows="top|left|right" + follows="top|left|right|bottom" text_color="White" layout="topleft" left="10" -- GitLab