diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-01-08 21:33:06 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-01-08 21:33:06 +0200 |
commit | afe91b7eb68da65687beef451bd094ff0091b717 (patch) | |
tree | 5bdb9e5b5a78a16a8c1362c33717a6931fb40458 /indra/newview/llpanelvolume.cpp | |
parent | 6e6df8c31e09e6ba69156150ecd37cc4ac4ea0e6 (diff) | |
parent | 77395eddc911e0801e50fd693f7bbaee8046aa95 (diff) |
Merge main (DRTVWR-596 GLTF Materials Maint) into DRTVWR-591-maint-X
# Conflicts:
# indra/newview/VIEWER_VERSION.txt
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); } } |