#include <ComposableCameraCameraNodeBase.h>

Inherits: UObject Subclassed by: UComposableCameraAutoRotateNode, UComposableCameraBlueprintCameraNode, UComposableCameraCameraOffsetNode, UComposableCameraCollisionPushNode, UComposableCameraComputeNodeBase, UComposableCameraControlRotateNode, UComposableCameraFieldOfViewNode, UComposableCameraFilmbackNode, UComposableCameraImpulseResolutionNode, UComposableCameraKeyframeSequenceNode, UComposableCameraLensNode, UComposableCameraLookAtNode, UComposableCameraMixingCameraNode, UComposableCameraOrthographicNode, UComposableCameraPivotDampingNode, UComposableCameraPivotOffsetNode, UComposableCameraReceivePivotActorNode, UComposableCameraRelativeFixedPoseNode, UComposableCameraRotationConstraints, UComposableCameraScreenSpaceConstraintsNode, UComposableCameraScreenSpacePivotNode, UComposableCameraSplineNode

Base node for all camera nodes.

Public Methods

Return Name Description
void Initialize
void TickNode
FGameplayTag GetOwningCameraTag const
AComposableCameraCameraBase * GetOwningCamera const inline
AComposableCameraPlayerCameraManager * GetOwningPlayerCameraManager const inline
void GetPinDeclarations const Declare this node's input and output data pins. Override in subclasses to define pins. The editor reads these to generate visual pins, and the runtime uses them to allocate the RuntimeDataBlock.
void GetPinDeclarations_Implementation virtual const inline
void SetRuntimeDataBlock inline Set the runtime data block for this node. Called during camera instantiation from type assets.
bool HasRuntimeDataBlock const inline Check if this node has a RuntimeDataBlock attached.
void GatherAllPinDeclarations const Gather ALL pin declarations: calls GetPinDeclarations() (the virtual chain), then auto-appends pins for every Instanced subobject UPROPERTY on this node.
void DeclareSubobjectPins const Generate pin declarations for an Instanced subobject's EditAnywhere properties.
void ApplySubobjectPinValues Apply resolved pin values to an Instanced subobject's properties.
void ResolveAllInputPins Re-resolve every declared top-level input pin into its matching UPROPERTY field on this node. Called automatically by TickNode() before OnTickNode() when ShouldAutoResolveInputPins() returns true.
T GetInputPinValue const Read an input pin's resolved value. Checks wired → exposed → default.
void SetOutputPinValue Write an output pin's value to the RuntimeDataBlock.
T GetInternalVariable const Read a camera-level internal variable.
void SetInternalVariable Write a camera-level internal variable.
bool GetInputPinValueBool const
int32 GetInputPinValueInt32 const
float GetInputPinValueFloat const
double GetInputPinValueDouble const
FVector GetInputPinValueVector const
FRotator GetInputPinValueRotator const
FTransform GetInputPinValueTransform const
AActor * GetInputPinValueActor const
FName GetInputPinValueName const
void GetInputPinValueEnum const Read an enum input pin's resolved value into a wildcard enum out parameter. The runtime data block stores enum slots as a normalized int64 (see GetPinTypeSize / WriteEnumInt64ToProperty). The Blueprint-facing property bound to OutValue may be FEnumProperty (underlying numeric width may be uint8/int32/int64) or FByteProperty (always uint8). We narrow-cast the int64 into the caller's property at execution time to keep the BP thunk symmetric with SetParameterBlockValue in ComposableCameraBlueprintLibrary.
DECLARE_FUNCTION inline
void SetOutputPinValueBool
void SetOutputPinValueInt32
void SetOutputPinValueFloat
void SetOutputPinValueDouble
void SetOutputPinValueVector
void SetOutputPinValueRotator
void SetOutputPinValueTransform
void SetOutputPinValueActor
void SetOutputPinValueName
void SetOutputPinValueEnum Write a wildcard enum value to an output pin. Mirrors GetInputPinValueEnum — reads the enum from the caller's property (FEnumProperty or FByteProperty) via the numeric-property API, normalizes to int64, and stores it in the data block slot. Callers on the consumer side read it back through the same int64 channel (see ResolveAllInputPins).
DECLARE_FUNCTION inline
float GetInternalVariableFloat const
FVector GetInternalVariableVector const
FName GetInternalVariableName const
void GetInternalVariableEnum const Read an enum internal variable into a wildcard enum out parameter. Storage is a normalized int64; the thunk narrow-casts into the caller's property width. See GetInputPinValueEnum for the same pattern on the pin surface.
DECLARE_FUNCTION inline
void SetInternalVariableFloat
void SetInternalVariableVector
void SetInternalVariableName
void SetInternalVariableEnum Write a wildcard enum value to an internal variable. Normalizes to int64 via the caller's FEnumProperty/FByteProperty and stores in the data block slot — the same representation every other enum consumer reads.
DECLARE_FUNCTION inline
void OnPreTick virtual
void OnPostTick virtual

