From bccd513b12e9d5f2ed65fd8631beb334d80172f8 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sat, 9 Mar 2024 18:57:34 -0500 Subject: [PATCH] Add option to disable highlighting transprent probes(DISABLE BY DEFAULT) --- .../newview/app_settings/settings_alchemy.xml | 33 +++++++++++++++++++ indra/newview/llviewermenu.cpp | 12 +++++++ indra/newview/llvovolume.cpp | 3 +- .../skins/default/xui/en/menu_viewer.xml | 11 +++++++ 4 files changed, 58 insertions(+), 1 deletion(-) diff --git a/indra/newview/app_settings/settings_alchemy.xml b/indra/newview/app_settings/settings_alchemy.xml index 27e7738dd3e..7a12d14944d 100644 --- a/indra/newview/app_settings/settings_alchemy.xml +++ b/indra/newview/app_settings/settings_alchemy.xml @@ -1910,5 +1910,38 @@ <key>Value</key> <string></string> </map> + <key>ChatOOCPrefix</key> + <map> + <key>Comment</key> + <string>OOC chat prefix characters</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>((</string> + </map> + <key>ChatOOCPostfix</key> + <map> + <key>Comment</key> + <string>OOC chat postfix characters</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>))</string> + </map> + <key>RenderReflectionProbeShowTransparent</key> + <map> + <key>Comment</key> + <string>Show reflection probes in the transparency debug view</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>Boolean</string> + <key>Value</key> + <integer>0</integer> + </map> </map> </llsd> diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index a08fd748093..f588320d359 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9012,6 +9012,17 @@ class LLViewHighlightTransparent : public view_listener_t } }; +class LLViewHighlightTransparentProbe : public view_listener_t +{ + bool handleEvent(const LLSD& userdata) + { + gSavedSettings.setBOOL("RenderReflectionProbeShowTransparent", !gSavedSettings.getBOOL("RenderReflectionProbeShowTransparent")); + // invisible objects skip building their render batches unless sShowDebugAlpha is true, so rebuild batches whenever toggling this flag + gPipeline.rebuildDrawInfo(); + return true; + } +}; + class LLViewCheckHighlightTransparent : public view_listener_t { bool handleEvent(const LLSD& userdata) @@ -9810,6 +9821,7 @@ void initialize_menus() view_listener_t::addMenu(new LLViewLookAtLastChatter(), "View.LookAtLastChatter"); view_listener_t::addMenu(new LLViewShowHoverTips(), "View.ShowHoverTips"); view_listener_t::addMenu(new LLViewHighlightTransparent(), "View.HighlightTransparent"); + view_listener_t::addMenu(new LLViewHighlightTransparentProbe(), "View.HighlightTransparentProbe"); view_listener_t::addMenu(new LLViewToggleRenderType(), "View.ToggleRenderType"); view_listener_t::addMenu(new LLViewShowHUDAttachments(), "View.ShowHUDAttachments"); view_listener_t::addMenu(new LLZoomer(1.2f), "View.ZoomOut"); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 13505a5493b..522eb0f5a29 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5828,6 +5828,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) } else { + static LLCachedControl<bool> render_reflection_object(gSavedSettings, "RenderReflectionProbeShowTransparent", false); F32 alpha; if (is_pbr) { @@ -5842,7 +5843,7 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group) drawablep->setState(LLDrawable::HAS_ALPHA); add_face(sAlphaFaces, alpha_count, facep); } - else if (LLDrawPoolAlpha::sShowDebugAlpha || + else if ((LLDrawPoolAlpha::sShowDebugAlpha && (render_reflection_object || !vobj->isReflectionProbe())) || (gPipeline.sRenderHighlight && !drawablep->getParent() && //only root objects are highlighted with red color in this case drawablep->getVObj() && drawablep->getVObj()->flagScripted() && diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 010afc40f50..2db494e47f3 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -1728,6 +1728,17 @@ function="World.EnvPreset" <menu_item_check.on_click function="View.HighlightTransparent" /> </menu_item_check> + <menu_item_check + label="Highlight Transparent Probes" + name="Highlight Transparent Probes" > + <menu_item_check.on_check + function="CheckControl" + parameter="RenderReflectionProbeShowTransparent" /> + <menu_item_check.on_click + function="View.HighlightTransparentProbe" /> + <menu_item_check.on_enable + function="View.CheckHighlightTransparent"/> + </menu_item_check> <menu_item_separator/> <menu_item_check label="Grab objects with Ctrl-Drag" -- GitLab