summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-12-13 16:13:49 -0600
committerDave Parks <davep@lindenlab.com>2022-12-13 16:13:49 -0600
commit5fcfe95422b4c3a5434b3eb711cd12401d4329d3 (patch)
treeed3a5a8daaa360e6fd590af6b6a6e7d51086c864 /indra/newview/llvovolume.cpp
parent0c2e7a8eb70193b083a055dacbfde67239a8ff07 (diff)
SL-18782 Make primitive parameters automatically follow Reflection Probe controls.
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index f06719634e..8660b6d9ea 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3300,7 +3300,7 @@ BOOL LLVOVolume::isReflectionProbe() const
return getParameterEntryInUse(LLNetworkData::PARAMS_REFLECTION_PROBE);
}
-void LLVOVolume::setIsReflectionProbe(BOOL is_probe)
+bool LLVOVolume::setIsReflectionProbe(BOOL is_probe)
{
BOOL was_probe = isReflectionProbe();
if (is_probe != was_probe)
@@ -3316,9 +3316,11 @@ void LLVOVolume::setIsReflectionProbe(BOOL is_probe)
}
updateReflectionProbePtr();
+
+ return was_probe != is_probe;
}
-void LLVOVolume::setReflectionProbeAmbiance(F32 ambiance)
+bool LLVOVolume::setReflectionProbeAmbiance(F32 ambiance)
{
LLReflectionProbeParams* param_block = (LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE);
if (param_block)
@@ -3327,11 +3329,14 @@ void LLVOVolume::setReflectionProbeAmbiance(F32 ambiance)
{
param_block->setAmbiance(ambiance);
parameterChanged(LLNetworkData::PARAMS_REFLECTION_PROBE, true);
+ return true;
}
}
+
+ return false;
}
-void LLVOVolume::setReflectionProbeNearClip(F32 near_clip)
+bool LLVOVolume::setReflectionProbeNearClip(F32 near_clip)
{
LLReflectionProbeParams* param_block = (LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE);
if (param_block)
@@ -3340,11 +3345,14 @@ void LLVOVolume::setReflectionProbeNearClip(F32 near_clip)
{
param_block->setClipDistance(near_clip);
parameterChanged(LLNetworkData::PARAMS_REFLECTION_PROBE, true);
+ return true;
}
}
+
+ return false;
}
-void LLVOVolume::setReflectionProbeIsBox(bool is_box)
+bool LLVOVolume::setReflectionProbeIsBox(bool is_box)
{
LLReflectionProbeParams* param_block = (LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE);
if (param_block)
@@ -3353,11 +3361,14 @@ void LLVOVolume::setReflectionProbeIsBox(bool is_box)
{
param_block->setIsBox(is_box);
parameterChanged(LLNetworkData::PARAMS_REFLECTION_PROBE, true);
+ return true;
}
}
+
+ return false;
}
-void LLVOVolume::setReflectionProbeIsDynamic(bool is_dynamic)
+bool LLVOVolume::setReflectionProbeIsDynamic(bool is_dynamic)
{
LLReflectionProbeParams* param_block = (LLReflectionProbeParams*)getParameterEntry(LLNetworkData::PARAMS_REFLECTION_PROBE);
if (param_block)
@@ -3366,8 +3377,11 @@ void LLVOVolume::setReflectionProbeIsDynamic(bool is_dynamic)
{
param_block->setIsDynamic(is_dynamic);
parameterChanged(LLNetworkData::PARAMS_REFLECTION_PROBE, true);
+ return true;
}
}
+
+ return false;
}
F32 LLVOVolume::getReflectionProbeAmbiance() const