SL-20094 Add "Select Reflection Probes" checkbox

master
RunitaiLinden 2023-07-28 19:15:28 -05:00
parent 7a4b8edf9c
commit ec1d1f4354
8 changed files with 47 additions and 7 deletions

View File

@ -11520,6 +11520,17 @@
<key>Value</key>
<integer>1</integer>
</map>
<key>SelectReflectionProbes</key>
<map>
<key>Comment</key>
<string>Select reflection probes</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>SelectOwnedOnly</key>
<map>
<key>Comment</key>

View File

@ -3624,7 +3624,9 @@ public:
}
}
if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1, mPickTransparent, mPickRigged, mPickUnselectable, mFaceHit, &intersection, mTexCoord, mNormal, mTangent))
if (!skip_check && vobj->lineSegmentIntersect(mStart, mEnd, -1,
(mPickReflectionProbe && vobj->isReflectionProbe()) ? TRUE : mPickTransparent, // always pick transparent when picking selection probe
mPickRigged, mPickUnselectable, mFaceHit, &intersection, mTexCoord, mNormal, mTangent))
{
mEnd = intersection; // shorten ray so we only find CLOSER hits
if (mIntersection)

View File

@ -268,7 +268,8 @@ BOOL LLToolCompTranslate::handleHover(S32 x, S32 y, MASK mask)
BOOL LLToolCompTranslate::handleMouseDown(S32 x, S32 y, MASK mask)
{
mMouseDown = TRUE;
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, LLFloaterReg::instanceVisible("build"));
gViewerWindow->pickAsync(x, y, mask, pickCallback, /*BOOL pick_transparent*/ FALSE, LLFloaterReg::instanceVisible("build"), FALSE,
gSavedSettings.getBOOL("SelectReflectionProbes"));;
return TRUE;
}

View File

@ -66,7 +66,9 @@ BOOL LLToolSelect::handleMouseDown(S32 x, S32 y, MASK mask)
// do immediate pick query
BOOL pick_rigged = false; //gSavedSettings.getBOOL("AnimatedObjectsAllowLeftClick");
BOOL pick_transparent = gSavedSettings.getBOOL("SelectInvisibleObjects");
mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged);
BOOL pick_reflection_probe = gSavedSettings.getBOOL("SelectReflectionProbes");
mPick = gViewerWindow->pickImmediate(x, y, pick_transparent, pick_rigged, FALSE, TRUE, pick_reflection_probe);
// Pass mousedown to agent
LLTool::handleMouseDown(x, y, mask);

View File

@ -8128,6 +8128,18 @@ class LLToolsSelectInvisibleObjects : public view_listener_t
}
};
class LLToolsSelectReflectionProbes: public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
BOOL cur_val = gSavedSettings.getBOOL("SelectReflectionProbes");
gSavedSettings.setBOOL("SelectReflectionProbes", !cur_val);
return true;
}
};
class LLToolsSelectBySurrounding : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
@ -9365,6 +9377,7 @@ void initialize_menus()
view_listener_t::addMenu(new LLToolsSelectOnlyMyObjects(), "Tools.SelectOnlyMyObjects");
view_listener_t::addMenu(new LLToolsSelectOnlyMovableObjects(), "Tools.SelectOnlyMovableObjects");
view_listener_t::addMenu(new LLToolsSelectInvisibleObjects(), "Tools.SelectInvisibleObjects");
view_listener_t::addMenu(new LLToolsSelectReflectionProbes(), "Tools.SelectReflectionProbes");
view_listener_t::addMenu(new LLToolsSelectBySurrounding(), "Tools.SelectBySurrounding");
view_listener_t::addMenu(new LLToolsShowHiddenSelection(), "Tools.ShowHiddenSelection");
view_listener_t::addMenu(new LLToolsShowSelectionLightRadius(), "Tools.ShowSelectionLightRadius");

View File

@ -4219,7 +4219,8 @@ void LLViewerWindow::pickAsync( S32 x,
void (*callback)(const LLPickInfo& info),
BOOL pick_transparent,
BOOL pick_rigged,
BOOL pick_unselectable)
BOOL pick_unselectable,
BOOL pick_reflection_probes)
{
// "Show Debug Alpha" means no object actually transparent
BOOL in_build_mode = LLFloaterReg::instanceVisible("build");
@ -4229,7 +4230,7 @@ void LLViewerWindow::pickAsync( S32 x,
pick_transparent = TRUE;
}
LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, TRUE, pick_unselectable, TRUE, callback);
LLPickInfo pick_info(LLCoordGL(x, y_from_bot), mask, pick_transparent, pick_rigged, FALSE, pick_reflection_probes, pick_unselectable, TRUE, callback);
schedulePick(pick_info);
}

View File

@ -408,8 +408,9 @@ public:
void (*callback)(const LLPickInfo& pick_info),
BOOL pick_transparent = FALSE,
BOOL pick_rigged = FALSE,
BOOL pick_unselectable = FALSE);
LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE, BOOL pick_unselectable = TRUE, BOOL pick_reflection_probe = TRUE);
BOOL pick_unselectable = FALSE,
BOOL pick_reflection_probes = FALSE);
LLPickInfo pickImmediate(S32 x, S32 y, BOOL pick_transparent, BOOL pick_rigged = FALSE, BOOL pick_particle = FALSE, BOOL pick_unselectable = TRUE, BOOL pick_reflection_probe = FALSE);
LLHUDIcon* cursorIntersectIcon(S32 mouse_x, S32 mouse_y, F32 depth,
LLVector4a* intersection);

View File

@ -1445,6 +1445,15 @@ function="World.EnvPreset"
<menu_item_check.on_click
function="Tools.SelectInvisibleObjects"
parameter="invisible" />
</menu_item_check>
<menu_item_check
label="Select Reflection Probes"
name="Select Reflection Probes">
<menu_item_check.on_check
control="SelectReflectionProbes" />
<menu_item_check.on_click
function="Tools.SelectReflectionProbes"
parameter="reflection_probes" />
</menu_item_check>
<menu_item_check
label="Select By Surrounding"