I believe CL 31198554 in //UE5/Main fixes the Disable Reselection issue. Also, while investigating that is currently works in our mainline, I found an invalid misleading comment in SDatabaseAssetListItem::OnDisableReselectionChanged “// no need to rebuild the SearchIndex (ViewModelPtr->BuildSearchIndex()), since bDisableReselection is a runtime only parameter” that I’m going to remove.
> Or are we supposed to reindex the databases somehow?
No, we’re trying as much as possible to avoid having to reindex databases manually, and I’d recommend to consider for integration all the improvements and bug fixes related to ..\Engine\Plugins\Animation\PoseSearch\Source\Runtime\Private\PoseSearchDerivedDataKey.cpp
> When setting that flag animations are flagged with (J) for Pose Jump Threshold. Why is there no distinction between pose jump threshold and Disable Reselection?
Disable Reselection got its own EPoseCandidateFlags::DiscardedBy_AssetReselection value ("R ") with CL 36102255
>I saw that reselection is still possible if the PSDB::ExcludeFromDatabaseParameters trim the animation too short. So a pose that was marked as invalid, with J or H flags, could still be selected instead of others that have a worse cost. So are these flags “soft” restrictions that can be sometimes skipped?
not sure I follow: do you mean in “EvaluatePoseKernel”, “if (SearchFilters.AreFiltersValid(SearchIndex, PoseValues, QueryValues, DynamicWeightsSqrt, PoseIdx…” sometimes fails to exclude invalid poses? Or is it because “UPoseSearchDatabase::SearchContinuingPose” doesn’t apply any filters (and perhaps is should)?
>A: Discarded by asset index filter
the pose didn’t pass FSelectableAssetIdxFilter::IsFilterValid, meaning that the associated asset index (not the source index asset, but one of the FSearchIndexAsset in FSearchIndexAsset::Assets) should not be searched
>F: Discarded by pose filter
the pose got discarded because any of the schema channels invalidated it, via their IPoseSearchFilter interface, where if IPoseSearchFilter::IsFilterActive is true makes IPoseSearchFilter::IsFilterValid getting called and being able to prune poses. For example if in any “UPoseSearchFeatureChannel_Position” you set “MaxPositionDistanceSquared” > 0 , “UPoseSearchFeatureChannel_Position::IsFilterValid” will discard all those poses where the query is too (MaxPositionDistanceSquared cm^2 away) far from the evaluated poses.
Sorry about that, I’m gonna add comments in EPoseCandidateFlags to clarify their meaning