Initialize

void Initialize(AComposableCameraCameraBase * InOwningCamera, AComposableCameraPlayerCameraManager * InPlayerCameraManager)

TickNode

void TickNode(float DeltaTime, const FComposableCameraPose CurrentCameraPose, FComposableCameraPose & OutCameraPose)

GetOwningCameraTag

const

FGameplayTag GetOwningCameraTag() const

GetOwningCamera

const inline

inline AComposableCameraCameraBase * GetOwningCamera() const

GetOwningPlayerCameraManager

const inline

inline AComposableCameraPlayerCameraManager * GetOwningPlayerCameraManager() const

GetPinDeclarations

const

void GetPinDeclarations(TArray< FComposableCameraNodePinDeclaration > & OutPins) const

Declare this node's input and output data pins. Override in subclasses to define pins. The editor reads these to generate visual pins, and the runtime uses them to allocate the RuntimeDataBlock.

Default implementation returns empty (no pins).


GetPinDeclarations_Implementation

virtual const inline

virtual inline void GetPinDeclarations_Implementation(TArray< FComposableCameraNodePinDeclaration > & OutPins) const

SetRuntimeDataBlock

inline

inline void SetRuntimeDataBlock(FComposableCameraRuntimeDataBlock * InDataBlock, int32 InNodeIndex)

Set the runtime data block for this node. Called during camera instantiation from type assets.


HasRuntimeDataBlock

const inline

inline bool HasRuntimeDataBlock() const

Check if this node has a RuntimeDataBlock attached.


GatherAllPinDeclarations

const

void GatherAllPinDeclarations(TArray< FComposableCameraNodePinDeclaration > & OutPins) const

Gather ALL pin declarations: calls GetPinDeclarations() (the virtual chain), then auto-appends pins for every Instanced subobject UPROPERTY on this node.

All external callers (editor, type-asset builder, runtime data-block allocator) should call this instead of GetPinDeclarations() directly, so that subobject pins are included without per-node boilerplate.


DeclareSubobjectPins

const

void DeclareSubobjectPins(FName SubobjectPropertyName, const UObject * Subobject, TArray< FComposableCameraNodePinDeclaration > & OutPins) const

Generate pin declarations for an Instanced subobject's EditAnywhere properties.

Iterates the subobject's UClass properties, maps each to an EComposableCameraPinType via TryMapPropertyToPinType, and emits one input pin declaration per mappable property with the compound name "SubobjectPropertyName.FieldName".

Properties tagged meta=(NoPinExposure) are skipped. Null subobjects are handled gracefully (no pins emitted).

Prefer GatherAllPinDeclarations() which calls this automatically for every Instanced property. Direct calls are only needed for unusual subobject relationships that reflection cannot discover (e.g. subobjects stored in containers).


ApplySubobjectPinValues

void ApplySubobjectPinValues(FName SubobjectPropertyName, UObject * Subobject)

Apply resolved pin values to an Instanced subobject's properties.

For each mappable EditAnywhere property on the subobject, checks if the compound pin name has a resolved value in the RuntimeDataBlock (via TryResolveInputPin). If so, writes the value into the subobject's UPROPERTY. If not resolved, the subobject retains its authored (Instanced editor) value.

Safe to call when RuntimeDataBlock is null (no-op).

Prefer letting Initialize() handle this automatically (it calls AutoApplySubobjectPinValues before OnInitialize). Direct calls are only needed for unusual subobject relationships.


