5#include "Containers/Array.h"
6#include "Containers/Map.h"
30#include "InterchangeBaseNode.generated.h"
54 template<
typename ValueType>
83 template<
typename ValueType>
120#define IMPLEMENT_NODE_ATTRIBUTE_KEY(AttributeName) \
121const UE::Interchange::FAttributeKey Macro_Custom##AttributeName##Key = UE::Interchange::FAttributeKey(TEXT(#AttributeName));
124#define IMPLEMENT_NODE_ATTRIBUTE_GETTER(AttributeName, AttributeType) \
125 FString OperationName = GetTypeName() + TEXT(".Get" #AttributeName); \
126 return InterchangePrivateNodeBase::GetCustomAttribute<AttributeType>(*Attributes, Macro_Custom##AttributeName##Key, OperationName, AttributeValue);
128#define IMPLEMENT_NODE_ATTRIBUTE_SETTER_NODELEGATE(AttributeName, AttributeType) \
129 FString OperationName = GetTypeName() + TEXT(".Set" #AttributeName); \
130 return InterchangePrivateNodeBase::SetCustomAttribute<AttributeType>(*Attributes, Macro_Custom##AttributeName##Key, OperationName, AttributeValue);
133#define INTERCHANGE_BASE_NODE_ADD_ATTRIBUTE(ValueType) \
134 UE::Interchange::FAttributeStorage::TAttributeHandle<ValueType> Handle = RegisterAttribute<ValueType>(UE::Interchange::FAttributeKey(NodeAttributeKey), Value); \
135 return Handle.IsValid();
137#define INTERCHANGE_BASE_NODE_GET_ATTRIBUTE(ValueType) \
138 if(HasAttribute(UE::Interchange::FAttributeKey(NodeAttributeKey))) \
140 UE::Interchange::FAttributeStorage::TAttributeHandle<ValueType> Handle = GetAttributeHandle<ValueType>(UE::Interchange::FAttributeKey(NodeAttributeKey)); \
141 if (Handle.IsValid()) \
143 return (Handle.Get(OutValue) == UE::Interchange::EAttributeStorageResult::Operation_Success); \
193UCLASS(BlueprintType, MinimalAPI)
199 static constexpr const TCHAR* HierarchySeparator =
TEXT(
"\\");
210 UFUNCTION(BlueprintCallable, Category =
"Interchange | Node")
216 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
222 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
243#if WITH_EDITORONLY_DATA
262 if (IsAttributeStorageResultSuccess(Result))
304 UFUNCTION(BlueprintCallable, Category =
"Interchange | Node")
310 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
316 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
322 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
328 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
334 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
340 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
346 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
352 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
358 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
364 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
370 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
376 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
382 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
388 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
394 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
400 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
406 AttributeType
Value = AttributeType();
414 template<
typename AttributeType>
419 template<
typename AttributeType>
428 UFUNCTION(BlueprintCallable, Category =
"Interchange | Node")
434 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
441 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
449 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
458 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
467 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
473 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
479 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
485 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
491 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
498 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
506 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
512 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
528 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
534 UFUNCTION(BlueprintCallable, Category = "Interchange | Node")
558 UE_DEPRECATED(5.4,
"Implement the version that takes FAssetRegistryTagsContext instead.")
573 bool SetDesiredChildIndex(
const int32& ChildIndex);
580 bool SetParentUid(
const FString&
ParentUid);
585 bool bIsInitialized =
false;
#define check(expr)
Definition AssertionMacros.h:314
FString GetTypeName()
Definition Casts.h:66
#define UE_DEPRECATED(Version, Message)
Definition CoreMiscDefines.h:302
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EInterchangeNodeUserInterfaceContext
Definition InterchangeBaseNode.h:183
EInterchangeNodeContainerType
Definition InterchangeBaseNode.h:174
#define INTERCHANGE_BASE_NODE_GET_ATTRIBUTE(ValueType)
Definition InterchangeBaseNode.h:137
#define INTERCHANGE_BASE_NODE_ADD_ATTRIBUTE(ValueType)
Definition InterchangeBaseNode.h:133
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define UCLASS(...)
Definition ObjectMacros.h:776
#define UENUM(...)
Definition ObjectMacros.h:749
Definition Archive.h:1208
Definition AssetRegistryTagsContext.h:98
Definition NameTypes.h:617
Definition UnrealType.h:174
Definition PropertyPath.Build.cs:6
Definition SharedPointer.h:692
Definition AttributeStorage.h:497
Definition AttributeStorage.h:494
INTERCHANGECORE_API EAttributeStorageResult RegisterAttribute(const FAttributeKey &ElementAttributeKey, const T &DefaultValue, EAttributeProperty AttributeProperty=EAttributeProperty::None)
INTERCHANGECORE_API bool ContainAttribute(const FAttributeKey &ElementAttributeKey) const
Definition AttributeStorage.cpp:1370
INTERCHANGECORE_API TAttributeHandle< T > GetAttributeHandle(const FAttributeKey &ElementAttributeKey) const
Definition InterchangeBaseNodeUtilities.h:22
Definition InterchangeBaseNodeContainer.h:39
Definition InterchangeBaseNode.h:195
TSharedPtr< UE::Interchange::FAttributeStorage, ESPMode::ThreadSafe > Attributes
Definition InterchangeBaseNode.h:583
bool SetAttribute(const FString &NodeAttributeKey, const AttributeType &Value)
Definition InterchangeBaseNode.h:420
bool GetAttribute(const FString &NodeAttributeKey, AttributeType &OutValue) const
Definition InterchangeBaseNode.h:415
UE::Interchange::FAttributeStorage::TAttributeHandle< T > GetAttributeHandle(const UE::Interchange::FAttributeKey &NodeAttributeKey) const
Definition InterchangeBaseNode.h:291
UE::Interchange::FAttributeStorage::TAttributeHandle< T > RegisterAttribute(const UE::Interchange::FAttributeKey &NodeAttributeKey, const T &Value)
Definition InterchangeBaseNode.h:258
friend UInterchangeBaseNodeContainer
Definition InterchangeBaseNode.h:592
UE::Interchange::TArrayAttributeHelper< FString > TargetNodes
Definition InterchangeBaseNode.h:590
Definition InterchangeBaseNode.h:42
bool SetCustomAttribute(UE::Interchange::FAttributeStorage &Attributes, const UE::Interchange::FAttributeKey &AttributeKey, const FString &OperationName, const ValueType &AttributeValue)
Definition InterchangeBaseNode.h:84
bool GetCustomAttribute(const UE::Interchange::FAttributeStorage &Attributes, const UE::Interchange::FAttributeKey &AttributeKey, const FString &OperationName, ValueType &OutAttributeValue)
Definition InterchangeBaseNode.h:55
INTERCHANGECORE_API FProperty * FindPropertyByPathChecked(TVariant< UObject *, uint8 * > &Container, UStruct *Outer, FStringView PropertyPath)
Definition InterchangeBaseNode.cpp:609
Definition InterchangeHelper.cpp:9
bool IsAttributeStorageResultSuccess(const EAttributeStorageResult Result)
Definition AttributeStorage.h:392
EAttributeTypes
Definition AttributeStorage.h:196
void LogAttributeStorageErrors(const EAttributeStorageResult Result, const FString OperationName, const FAttributeKey AttributeKey)
Definition AttributeStorage.cpp:1038
EAttributeStorageResult
Definition AttributeStorage.h:351
Definition AdvancedWidgetsModule.cpp:13
Definition AttributeCurve.h:23
Definition AttributeStorage.h:67
Definition InterchangeBaseNode.h:157
static INTERCHANGECORE_API const FAttributeKey & NodeContainerTypeKey()
Definition InterchangeBaseNode.cpp:73
static INTERCHANGECORE_API const FAttributeKey & DesiredChildIndexKey()
Definition InterchangeBaseNode.cpp:43
static INTERCHANGECORE_API const FAttributeKey & NamespaceKey()
Definition InterchangeBaseNode.cpp:31
static INTERCHANGECORE_API const FAttributeKey & DisplayLabelKey()
Definition InterchangeBaseNode.cpp:25
static INTERCHANGECORE_API const FAttributeKey & ClassTypeAttributeKey()
Definition InterchangeBaseNode.cpp:61
static INTERCHANGECORE_API const FAttributeKey & UniqueIDKey()
Definition InterchangeBaseNode.cpp:19
static INTERCHANGECORE_API const FAttributeKey & IsEnabledKey()
Definition InterchangeBaseNode.cpp:49
static INTERCHANGECORE_API const FAttributeKey & ParentIDKey()
Definition InterchangeBaseNode.cpp:37
static INTERCHANGECORE_API const FAttributeKey & TargetAssetIDsKey()
Definition InterchangeBaseNode.cpp:55
static INTERCHANGECORE_API const FAttributeKey & AssetNameKey()
Definition InterchangeBaseNode.cpp:67