UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
MovieSceneCustomBinding.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
8#include "MovieSceneCustomBinding.generated.h"
9
10namespace UE
11{
12 namespace MovieScene
13 {
14 struct FSharedPlaybackState;
15 }
16}
17
19class UMovieScene;
20struct FGuid;
22struct FSlateBrush;
25
26USTRUCT(BlueprintType)
28{
30
31
32 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "General")
34
35 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "General", meta = (DeprecatedProperty, DeprecationMessage = "This property is deprecated, please use the array of Objects instead."))
37};
38
39/*
40* Blueprint-specific resolution context for custom bindings.
41*/
42USTRUCT(BlueprintType)
44{
46
47 /* The world context*/
48 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Default")
49 TObjectPtr<UObject> WorldContext;
50
51 /* Binding for the bound object currently evaluating this condition if applicable (BindingId will be invalid for conditions on global tracks/sections). */
52 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="Default")
54};
55
59UCLASS(abstract, DefaultToInstanced, EditInlineNew, MinimalAPI)
62{
63public:
64
66
69
70 UFUNCTION(BlueprintCallable, Category = "Sequencer|Binding")
72
73 UFUNCTION(BlueprintCallable, Category = "Sequencer|Binding")
75
76 /* Must be implemented.
77 * Resolve the custom binding based on the passed in context. May return an existing UObject or spawn a new one.
78 */
80
81 /* Returns whether this binding type will spawn an object in the current context. This will be true for Spawnables always, and true for Replaceables in Editor.*/
82 virtual bool WillSpawnObject(TSharedRef<const UE::MovieScene::FSharedPlaybackState> SharedPlaybackState) const { return false; }
83
84
90
91 /*
92 * Must be implemented. Called by Sequencer to determine whether this custom binding type supports binding the given object.
93 * If true is returned, a new binding may be created using CreateNewCustomBinding.
94 */
96
97 /*
98 * Must be implemented.
99 * Called by Sequencer on each Custom Binding class CDO if it supports a UObject type to try to create a new instanced custom binding.
100 * If the derived custom spawnable type supports the passed in object type, this should return a new UMovieSceneCustomBinding instance parented to the passed in OwnerMovieScene.
101 * See UMovieSceneSpawnableActorBinding for an example of how to implement.
102 */
104
105 /*
106 * Optional method that can be overridden to return a desired name for the binding. This may be used by sequencer to name the possessable containing the binding.
107 */
108 virtual FString GetDesiredBindingName() const { return FString(); }
109
110 /*
111 * For custom bindings inheriting from UMovieSceneSpawnableBindingBase, returns this object cast to UMovieSceneSpawnableBindingBase.
112 * For custom bindings inheriting from UMovieSceneReplaceableBinding, returns the inner UMovieSceneSpawnableBindingBase* in editor, or nullptr in runtime.
113 */
115
116 /*
117 * For custom bindings inheriting from UMovieSceneSpawnableBindingBase, returns this object cast to UMovieSceneSpawnableBindingBase.
118 * For custom bindings inheriting from UMovieSceneReplaceableBinding, returns the inner UMovieSceneSpawnableBindingBase* in editor, or nullptr in runtime.
119 */
121
122 /*
123 * Must be implemented.
124 * Should return the most specific relevant class of the bound object. Used to populate the FMovieScenePossessable bound object class.
125 */
127
128
129#if WITH_EDITOR
130
131 /*
132 * Called by Sequencer upon creating a new custom binding or converting a binding to use this type. Can be used by custom binding types to add required track types, etc.
133 */
134 virtual void SetupDefaults(UObject* SpawnedObject, FGuid ObjectBindingId, UMovieScene& OwnerMovieScene) {}
135
136 /*
137 * Allows the custom binding to optionally provide a custom icon overlay for the object binding track.
138 */
139 virtual FSlateIcon GetBindingTrackCustomIconOverlay() const { return FSlateIcon(); }
140
141 /*
142 * Allows the custom binding to optionally provide a custom tooltip to show when hovering over the icon area in the object binding track.
143 */
144 virtual FText GetBindingTrackIconTooltip() const { return FText(); }
145
146 /*
147 * Called by UI code to see if this custom binding type supports conversions from the presented binding, including any current bound or spawned object as reference.
148 */
149 virtual bool SupportsConversionFromBinding(const FMovieSceneBindingReference& BindingReference, const UObject* SourceObject) const { return false; }
150
151 /*
152 * Called during binding conversion to create a new binding of this type from a selected binding, if supported.
153 */
155
156 /*
157 * Must be implemented. Used by the UI to describe this binding type during conversions, etc.
158 */
160
161
162 /*
163 * Called by UI code to see if this custom binding supports converting to a possessable.
164 */
165 virtual bool CanConvertToPossessable(const FGuid& Guid, FMovieSceneSequenceIDRef TemplateID, TSharedRef<const UE::MovieScene::FSharedPlaybackState> SharedPlaybackState) const { return true; }
166
167 /*
168 * Called by UI code when the binding has recently been added or modified in the case anything needs to be initialized or modified based on this.
169 */
171
172#endif
173
174};
#define PURE_VIRTUAL(func,...)
Definition CoreMiscDefines.h:103
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
@ General
Definition MaterialExpressionFunctionInput.h:41
TCallTraits< FMovieSceneSequenceID >::ParamType FMovieSceneSequenceIDRef
Definition MovieSceneSequenceID.h:93
#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 USTRUCT(...)
Definition ObjectMacros.h:746
UClass * StaticClass()
Definition ReflectedTypeAccessors.h:13
Definition UnrealType.h:3087
Definition Text.h:385
Definition MovieScene.Build.cs:6
Definition Array.h:670
Definition SharedPointer.h:153
Definition Class.h:3793
Definition MovieSceneCustomBinding.h:62
static int32 GetBaseCustomPriority()
Definition MovieSceneCustomBinding.h:74
static MOVIESCENE_API const int32 BaseEnginePriority
Definition MovieSceneCustomBinding.h:67
UMovieSceneSpawnableBindingBase * AsSpawnable(TSharedRef< const UE::MovieScene::FSharedPlaybackState > SharedPlaybackState)
Definition MovieSceneCustomBinding.h:120
static int32 GetBaseEnginePriority()
Definition MovieSceneCustomBinding.h:71
virtual int32 GetCustomBindingPriority() const
Definition MovieSceneCustomBinding.h:89
virtual FString GetDesiredBindingName() const
Definition MovieSceneCustomBinding.h:108
virtual UClass * GetBoundObjectClass() const PURE_VIRTUAL(UMovieSceneCustomBinding
Definition MovieSceneCustomBinding.h:126
virtual const UMovieSceneSpawnableBindingBase * AsSpawnable(TSharedRef< const UE::MovieScene::FSharedPlaybackState > SharedPlaybackState) const
Definition MovieSceneCustomBinding.h:114
virtual bool WillSpawnObject(TSharedRef< const UE::MovieScene::FSharedPlaybackState > SharedPlaybackState) const
Definition MovieSceneCustomBinding.h:82
virtual bool SupportsBindingCreationFromObject(const UObject *SourceObject) const PURE_VIRTUAL(UMovieSceneCustomBinding
Definition MovieSceneCustomBinding.h:95
virtual UMovieSceneCustomBinding * CreateNewCustomBinding(UObject *SourceObject, UMovieScene &OwnerMovieScene) PURE_VIRTUAL(UMovieSceneCustomBinding
Definition MovieSceneCustomBinding.h:103
virtual FMovieSceneBindingResolveResult ResolveBinding(const FMovieSceneBindingResolveParams &ResolveParams, int32 BindingIndex, TSharedRef< const UE::MovieScene::FSharedPlaybackState > SharedPlaybackState) const PURE_VIRTUAL(UMovieSceneCustomBinding
Definition MovieSceneCustomBinding.h:79
static MOVIESCENE_API const int32 BaseCustomPriority
Definition MovieSceneCustomBinding.h:68
Definition MovieSceneSequence.h:73
Definition MovieSceneSpawnableBinding.h:33
Definition MovieScene.h:358
Definition Object.h:95
Definition AdvancedWidgetsModule.cpp:13
Definition Guid.h:109
Definition MovieSceneBindingProxy.h:23
Definition MovieSceneBindingReferences.h:27
Definition MovieSceneCustomBinding.h:44
Definition MovieSceneBindingReferences.h:47
Definition MovieSceneCustomBinding.h:28
Definition SlateBrush.h:239
Definition SlateIcon.h:13
Definition ObjectPtr.h:488