ResolveAllInputPins

void ResolveAllInputPins()

Re-resolve every declared top-level input pin into its matching UPROPERTY field on this node. Called automatically by TickNode() before OnTickNode() when ShouldAutoResolveInputPins() returns true.

The binding between a pin and a UPROPERTY is by exact FName match against the name declared in GetPinDeclarations(). Each matched UPROPERTY must map cleanly to an EComposableCameraPinType (via TryMapPropertyToPinType) — if a pin has no backing UPROPERTY or the types don't align, the pin is skipped here and subclass code must use GetInputPinValue() for it.

Subobject property pins ("Subobject.Field" compound names) are NOT touched by this method — they are handled once at Initialize() via AutoApplySubobjectPinValues().

Performance: the per-class binding table is built once on first use and cached module-locally. Per-frame cost is a tight switch-dispatch loop with no reflection, one raw memory write per matched pin.


GetInputPinValue

const

template<typename T> T GetInputPinValue(FName PinName) const

Read an input pin's resolved value. Checks wired → exposed → default.


SetOutputPinValue

template<typename T> void SetOutputPinValue(FName PinName, const T & Value)

Write an output pin's value to the RuntimeDataBlock.


GetInternalVariable

const

template<typename T> T GetInternalVariable(FName VariableName) const

Read a camera-level internal variable.


SetInternalVariable

template<typename T> void SetInternalVariable(FName VariableName, const T & Value)

Write a camera-level internal variable.


GetInputPinValueBool

const

bool GetInputPinValueBool(FName PinName) const

GetInputPinValueInt32

const

int32 GetInputPinValueInt32(FName PinName) const

GetInputPinValueFloat

const

float GetInputPinValueFloat(FName PinName) const

GetInputPinValueDouble

const

double GetInputPinValueDouble(FName PinName) const

GetInputPinValueVector

const

FVector GetInputPinValueVector(FName PinName) const

GetInputPinValueRotator

const

FRotator GetInputPinValueRotator(FName PinName) const

GetInputPinValueTransform

const

FTransform GetInputPinValueTransform(FName PinName) const

GetInputPinValueActor

const

AActor * GetInputPinValueActor(FName PinName) const

GetInputPinValueName

const

FName GetInputPinValueName(FName PinName) const

GetInputPinValueEnum

const

void GetInputPinValueEnum(FName PinName, int32 & OutValue) const

Read an enum input pin's resolved value into a wildcard enum out parameter. The runtime data block stores enum slots as a normalized int64 (see GetPinTypeSize / WriteEnumInt64ToProperty). The Blueprint-facing property bound to OutValue may be FEnumProperty (underlying numeric width may be uint8/int32/int64) or FByteProperty (always uint8). We narrow-cast the int64 into the caller's property at execution time to keep the BP thunk symmetric with SetParameterBlockValue in ComposableCameraBlueprintLibrary.


DECLARE_FUNCTION

inline

inline DECLARE_FUNCTION(execGetInputPinValueEnum)

SetOutputPinValueBool

void SetOutputPinValueBool(FName PinName, bool Value)

SetOutputPinValueInt32

void SetOutputPinValueInt32(FName PinName, int32 Value)

SetOutputPinValueFloat

void SetOutputPinValueFloat(FName PinName, float Value)

SetOutputPinValueDouble

void SetOutputPinValueDouble(FName PinName, double Value)

SetOutputPinValueVector

void SetOutputPinValueVector(FName PinName, FVector Value)

SetOutputPinValueRotator

void SetOutputPinValueRotator(FName PinName, FRotator Value)

SetOutputPinValueTransform

void SetOutputPinValueTransform(FName PinName, FTransform Value)

SetOutputPinValueActor

void SetOutputPinValueActor(FName PinName, AActor * Value)

SetOutputPinValueName

void SetOutputPinValueName(FName PinName, FName Value)

SetOutputPinValueEnum

void SetOutputPinValueEnum(FName PinName, const int32 & Value)

