UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TypedElementSelectionSetLibrary.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
7
8#include "CoreMinimal.h"
9#include "UObject/Stack.h"
10
11#include "TypedElementSelectionSetLibrary.generated.h"
12
14{
15 // Return true if the selection set is invalid
17 {
18 if (!SelectionSet)
19 {
21 }
22
23 return true;
24 }
25}
26
32UCLASS()
34{
36
37public:
42 UFUNCTION(BlueprintCallable, Category="TypedElementFramework|Selection", meta=(ScriptMethod))
43 static bool SelectElementsFromList(UTypedElementSelectionSet* SelectionSet, const FScriptTypedElementListProxy ElementList, const FTypedElementSelectionOptions SelectionOptions)
44 {
46 {
47 return false;
48 }
49
51 if (!NativeList)
52 {
53 FFrame::KismetExecutionMessage(TEXT("ElementList is in a invalid state."), ELogVerbosity::Error);
54 return false;
55 }
56
57 return SelectionSet->SelectElements(NativeList.ToSharedRef(), SelectionOptions);
58 }
59
64 UFUNCTION(BlueprintCallable, Category="TypedElementFramework|Selection", meta=(ScriptMethod))
65 static bool DeselectElementsFromList(UTypedElementSelectionSet* SelectionSet, const FScriptTypedElementListProxy ElementList, const FTypedElementSelectionOptions SelectionOptions)
66 {
68 {
69 return false;
70 }
71
73 if (!NativeList)
74 {
75 FFrame::KismetExecutionMessage(TEXT("ElementList is in a invalid state."), ELogVerbosity::Error);
76 return false;
77 }
78
79 return SelectionSet->DeselectElements(NativeList.ToSharedRef(), SelectionOptions);
80 }
81
87 UFUNCTION(BlueprintCallable, Category="TypedElementFramework|Selection", meta=(ScriptMethod))
88 static bool SetSelectionFromList(UTypedElementSelectionSet* SelectionSet, const FScriptTypedElementListProxy ElementList, const FTypedElementSelectionOptions SelectionOptions)
89 {
91 {
92 return false;
93 }
94
96 return NativeList
97 ? SelectionSet->SetSelection(NativeList.ToSharedRef(), SelectionOptions)
98 : SelectionSet->ClearSelection(SelectionOptions);
99 }
100
105 UFUNCTION(BlueprintPure, Category="TypedElementFramework|Selection", meta=(ScriptMethod))
116
121 UFUNCTION(BlueprintPure, Category="TypedElementFramework|Selection", meta=(ScriptMethod))
132};
#define TEXT(x)
Definition Platform.h:1272
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
TSharedRef< ObjectType, Mode > ToSharedRef() const &
Definition SharedPointer.h:1028
Definition Object.h:95
Definition TypedElementSelectionSetLibrary.h:34
Definition TypedElementSelectionSet.h:180
@ Error
Definition LogVerbosity.h:28
Definition TypedElementSelectionSetLibrary.h:14
bool CheckForInvalidSelectionSet(UTypedElementSelectionSet *SelectionSet)
Definition TypedElementSelectionSetLibrary.h:16
FScriptTypedElementListPtr ConvertToScriptTypedElementList(const FTypedElementListConstPtr &NativeList)
Definition TypedElementList.cpp:554
FTypedElementListPtr ConvertToNativeTypedElementList(const FScriptTypedElementListConstPtr &ScriptList)
Definition TypedElementList.cpp:526
static COREUOBJECT_API void KismetExecutionMessage(const TCHAR *Message, ELogVerbosity::Type Verbosity, FName WarningId=FName())
Definition ScriptCore.cpp:644
Definition TypedElementListProxy.h:18
Definition TypedElementSelectionSet.h:37
Definition TypedElementSelectionInterface.h:67