UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CurveBase.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2// Copyright Epic Games, Inc. All Rights Reserved.
3
4#pragma once
5
6#include "CoreMinimal.h"
8#include "UObject/Object.h"
11#include "CurveBase.generated.h"
12
16UCLASS(abstract, BlueprintType, MinimalAPI)
20{
22
23
24 UFUNCTION(BlueprintCallable, Category="Math|Curves")
25 ENGINE_API void GetTimeRange(float& MinTime, float& MaxTime) const;
26 ENGINE_API void GetTimeRange(double& MinTime, double& MaxTime) const; // LWC_TODO: Native workaround for FVector2D components
27
29 UFUNCTION(BlueprintCallable, Category="Math|Curves")
30 ENGINE_API void GetValueRange(float& MinValue, float& MaxValue) const;
31 ENGINE_API void GetValueRange(double& MinValue, double& MaxValue) const; // LWC_TODO: Native workaround for FVector2D components
38 ENGINE_API TArray<FString> CreateCurveFromCSVString(const FString& InString);
39
46 ENGINE_API virtual void ImportFromJSONString(const FString& InString, TArray<FString>& OutProblems);
47
53 ENGINE_API FString ExportAsJSONString() const;
54
56 ENGINE_API void ResetCurve();
57
58public:
59
60 //~ FCurveOwnerInterface interface
61
62 UE_DEPRECATED(5.6, "Use version taking a TAdderReserverRef")
63 virtual TArray<FRichCurveEditInfoConst> GetCurves() const override
64 {
66 return Curves;
67 }
68
69 virtual void GetCurves(TAdderReserverRef<FRichCurveEditInfoConst> Curves) const override
70 {
71 // @todo: remove this entire implementation, since the default behavior should be to not return anything,
72 // once the GetCurves 5.6 deprecation gets removed
76
78 {
79 Curves.Add(TempCurve);
80 }
81 }
82
84 {
86 return Curves;
87 }
88
89 ENGINE_API virtual void ModifyOwner() override;
90 ENGINE_API virtual TArray<const UObject*> GetOwners() const override;
91 ENGINE_API virtual void MakeTransactional() override;
92 ENGINE_API virtual void OnCurveChanged(const TArray<FRichCurveEditInfo>& ChangedCurveEditInfos) override;
93 ENGINE_API virtual void SetOnCurveChangedIsInteractive(bool bInteractive) override;
94
96 {
97 return RepointCurveOwnerAsset(InPackageReloadedEvent, this, OutNewCurveOwner);
98 }
99
101 {
102 return false;
103 };
104
105public:
106
107 //~ UObject interface
108
109#if WITH_EDITORONLY_DATA
110
112 ENGINE_API virtual void GetAssetRegistryTags(FAssetRegistryTagsContext Context) const override;
113 UE_DEPRECATED(5.4, "Implement the version that takes FAssetRegistryTagsContext instead.")
114 ENGINE_API virtual void GetAssetRegistryTags(TArray<FAssetRegistryTag>& OutTags) const override;
115 ENGINE_API virtual void PostInitProperties() override;
117
118#if WITH_EDITOR
119 ENGINE_API virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override;
120#endif
121
122 UPROPERTY(VisibleAnywhere, Instanced, Category=ImportSettings)
124
125public:
126
128 UPROPERTY()
129 FString ImportPath_DEPRECATED;
130
131 // Delegate called whenever the curve data is updated
134
136#endif
137};
#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
#define DECLARE_MULTICAST_DELEGATE_TwoParams(DelegateName, Param1Type, Param2Type)
Definition DelegateCombinations.h:58
#define PRAGMA_ENABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:12
#define PRAGMA_DISABLE_DEPRECATION_WARNINGS
Definition GenericPlatformCompilerPreSetup.h:8
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define UFUNCTION(...)
Definition ObjectMacros.h:745
#define GENERATED_UCLASS_BODY(...)
Definition ObjectMacros.h:768
#define UCLASS(...)
Definition ObjectMacros.h:776
Definition AssetRegistryTagsContext.h:98
Definition CurveOwnerInterface.h:14
Definition PackageReload.h:67
Definition Array.h:670
Definition CurveBase.h:20
virtual bool IsValidCurve(FRichCurveEditInfo CurveInfo) override
Definition CurveBase.h:100
virtual bool RepointCurveOwner(const FPackageReloadedEvent &InPackageReloadedEvent, FCurveOwnerInterface *&OutNewCurveOwner) const override
Definition CurveBase.h:95
virtual void GetCurves(TAdderReserverRef< FRichCurveEditInfoConst > Curves) const override
Definition CurveBase.h:69
virtual TArray< FRichCurveEditInfo > GetCurves() override
Definition CurveBase.h:83
Definition Object.h:95
Definition UnrealType.h:6834
@ false
Definition radaudio_common.h:23
Definition UnrealType.h:6865
Definition RichCurve.h:470
UE_NODEBUG void Add(const T &Val) const
Definition AdderRef.h:124
Definition AdderRef.h:147
Definition ObjectPtr.h:488