Write a wildcard enum value to an output pin. Mirrors GetInputPinValueEnum — reads the enum from the caller's property (FEnumProperty or FByteProperty) via the numeric-property API, normalizes to int64, and stores it in the data block slot. Callers on the consumer side read it back through the same int64 channel (see ResolveAllInputPins).


DECLARE_FUNCTION

inline

inline DECLARE_FUNCTION(execSetOutputPinValueEnum)

GetInternalVariableFloat

const

float GetInternalVariableFloat(FName VariableName) const

GetInternalVariableVector

const

FVector GetInternalVariableVector(FName VariableName) const

GetInternalVariableName

const

FName GetInternalVariableName(FName VariableName) const

GetInternalVariableEnum

const

void GetInternalVariableEnum(FName VariableName, int32 & OutValue) const

Read an enum internal variable into a wildcard enum out parameter. Storage is a normalized int64; the thunk narrow-casts into the caller's property width. See GetInputPinValueEnum for the same pattern on the pin surface.


DECLARE_FUNCTION

inline

inline DECLARE_FUNCTION(execGetInternalVariableEnum)

SetInternalVariableFloat

void SetInternalVariableFloat(FName VariableName, float Value)

SetInternalVariableVector

void SetInternalVariableVector(FName VariableName, FVector Value)

SetInternalVariableName

void SetInternalVariableName(FName VariableName, FName Value)

SetInternalVariableEnum

void SetInternalVariableEnum(FName VariableName, const int32 & Value)

Write a wildcard enum value to an internal variable. Normalizes to int64 via the caller's FEnumProperty/FByteProperty and stores in the data block slot — the same representation every other enum consumer reads.


DECLARE_FUNCTION

inline

inline DECLARE_FUNCTION(execSetInternalVariableEnum)

OnPreTick

virtual

virtual void OnPreTick(float DeltaTime, const FComposableCameraPose & CurrentCameraPose, FComposableCameraPose & OutCameraPose)

OnPostTick

virtual

virtual void OnPostTick(float DeltaTime, const FComposableCameraPose & CurrentCameraPose, FComposableCameraPose & OutCameraPose)

Protected Attributes

Return Name Description
AComposableCameraCameraBase * OwningCamera
AComposableCameraPlayerCameraManager * OwningPlayerCameraManager
FComposableCameraRuntimeDataBlock * RuntimeDataBlock Runtime data block for the pin system. Set when running from a camera type asset.
int32 RuntimeNodeIndex This node's index in the camera type asset's NodeTemplates array.

OwningCamera

AComposableCameraCameraBase * OwningCamera

OwningPlayerCameraManager

AComposableCameraPlayerCameraManager * OwningPlayerCameraManager

RuntimeDataBlock

FComposableCameraRuntimeDataBlock * RuntimeDataBlock = nullptr

Runtime data block for the pin system. Set when running from a camera type asset.


RuntimeNodeIndex

int32 RuntimeNodeIndex = INDEX_NONE

This node's index in the camera type asset's NodeTemplates array.

Protected Methods

Return Name Description
bool ShouldAutoResolveInputPins virtual const inline Opt-out hook for the auto-resolve-before-tick behavior. Override and return false on nodes that manage their own pin reads (e.g. nodes whose UPROPERTYs must survive across frames or are written by external actors mid-tick).
void OnInitialize Per-activation one-shot initialization. Called exactly once per camera activation, after OwningCamera / OwningPlayerCameraManager / RuntimeDataBlock have all been wired. This is the hook for caching refs, instantiating internal objects, reading exposed parameters, and seeding any per-activation state the node needs before the first Tick.
void OnInitialize_Implementation virtual inline
void OnTickNode Main node logic implemented here. This node can read/write pin values and/or CameraPose.
void OnTickNode_Implementation virtual inline

ShouldAutoResolveInputPins

virtual const inline

virtual inline bool ShouldAutoResolveInputPins() const

Opt-out hook for the auto-resolve-before-tick behavior. Override and return false on nodes that manage their own pin reads (e.g. nodes whose UPROPERTYs must survive across frames or are written by external actors mid-tick).

Default: true — any node with a pin + matching UPROPERTY gets the member refreshed before every OnTickNode call.


OnInitialize

void OnInitialize()

