UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MovieSceneSegment.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6#include "Misc/FrameTime.h"
8#include "UObject/Class.h"
12#include "MovieSceneSegment.generated.h"
13
15
17UENUM()
19{
21 None = 0x00,
23 PreRoll = 0x01,
25 PostRoll = 0x02,
26
27 ForceKeepState = 0x04,
28 ForceRestoreState = 0x08,
29};
31
33USTRUCT()
35{
37
40
41 friend bool operator==(FMovieSceneSegmentIdentifier A, FMovieSceneSegmentIdentifier B) { return A.IdentifierIndex == B.IdentifierIndex; }
42 friend bool operator!=(FMovieSceneSegmentIdentifier A, FMovieSceneSegmentIdentifier B) { return A.IdentifierIndex != B.IdentifierIndex; }
44
45 bool IsValid() const
46 {
47 return IdentifierIndex != INDEX_NONE;
48 }
49
52 {
53 Ar << IdentifierIndex;
54 return true;
55 }
56
58 {
59 ID.Serialize(Ar);
60 return Ar;
61 }
62
64 {
65 return IdentifierIndex;
66 }
67
68 UPROPERTY()
69 int32 IdentifierIndex;
70};
71
73{
74 enum { WithSerializer = true, WithIdenticalViaEquality = true };
75 static constexpr EPropertyObjectReferenceType WithSerializerObjectReferences = EPropertyObjectReferenceType::None;
76};
77
81USTRUCT()
83{
85
86
88
93
98
103
105 {
106 return A.ImplIndex == B.ImplIndex && A.ForcedTime == B.ForcedTime && A.Flags == B.Flags;
107 }
108
110 {
111 return ForcedTime == TNumericLimits<int32>::Lowest() ? InActualTime : FFrameTime(ForcedTime);
112 }
113
116
119
121 {
122 FSectionEvaluationData::StaticStruct()->SerializeItem(Ar, &Data, nullptr);
123 return Ar;
124 }
125
127 UPROPERTY()
128 int32 ImplIndex;
129
131 UPROPERTY()
132 FFrameNumber ForcedTime;
133
135 UPROPERTY()
137};
138
142USTRUCT()
144{
146
149
151 : Range(InRange)
152 , bAllowEmpty(false)
153 {}
154
156 : Range(InRange)
157 , bAllowEmpty(true)
158 {
159 Impls.Reserve(InApplicationImpls.Num());
161 {
162 Impls.Add(Impl);
163 }
164 }
165
166 FMovieSceneSegment(const TRange<FFrameNumber>& InRange, std::initializer_list<FSectionEvaluationData> InApplicationImpls)
168 {
169 }
170
172 {
173 return A.Range == B.Range && A.ID == B.ID && A.bAllowEmpty == B.bAllowEmpty && A.Impls == B.Impls;
174 }
175
176 bool IsValid() const
177 {
178 return bAllowEmpty || Impls.Num() != 0;
179 }
180
182 {
183 if (Range.Adjoins(OtherSegment.Range) && Impls == OtherSegment.Impls && bAllowEmpty == OtherSegment.bAllowEmpty)
184 {
185 Range = TRange<FFrameNumber>::Hull(OtherSegment.Range, Range);
186 return true;
187 }
188 return false;
189 }
190
193 {
195
197 {
199 Ar << OldFloatRange;
201 }
202 else
203 {
204 Ar << Range;
205 }
206
208 {
209 Ar << ID;
210 Ar << bAllowEmpty;
211 }
212
213 int32 NumStructs = Impls.Num();
214 Ar << NumStructs;
215
216 if (Ar.IsLoading())
217 {
218 for (int32 Index = 0; Index < NumStructs; ++Index)
219 {
221 Ar << Data;
222 Impls.Add(Data);
223 }
224 }
225 else if (Ar.IsSaving())
226 {
227 for (FSectionEvaluationData& Data : Impls)
228 {
229 Ar << Data;
230 }
231 }
232 return true;
233 }
234
237
239
242
245};
246
constexpr auto MakeArrayView(OtherRangeType &&Other)
Definition ArrayView.h:873
@ INDEX_NONE
Definition CoreMiscDefines.h:150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
return true
Definition ExternalRpcRegistry.cpp:601
ESectionEvaluationFlags
Definition MovieSceneSegment.h:19
#define UPROPERTY(...)
UObject definition macros.
Definition ObjectMacros.h:744
#define GENERATED_BODY(...)
Definition ObjectMacros.h:765
#define UENUM(...)
Definition ObjectMacros.h:749
#define USTRUCT(...)
Definition ObjectMacros.h:746
EPropertyObjectReferenceType
Definition ObjectMacros.h:533
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition Archive.h:1208
virtual CORE_API void UsingCustomVersion(const struct FGuid &Guid)
Definition Archive.cpp:590
UE_FORCEINLINE_HINT bool IsLoading() const
Definition Archive.h:236
CORE_API int32 CustomVer(const struct FGuid &Key) const
Definition Archive.cpp:602
UE_FORCEINLINE_HINT bool IsSaving() const
Definition Archive.h:248
Definition ArrayView.h:139
Definition Array.h:670
Definition Range.h:50
static TRange Hull(const TRange &X, const TRange &Y)
Definition Range.h:506
Definition ExpressionParserTypes.h:21
@ false
Definition radaudio_common.h:23
U16 Index
Definition radfft.cpp:71
Definition FrameNumber.h:18
Definition FrameTime.h:16
static MOVIESCENE_API TRange< FFrameNumber > FromFloatRange(const TRange< float > &InFloatRange)
Definition MovieSceneFrameMigration.cpp:16
Definition MovieSceneSegment.h:35
friend uint32 GetTypeHash(FMovieSceneSegmentIdentifier LHS)
Definition MovieSceneSegment.h:43
friend bool operator==(FMovieSceneSegmentIdentifier A, FMovieSceneSegmentIdentifier B)
Definition MovieSceneSegment.h:41
friend FArchive & operator<<(FArchive &Ar, FMovieSceneSegmentIdentifier &ID)
Definition MovieSceneSegment.h:57
int32 GetIndex() const
Definition MovieSceneSegment.h:63
friend bool operator!=(FMovieSceneSegmentIdentifier A, FMovieSceneSegmentIdentifier B)
Definition MovieSceneSegment.h:42
bool Serialize(FArchive &Ar)
Definition MovieSceneSegment.h:51
FMovieSceneSegmentIdentifier(int32 InIndex)
Definition MovieSceneSegment.h:39
bool IsValid() const
Definition MovieSceneSegment.h:45
Definition MovieSceneSegment.h:144
FMovieSceneSegmentIdentifier ID
Definition MovieSceneSegment.h:238
TArray< FSectionEvaluationData, TInlineAllocator< 4 > > Impls
Definition MovieSceneSegment.h:244
bool IsValid() const
Definition MovieSceneSegment.h:176
bool CombineWith(const FMovieSceneSegment &OtherSegment)
Definition MovieSceneSegment.h:181
bool bAllowEmpty
Definition MovieSceneSegment.h:241
TRange< FFrameNumber > Range
Definition MovieSceneSegment.h:236
bool Serialize(FArchive &Ar)
Definition MovieSceneSegment.h:192
FMovieSceneSegment(const TRange< FFrameNumber > &InRange, std::initializer_list< FSectionEvaluationData > InApplicationImpls)
Definition MovieSceneSegment.h:166
FMovieSceneSegment(const TRange< FFrameNumber > &InRange)
Definition MovieSceneSegment.h:150
friend bool operator==(const FMovieSceneSegment &A, const FMovieSceneSegment &B)
Definition MovieSceneSegment.h:171
FMovieSceneSegment(const TRange< FFrameNumber > &InRange, TArrayView< const FSectionEvaluationData > InApplicationImpls)
Definition MovieSceneSegment.h:155
Definition MovieSceneSegment.h:83
bool IsPostRoll() const
Definition MovieSceneSegment.h:118
FFrameTime GetTime(FFrameTime InActualTime)
Definition MovieSceneSegment.h:109
friend FArchive & operator<<(FArchive &Ar, FSectionEvaluationData &Data)
Definition MovieSceneSegment.h:120
FSectionEvaluationData(int32 InImplIndex, FFrameNumber InForcedTime)
Definition MovieSceneSegment.h:95
FSectionEvaluationData(int32 InImplIndex, ESectionEvaluationFlags InFlags)
Definition MovieSceneSegment.h:100
FSectionEvaluationData(int32 InImplIndex)
Definition MovieSceneSegment.h:90
bool IsPreRoll() const
Definition MovieSceneSegment.h:115
friend bool operator==(FSectionEvaluationData A, FSectionEvaluationData B)
Definition MovieSceneSegment.h:104
@ FloatToIntConversion
Definition SequencerObjectVersion.h:34
@ EvaluationTree
Definition SequencerObjectVersion.h:28
CORE_API static const FGuid GUID
Definition SequencerObjectVersion.h:60
Definition NumericLimits.h:41
Definition StructOpsTypeTraits.h:11
@ WithIdenticalViaEquality
Definition StructOpsTypeTraits.h:18
@ WithCopy
Definition StructOpsTypeTraits.h:17
@ WithSerializer
Definition StructOpsTypeTraits.h:23
static constexpr EPropertyObjectReferenceType WithSerializerObjectReferences
Definition StructOpsTypeTraits.h:41
Definition StructOpsTypeTraits.h:46