Files
Brandyn / Techy fcc1b09210 init
2026-04-04 15:40:51 -05:00

25 lines
905 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "MetaHumanPinnedSlotSelection.h"
bool FMetaHumanPinnedSlotSelection::IsItemPinned(TConstArrayView<FMetaHumanPinnedSlotSelection> SortedSelections, const FMetaHumanPaletteItemPath& ItemPath)
{
return SortedSelections.ContainsByPredicate([&ItemPath](const FMetaHumanPinnedSlotSelection& SortedSelection)
{
return SortedSelection.Selection.GetSelectedItemPath() == ItemPath;
});
}
bool FMetaHumanPinnedSlotSelection::TryGetPinnedItem(
TConstArrayView<FMetaHumanPinnedSlotSelection> SortedSelections,
const FMetaHumanPaletteItemPath& ItemPath,
const FMetaHumanPinnedSlotSelection*& OutPinnedItem)
{
OutPinnedItem = SortedSelections.FindByPredicate([&ItemPath](const FMetaHumanPinnedSlotSelection& SortedSelection)
{
return SortedSelection.Selection.GetSelectedItemPath() == ItemPath;
});
return OutPinnedItem != nullptr;
}