summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelvolume.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2024-05-08 11:28:51 -0700
committerGitHub <noreply@github.com>2024-05-08 11:28:51 -0700
commitca5e89d741b3618ab1dc681ecb6f75e5884988d7 (patch)
tree048cfc7f13bd468f0a8aee9de8cd5957aed2bddf /indra/newview/llpanelvolume.cpp
parent812e2cda54f14a1a6854dd7b9fdd2951932ba2fa (diff)
Even more mirror fixes. (#1429)
#1271 Add support for mirrors that do not have avatars in them. It does this based on if the probe is set to dynamic or not. #1370 More optimization work to reduce GPU utilization. #1058 - Removed sim feature flag that was overriding mirrors enabled flags secondlife/viewer-private#128 - Locally cache the mirror probe #679 Add additional options to the build floater for mirror probes, including descriptions.
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r--indra/newview/llpanelvolume.cpp26
1 files changed, 16 insertions, 10 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 8d8263448d..91c33b461f 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -424,19 +424,21 @@ void LLPanelVolume::getState( )
volume_type = "Sphere";
}
- std::string update_type;
- if (volobjp->getReflectionProbeIsDynamic())
+
+ std::string update_type = "Static";
+
+ if (volobjp->getReflectionProbeIsDynamic() && !volobjp->getReflectionProbeIsMirror())
{
update_type = "Dynamic";
}
- else if (volobjp->getReflectionProbeIsMirror())
+ else if (volobjp->getReflectionProbeIsMirror() && !volobjp->getReflectionProbeIsDynamic())
{
update_type = "Mirror";
}
- else
- {
- update_type = "Static";
+ else if (volobjp->getReflectionProbeIsDynamic() && volobjp->getReflectionProbeIsMirror())
+ {
+ update_type = "Dynamic Mirror";
}
getChildView("Probe Ambiance")->setEnabled(update_type != "Mirror");
@@ -1200,6 +1202,7 @@ void LLPanelVolume::onCopyLight()
clipboard["reflection_probe"]["ambiance"] = volobjp->getReflectionProbeAmbiance();
clipboard["reflection_probe"]["near_clip"] = volobjp->getReflectionProbeNearClip();
clipboard["reflection_probe"]["dynamic"] = volobjp->getReflectionProbeIsDynamic();
+ clipboard["reflection_probe"]["mirror"] = volobjp->getReflectionProbeIsMirror();
}
mClipboardParams["light"] = clipboard;
@@ -1257,6 +1260,7 @@ void LLPanelVolume::onPasteLight()
volobjp->setReflectionProbeAmbiance((F32)clipboard["reflection_probe"]["ambiance"].asReal());
volobjp->setReflectionProbeNearClip((F32)clipboard["reflection_probe"]["near_clip"].asReal());
volobjp->setReflectionProbeIsDynamic(clipboard["reflection_probe"]["dynamic"].asBoolean());
+ volobjp->setReflectionProbeIsMirror(clipboard["reflection_probe"]["mirror"].asBoolean());
}
else
{
@@ -1428,11 +1432,13 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata)
std::string update_type = self->getChild<LLUICtrl>("Probe Update Type")->getValue().asString();
- volobjp->setReflectionProbeIsDynamic(update_type == "Dynamic");
- volobjp->setReflectionProbeIsMirror(update_type == "Mirror");
+ bool is_mirror = update_type.find("Mirror") != std::string::npos;
+
+ volobjp->setReflectionProbeIsDynamic(update_type.find("Dynamic") != std::string::npos);
+ volobjp->setReflectionProbeIsMirror(is_mirror);
- self->getChildView("Probe Ambiance")->setEnabled(update_type != "Mirror");
- self->getChildView("Probe Near Clip")->setEnabled(update_type != "Mirror");
+ self->getChildView("Probe Ambiance")->setEnabled(!is_mirror);
+ self->getChildView("Probe Near Clip")->setEnabled(!is_mirror);
std::string shape_type = self->getChild<LLUICtrl>("Probe Volume Type")->getValue().asString();