#include <ComposableCameraPatchManager.h>
Inherits:
UObject
Director-scoped owner of active Camera Patches.
Constructed by UComposableCameraDirector and destroyed with it. Apply runs after the director evaluation tree, advances patch envelopes, checks expiration, ticks each patch evaluator with the current upstream pose, and blends outputs in layer order.
Public Methods¶
| Return | Name | Description |
|---|---|---|
UComposableCameraPatchManager |
||
UComposableCameraPatchHandle * |
AddPatch |
Add a Patch on this Director. |
void |
ExpirePatch |
Manually retire a Patch. |
FComposableCameraPose |
Apply |
Per-frame application pass. |
void |
DestroyAll |
Synchronous teardown of every active Patch. |
void |
ExpireAll |
Soft-expire every active Patch through the normal envelope ramp. |
void |
ApplyParameterBlockToActivePatch |
Mid-life parameter mutation for an active patch evaluator. |
int32 |
GetActivePatchCount const inline |
|
const TArray< TObjectPtr< UComposableCameraPatchInstance > > & |
GetActivePatches const inline |
|
void |
BuildDebugSnapshot const |
Capture the active patch list for debug HUD and dump commands. |
UComposableCameraPatchManager¶
UComposableCameraPatchManager()
AddPatch¶
UComposableCameraPatchHandle * AddPatch(UComposableCameraPatchTypeAsset * PatchAsset, const FComposableCameraPatchActivateParams & Params, const FComposableCameraParameterBlock & ParameterBlock)
Add a Patch on this Director.
Rejects null assets and Duration-enabled patches whose resolved Duration is <= 0. Logs a warning and returns nullptr on rejection.
On success, spawns the evaluator camera, builds it from the patch asset, sorted-inserts the instance into ActivePatches by (LayerIndex ascending, PushSequence ascending), and returns a handle.
Parameters
ParameterBlockCaller-supplied exposed-parameter / exposed-variable values for the Patch evaluator. Same shape and keyspace as the block accepted byActivateNewCameraFromTypeAsset; routed through the Patch evaluator's construction path and cached on the runtime instance for later re-application.
ExpirePatch¶
void ExpirePatch(UComposableCameraPatchHandle * Handle, float ExitDurationOverride)
Manually retire a Patch.
Live patches flip to Exiting and are removed by Apply after the exit envelope reaches Expired.
Parameters
ExitDurationOverride< 0uses the Patch's own exit duration;0cuts immediately.
Apply¶
FComposableCameraPose Apply(float DeltaTime, const FComposableCameraPose & InputPose)
Per-frame application pass.
Iterates sorted ActivePatches. Each non-expired patch sees the pose produced by the tree plus all lower-layer patches, then blends its evaluator output by CurrentAlpha.
DestroyAll¶
void DestroyAll()
Synchronous teardown of every active Patch. Called when the owning context is popped immediately or the Director is being destroyed. Patches in flight do not get an exit blend through this path.
ExpireAll¶
void ExpireAll(float ExitDurationOverride)
Soft-expire every active Patch through the normal envelope ramp. Patches mid-Entering fade out from their current alpha; Active-phase patches fade from 1. Already-Exiting / Expired entries are left alone. Removal happens in the next Apply pass end-of-frame sweep.
Parameters
ExitDurationOverride< 0keeps each patch's own exit duration;>= 0replaces every patch's exit duration.
ApplyParameterBlockToActivePatch¶
void ApplyParameterBlockToActivePatch(UComposableCameraPatchHandle * Handle, const FComposableCameraParameterBlock & Parameters)
Mid-life parameter mutation. Re-applies a parameter block onto the Patch evaluator's runtime data block via the source asset's ApplyParameterBlock path.
The Sequencer patch track uses this every frame for keyed parameter values. No-op if the handle is null, stale, exiting, expired, or if the evaluator has no runtime data block yet.
GetActivePatchCount¶
const inline
inline int32 GetActivePatchCount() const
GetActivePatches¶
const inline
inline const TArray< TObjectPtr< UComposableCameraPatchInstance > > & GetActivePatches() const
BuildDebugSnapshot¶
const
void BuildDebugSnapshot(TArray< struct FComposableCameraPatchSnapshot > & OutPatches) const
Capture the current ActivePatches array as a value-type snapshot consumed by debug HUD and dump commands. Walks patches in the same sorted order Apply uses.
Private Attributes¶
| Return | Name | Description |
|---|---|---|
TArray< TObjectPtr< UComposableCameraPatchInstance > > |
ActivePatches |
Sorted by (LayerIndex ascending, PushSequence ascending). |
int32 |
NextPushSequence |
Monotonic counter assigned to each new instance on insert. |
ActivePatches¶
TArray< TObjectPtr< UComposableCameraPatchInstance > > ActivePatches
Sorted by (LayerIndex ascending, PushSequence ascending).
NextPushSequence¶
int32 NextPushSequence = 0
Monotonic counter assigned to each new instance on insert.