Merge pull request #116 from DarlCat/areasearch-reflectionprobes

Add support to area search for filtering reflection probes
meow-7.2.2
Beq Janus 2025-05-23 03:53:39 +01:00 committed by GitHub
commit 167e13b54d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 58 additions and 2 deletions

View File

@ -156,6 +156,7 @@ FSAreaSearch::FSAreaSearch(const LLSD& key) :
mFilterPhantom(false),
mFilterAttachment(false),
mFilterMoaP(false),
mFilterReflectionProbe(false),
mFilterDistance(false),
mFilterDistanceMin(0),
mFilterDistanceMax(999999),
@ -166,6 +167,7 @@ FSAreaSearch::FSAreaSearch(const LLSD& key) :
mBeacons(false),
mExcludeAttachment(true),
mExcludeTemporary(true),
mExcludeReflectionProbe(false),
mExcludePhysics(true),
mExcludeChildPrims(true),
mExcludeNeighborRegions(true),
@ -545,6 +547,11 @@ bool FSAreaSearch::isSearchableObject(LLViewerObject* objectp, LLViewerRegion* o
return false;
}
if (mExcludeReflectionProbe && objectp->mReflectionProbe.notNull())
{
return false;
}
return true;
}
@ -908,6 +915,11 @@ void FSAreaSearch::matchObject(FSObjectProperties& details, LLViewerObject* obje
return;
}
if (mFilterReflectionProbe && !objectp->mReflectionProbe.notNull())
{
return;
}
//-----------------------------------------------------------------------
// Find text
//-----------------------------------------------------------------------
@ -2217,6 +2229,10 @@ bool FSPanelAreaSearchFilter::postBuild()
mCheckboxExcludetemporary->set(true);
mCheckboxExcludetemporary->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this));
mCheckboxExcludeReflectionProbes = getChild<LLCheckBoxCtrl>("exclude_reflection_probes");
mCheckboxExcludeReflectionProbes->set(false);
mCheckboxExcludeReflectionProbes->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this));
mCheckboxExcludeChildPrim = getChild<LLCheckBoxCtrl>("exclude_childprim");
mCheckboxExcludeChildPrim->set(true);
mCheckboxExcludeChildPrim->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this));
@ -2240,6 +2256,9 @@ bool FSPanelAreaSearchFilter::postBuild()
mCheckboxMoaP = getChild<LLCheckBoxCtrl>("filter_moap");
mCheckboxMoaP->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this));
mCheckboxReflectionProbe = getChild<LLCheckBoxCtrl>("filter_reflection_probe");
mCheckboxReflectionProbe->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this));
mCheckboxPermCopy = getChild<LLCheckBoxCtrl>("filter_perm_copy");
mCheckboxPermCopy->setCommitCallback(boost::bind(&FSPanelAreaSearchFilter::onCommitCheckbox, this));
@ -2262,6 +2281,7 @@ void FSPanelAreaSearchFilter::onCommitCheckbox()
mFSAreaSearch->setFilterForSale(mCheckboxForSale->get());
mFSAreaSearch->setFilterDistance(mCheckboxDistance->get());
mFSAreaSearch->setFilterMoaP(mCheckboxMoaP->get());
mFSAreaSearch->setFilterReflectionProbe(mCheckboxReflectionProbe->get());
if (mCheckboxExcludePhysics->get())
{
@ -2291,6 +2311,19 @@ void FSPanelAreaSearchFilter::onCommitCheckbox()
}
mFSAreaSearch->setFilterTemporary(mCheckboxTemporary->get());
if (mCheckboxExcludeReflectionProbes->get())
{
mFSAreaSearch->setFilterReflectionProbe(false);
mCheckboxReflectionProbe->set(false);
mCheckboxReflectionProbe->setEnabled(false);
mFSAreaSearch->setExcludeReflectionProbe(true);
}
else
{
mCheckboxReflectionProbe->setEnabled(true);
mFSAreaSearch->setExcludeReflectionProbe(false);
}
if (mCheckboxExcludeAttachment->get())
{
mFSAreaSearch->setFilterAttachment(false);

View File

@ -141,12 +141,14 @@ public:
void setFilterPhantom(bool b) { mFilterPhantom = b; }
void setFilterAttachment(bool b) { mFilterAttachment = b; }
void setFilterMoaP(bool b) { mFilterMoaP = b; }
void setFilterReflectionProbe(bool b) { mFilterReflectionProbe = b; }
void setRegexSearch(bool b) { mRegexSearch = b; }
void setBeacons(bool b) { mBeacons = b; }
void setExcludeAttachment(bool b) { mExcludeAttachment = b; }
void setExcludetemporary(bool b) { mExcludeTemporary = b; }
void setExcludeReflectionProbe(bool b) { mExcludeReflectionProbe = b; }
void setExcludePhysics(bool b) { mExcludePhysics = b; }
void setExcludeChildPrims(bool b) { mExcludeChildPrims = b; }
void setExcludeNeighborRegions(bool b) { mExcludeNeighborRegions = b; }
@ -230,6 +232,7 @@ private:
bool mExcludeAttachment;
bool mExcludeTemporary;
bool mExcludeReflectionProbe;
bool mExcludePhysics;
bool mExcludeChildPrims;
bool mExcludeNeighborRegions;
@ -240,6 +243,7 @@ private:
bool mFilterPhantom;
bool mFilterAttachment;
bool mFilterMoaP;
bool mFilterReflectionProbe;
bool mFilterForSale;
S32 mFilterForSaleMin;
@ -382,6 +386,7 @@ private:
LLCheckBoxCtrl* mCheckboxLocked;
LLCheckBoxCtrl* mCheckboxPhantom;
LLCheckBoxCtrl* mCheckboxMoaP;
LLCheckBoxCtrl* mCheckboxReflectionProbe;
LLCheckBoxCtrl* mCheckboxDistance;
LLSpinCtrl* mSpinDistanceMinValue;
LLSpinCtrl* mSpinDistanceMaxValue;
@ -393,6 +398,7 @@ private:
LLCheckBoxCtrl* mCheckboxExcludeAttachment;
LLCheckBoxCtrl* mCheckboxExcludePhysics;
LLCheckBoxCtrl* mCheckboxExcludetemporary;
LLCheckBoxCtrl* mCheckboxExcludeReflectionProbes;
LLCheckBoxCtrl* mCheckboxExcludeChildPrim;
LLCheckBoxCtrl* mCheckboxExcludeNeighborRegions;
LLCheckBoxCtrl* mCheckboxPermCopy;

View File

@ -378,6 +378,15 @@
name="filter_perm_transfer"
label="Transfer"
width="100"/>
<check_box
follows="top|left"
top_pad="10"
layout="topleft"
left="10"
name="filter_reflection_probe"
label="Reflection Probes"
tool_tip="Includes manual probes only, not auto-probes. Only includes mirror probes if mirrors are enabled in graphics preferences. If reflection coverage is set to none, or the probe is not baked, objects may not be identified."
width="100"/>
<check_box
follows="top|left"
height="20"
@ -416,7 +425,7 @@
layout="topleft"
left_pad="5"
max_val="999999999"
min_val="0"
min_val="0"
name="max_price"
top_delta="-4"
width="80"/>
@ -525,7 +534,7 @@
layout="topleft"
left_pad="5"
max_val="999999999"
min_val="0"
min_val="0"
name="max_distance"
top_delta="-4"
width="80"/>
@ -570,6 +579,14 @@
name="exclude_temporary"
label="Temporary"
width="80"/>
<check_box
follows="top|left"
top_pad="10"
layout="topleft"
left="10"
name="exclude_reflection_probes"
label="Reflection Probes"
width="80"/>
<check_box
follows="top|left"
top_pad="10"