Per-activation one-shot initialization. Called exactly once per camera activation, after OwningCamera / OwningPlayerCameraManager / RuntimeDataBlock have all been wired. This is the hook for caching refs, instantiating internal objects, reading exposed parameters, and seeding any per-activation state the node needs before the first Tick.

Nodes that need the outgoing camera's pose (what BeginPlayNode used to receive as CurrentCameraPose) should read it via OwningPlayerCameraManager->GetCurrentCameraPose() — this is the same value AActor::BeginPlay was passing in when it called BeginPlayCamera.

BlueprintNativeEvent: Blueprint subclasses can override "InitializeNode" to replace the C++ implementation. C++ subclasses override OnInitialize_Implementation and should call Super when chaining.


OnInitialize_Implementation

virtual inline

virtual inline void OnInitialize_Implementation()

OnTickNode

void OnTickNode(float DeltaTime, const FComposableCameraPose & CurrentCameraPose, FComposableCameraPose & OutCameraPose)

Main node logic implemented here. This node can read/write pin values and/or CameraPose.

Parameters

  • DeltaTime Delta time for this frame.

  • CurrentCameraPose Current camera pose.

  • OutCameraPose Output camera pose for this node.


OnTickNode_Implementation

virtual inline

virtual inline void OnTickNode_Implementation(float DeltaTime, const FComposableCameraPose & CurrentCameraPose, FComposableCameraPose & OutCameraPose)

Private Methods

Return Name Description
void AutoDeclareSubobjectPins const Auto-iterate all Instanced UPROPERTY fields and declare their child pins.
void AutoApplySubobjectPinValues Auto-iterate all Instanced UPROPERTY fields and apply resolved pin values.
const FComposableCameraNodePinBindingTable & GetOrBuildPinBindings const Get or lazily build the pin binding table for this node's concrete UClass. Thread-safe (game-thread-only in practice, but guarded with a critical section so Blueprint recompile on the game thread cannot race with ResolveAllInputPins on the same frame).
bool ReadBPEnumPropertyAsInt64 const Shared helper used by all enum CustomThunks to normalize a Blueprint-side enum property (FEnumProperty or FByteProperty) into the data block's canonical int64 representation. Returns false if the property is not an enum-backed numeric type.
void WriteEnumInt64ToBPProperty const Inverse of ReadBPEnumPropertyAsInt64: narrow-cast a normalized int64 into the caller's enum property (FEnumProperty underlying numeric width, or FByteProperty uint8). No-op on unknown kinds. Non-const because DECLARE_FUNCTION inline thunks need a matching this-pointer — the write itself is into the caller's memory, not the node.

AutoDeclareSubobjectPins

const

void AutoDeclareSubobjectPins(TArray< FComposableCameraNodePinDeclaration > & OutPins) const

Auto-iterate all Instanced UPROPERTY fields and declare their child pins.


AutoApplySubobjectPinValues

void AutoApplySubobjectPinValues()

Auto-iterate all Instanced UPROPERTY fields and apply resolved pin values.


GetOrBuildPinBindings

const

const FComposableCameraNodePinBindingTable & GetOrBuildPinBindings() const

Get or lazily build the pin binding table for this node's concrete UClass. Thread-safe (game-thread-only in practice, but guarded with a critical section so Blueprint recompile on the game thread cannot race with ResolveAllInputPins on the same frame).


ReadBPEnumPropertyAsInt64

const

bool ReadBPEnumPropertyAsInt64(const FProperty * ValueProperty, const void * ValuePtr, int64 & OutValue) const

Shared helper used by all enum CustomThunks to normalize a Blueprint-side enum property (FEnumProperty or FByteProperty) into the data block's canonical int64 representation. Returns false if the property is not an enum-backed numeric type.


WriteEnumInt64ToBPProperty

const

void WriteEnumInt64ToBPProperty(const FProperty * OutValueProperty, void * OutValuePtr, int64 Value) const

Inverse of ReadBPEnumPropertyAsInt64: narrow-cast a normalized int64 into the caller's enum property (FEnumProperty underlying numeric width, or FByteProperty uint8). No-op on unknown kinds. Non-const because DECLARE_FUNCTION inline thunks need a matching this-pointer — the write itself is into the caller's memory, not the node.