summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelvolume.cpp
diff options
context:
space:
mode:
authorsimon <simon@lindenlab.com>2024-01-09 20:22:37 +0000
committersimon <simon@lindenlab.com>2024-01-09 20:22:37 +0000
commita9ef4d2ee8470e944b09402d0f796cb09cdb728d (patch)
tree4a5b4299c352e671b7aa76eabbf00d546acbf670 /indra/newview/llpanelvolume.cpp
parenteca0021b7dfd40d5b573ae5530cf44edbe3a0994 (diff)
parent77395eddc911e0801e50fd693f7bbaee8046aa95 (diff)
Merge remote-tracking branch 'origin/main' into simon/sl-20635-new-data
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r--indra/newview/llpanelvolume.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index d6c36bbfb7..595609b4de 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -746,6 +746,14 @@ void LLPanelVolume::sendIsLight()
LL_INFOS() << "update light sent" << LL_ENDL;
}
+void notify_cant_select_reflection_probe()
+{
+ if (!gSavedSettings.getBOOL("SelectReflectionProbes"))
+ {
+ LLNotificationsUtil::add("CantSelectReflectionProbe");
+ }
+}
+
void LLPanelVolume::sendIsReflectionProbe()
{
LLViewerObject* objectp = mObject;
@@ -764,6 +772,20 @@ void LLPanelVolume::sendIsReflectionProbe()
}
else
{
+ if (value)
+ {
+ notify_cant_select_reflection_probe();
+ }
+ else if (objectp->flagPhantom())
+ {
+ LLViewerObject* root = objectp->getRootEdit();
+ bool in_linkeset = root != objectp || objectp->numChildren() > 0;
+ if (in_linkeset)
+ {
+ // In linkset with a phantom flag
+ objectp->setFlags(FLAGS_PHANTOM, FALSE);
+ }
+ }
volobjp->setIsReflectionProbe(value);
}
}
@@ -780,6 +802,7 @@ void LLPanelVolume::doSendIsReflectionProbe(const LLSD & notification, const LLS
}
LLVOVolume* volobjp = (LLVOVolume*)objectp;
+ notify_cant_select_reflection_probe();
volobjp->setIsReflectionProbe(true);
{ // has become a reflection probe, slam to a 10m sphere and pop up a message
@@ -1211,6 +1234,17 @@ void LLPanelVolume::onPasteLight()
}
else
{
+ if (objectp->flagPhantom())
+ {
+ LLViewerObject* root = objectp->getRootEdit();
+ bool in_linkeset = root != objectp || objectp->numChildren() > 0;
+ if (in_linkeset)
+ {
+ // In linkset with a phantom flag
+ objectp->setFlags(FLAGS_PHANTOM, FALSE);
+ }
+ }
+
volobjp->setIsReflectionProbe(false);
}
}