summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2024-06-04 15:22:38 -0700
committerGitHub <noreply@github.com>2024-06-04 15:22:38 -0700
commitc413458fd48ff209f7bd536924a2df2c4dfe8716 (patch)
tree4d14db8946c9a2465f788b8c81bab450c6748643 /indra
parent1f17c7f7d31852ff096bb4472730bd0acc8c159d (diff)
#1628 Disable spherical mirror probes for the time being. (#1631)
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llheroprobemanager.cpp2
-rw-r--r--indra/newview/llpanelvolume.cpp15
2 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp
index ff47ca87ec..efe72128d4 100644
--- a/indra/newview/llheroprobemanager.cpp
+++ b/indra/newview/llheroprobemanager.cpp
@@ -123,7 +123,7 @@ void LLHeroProbeManager::update()
float camera_center_distance = 99999.f;
for (auto vo : mHeroVOList)
{
- if (vo && !vo->isDead() && vo->mDrawable.notNull())
+ if (vo && !vo->isDead() && vo->mDrawable.notNull() && vo->isReflectionProbe() && vo->getReflectionProbeIsBox())
{
float distance = (LLViewerCamera::instance().getOrigin() - vo->getPositionAgent()).magVec();
float center_distance = cameraDirection * (vo->getPositionAgent() - camera_pos);
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 7f111d7619..701882ac57 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -387,6 +387,7 @@ void LLPanelVolume::getState( )
// Reflection Probe
BOOL is_probe = volobjp && volobjp->isReflectionProbe();
+ bool is_mirror = volobjp && volobjp->getReflectionProbeIsMirror();
getChild<LLUICtrl>("Reflection Probe")->setValue(is_probe);
getChildView("Reflection Probe")->setEnabled(editable && single_volume && volobjp && !volobjp->isMesh());
@@ -400,9 +401,9 @@ void LLPanelVolume::getState( )
getChildView("Probe Dynamic")->setEnabled(probe_enabled);
getChildView("Probe Update Type")->setEnabled(probe_enabled);
- getChildView("Probe Volume Type")->setEnabled(probe_enabled);
- getChildView("Probe Ambiance")->setEnabled(probe_enabled);
- getChildView("Probe Near Clip")->setEnabled(probe_enabled);
+ getChildView("Probe Volume Type")->setEnabled(probe_enabled && !is_mirror);
+ getChildView("Probe Ambiance")->setEnabled(probe_enabled && !is_mirror);
+ getChildView("Probe Near Clip")->setEnabled(probe_enabled && !is_mirror);
getChildView("Probe Update Label")->setEnabled(probe_enabled);
if (!probe_enabled)
@@ -441,8 +442,8 @@ void LLPanelVolume::getState( )
update_type = "Dynamic Mirror";
}
- getChildView("Probe Ambiance")->setEnabled(update_type != "Mirror");
- getChildView("Probe Near Clip")->setEnabled(update_type != "Mirror");
+ getChildView("Probe Ambiance")->setEnabled(!is_mirror);
+ getChildView("Probe Near Clip")->setEnabled(!is_mirror);
getChild<LLComboBox>("Probe Volume Type", true)->setValue(volume_type);
getChild<LLSpinCtrl>("Probe Ambiance", true)->setValue(volobjp->getReflectionProbeAmbiance());
@@ -1434,6 +1435,8 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata)
bool is_mirror = update_type.find("Mirror") != std::string::npos;
+ self->getChildView("Probe Volume Type")->setEnabled(!is_mirror);
+
volobjp->setReflectionProbeIsDynamic(update_type.find("Dynamic") != std::string::npos);
volobjp->setReflectionProbeIsMirror(is_mirror);
@@ -1442,7 +1445,7 @@ void LLPanelVolume::onCommitProbe(LLUICtrl* ctrl, void* userdata)
std::string shape_type = self->getChild<LLUICtrl>("Probe Volume Type")->getValue().asString();
- bool is_box = shape_type == "Box";
+ bool is_box = shape_type == "Box" || is_mirror;
if (volobjp->setReflectionProbeIsBox(is_box))
{