Skip to content

Commit d9fd88e

Browse files
gwigzclaude
andcommitted
Scene Explorer: hide objects with unresolved props under owner filters
With an owner filter active and Full Region Coverage disabled, camming around streams new objects in whose ObjectProperties reply hasn't landed yet. The predicate deliberately let those rows pass ("can't judge what it doesn't know"), so every newly loaded object leaked into the filtered list regardless of owner, and child prims of an already-rejected linkset kept the folder visible the same way. Flag filters (e.g. Light) use local object data, which is why they were unaffected. Fail the owner clause instead while props are unresolved. The props fetch is already queued when a row is built, and applying the reply dirties the row's filter state, so matching rows appear as their ownership resolves. Fixes #335 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 43e3ae0 commit d9fd88e

2 files changed

Lines changed: 24 additions & 15 deletions

File tree

indra/newview/alsceneexplorerpredicate.cpp

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,23 @@ bool matches(const ItemFacts& item, const Constraints& c)
5353
if (c.mOwnerMode != OWNER_ANY)
5454
{
5555
// Avatars are their own "owner" so owner filters behave sensibly for
56-
// them; object rows apply the predicate only once props have arrived.
56+
// them. Objects with unresolved props stay hidden until the fetch
57+
// lands and the row re-filters.
58+
if (!item.mIsAvatar && !rec.mPropsValid)
59+
return false;
60+
5761
const LLUUID& owner = item.mIsAvatar ? item.mItemId : rec.mOwnerId;
5862
const bool group_owned = !item.mIsAvatar && rec.mGroupOwned;
59-
if (item.mIsAvatar || rec.mPropsValid)
63+
switch (c.mOwnerMode)
6064
{
61-
switch (c.mOwnerMode)
62-
{
63-
case OWNER_MINE: if (owner != c.mAgentId) return false; break;
64-
case OWNER_GROUP: if (!group_owned) return false; break;
65-
case OWNER_OTHERS: if (owner == c.mAgentId || group_owned) return false; break;
66-
case OWNER_SPECIFIC:
67-
if (owner != c.mOwnerId && !(group_owned && rec.mGroupId == c.mOwnerId))
68-
return false;
69-
break;
70-
default: break;
71-
}
65+
case OWNER_MINE: if (owner != c.mAgentId) return false; break;
66+
case OWNER_GROUP: if (!group_owned) return false; break;
67+
case OWNER_OTHERS: if (owner == c.mAgentId || group_owned) return false; break;
68+
case OWNER_SPECIFIC:
69+
if (owner != c.mOwnerId && !(group_owned && rec.mGroupId == c.mOwnerId))
70+
return false;
71+
break;
72+
default: break;
7273
}
7374
}
7475

indra/newview/tests/alsceneexplorerpredicate_test.cpp

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ namespace tut
173173
}
174174

175175
// Owner gating: avatars are their own owner; objects without props yet
176-
// pass owner modes (the predicate can't judge what it doesn't know).
176+
// fail owner modes until the reply lands.
177177
template<> template<>
178178
void predicate_object::test<7>()
179179
{
@@ -187,7 +187,15 @@ namespace tut
187187
mFacts.mIsAvatar = false;
188188
mFacts.mItemId = mRec.mId;
189189
mRec.mPropsValid = false;
190-
ensure("unresolved props pass owner modes", matches(mFacts, mC));
190+
ensure("unresolved props fail owner modes", !matches(mFacts, mC));
191+
192+
mRec.mPropsValid = true;
193+
mRec.mOwnerId = mAgentId;
194+
ensure("resolved props re-apply owner modes", matches(mFacts, mC));
195+
196+
mRec.mPropsValid = false;
197+
mC.mOwnerMode = OWNER_ANY;
198+
ensure("unresolved props pass without an owner mode", matches(mFacts, mC));
191199
}
192200

193201
// Geometry mask: empty = any; otherwise the item's kind must be in it.

0 commit comments

Comments
 (0)