diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-01-08 23:16:48 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-01-08 23:16:48 +0200 |
commit | 5a829048827a1b496401db5b715554694436fd9a (patch) | |
tree | df540d2b9e3f08aede0138354281357f8b0dd7d2 /indra/newview/llpanelvolume.cpp | |
parent | 9659527ffd2226293993d81ecca72982a56756cf (diff) | |
parent | 77395eddc911e0801e50fd693f7bbaee8046aa95 (diff) |
Merge branch 'main' into DRTVWR-599-maint-Z
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r-- | indra/newview/llpanelvolume.cpp | 34 |
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); } } |