unreal.VCamComponent

class unreal.VCamComponent(outer: Object | None = None, name: Name | str = 'None')

Bases: SceneComponent

Provides a modular system for editing a UCineCameraComponent using user widgets. This component must be attached as a direct child of UCineCameraComponent.

This component implements a Model-View-Controller architecture where modifiers are the model, output providers the view, and this component the controller.

There are three aspects to this component: - Modifiers implement logic for changing properties on the UCineCameraComponent. Modifiers contain ConnectionPoints.

ConnectionPoints can optionally expose UInputActions (Enhanced Input) that can be invoked by widgets.

  • Output providers create and render widgets (possibly streaming them). Usually output providers create UVCamWidgets, which are special widgets that can connect to ConnectionPoints. Widgets interact with modifiers in two ways:

    • Simple: trigger input actions that modifiers are subscribed to and expose via connections.

    • Advanced: query whether modifiers implement certain custom defined interfaces. UVCamWidget Connections can be configured with required and optional interfaces.

  • UVCamSubsystems exist for as long as a UVCamComponent is enabled (this is comparable to ULocalPlayerSubsystem). One notable such system is the UInputVCamSubsystem which allows UVCamComponents to bind to input devices similarly to how APlayerControllers do in shipped games.

C++ Source:

  • Plugin: VirtualCameraCore

  • Module: VCamCore

  • File: VCamComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • absolute_location (bool): [Read-Write] If RelativeLocation should be considered relative to the world, rather than the parent

  • absolute_rotation (bool): [Read-Write] If RelativeRotation should be considered relative to the world, rather than the parent

  • absolute_scale (bool): [Read-Write] If RelativeScale3D should be considered relative to the world, rather than the parent

  • asset_user_data (Array[AssetUserData]): [Read-Write] Array of user data stored with the component

  • asset_user_data_editor_only (Array[AssetUserData]): [Read-Write] Array of user data stored with the component

  • auto_activate (bool): [Read-Write] Whether the component is activated at creation or must be explicitly activated.

  • can_ever_affect_navigation (bool): [Read-Write] Whether this component can potentially influence navigation

  • component_tags (Array[Name]): [Read-Write] Array of tags that can be used for grouping and categorizing. Can also be accessed from scripting.

  • detail_mode (DetailMode): [Read-Write] If detail mode is >= system detail mode, primitive won’t be rendered.

  • disable_component_when_spawned_by_sequencer (bool): [Read-Write] If true, the component will force bEnabled to false when it is part of a spawnable in Sequencer

  • disable_output_on_multi_user_receiver (bool): [Read-Write] Do we disable the output if the virtual camera is in a Multi-user session and the camera is a “receiver” from multi-user

  • editable_when_inherited (bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor class

  • enabled (bool): [Read-Write] Whether the VCamComponent will update every frame

  • hidden_in_game (bool): [Read-Write] Whether to hide the primitive in game, if the primitive is Visible.

  • input_device_settings (VCamInputDeviceConfig): [Read-Write]

  • input_profile (VCamInputProfile): [Read-Write]

  • is_editor_only (bool): [Read-Write] If true, the component will be excluded from non-editor builds

  • live_link_subject (LiveLinkSubjectName): [Read-Write] LiveLink subject name for the incoming camera transform

  • mobility (ComponentMobility): [Read-Write] How often this component is allowed to move, used to make various optimizations. Only safe to set in constructor.

  • modifier_context (VCamModifierContext): [Read-Write] Modifier Context object that can be accessed by the Modifier Stack

  • modifier_stack (Array[ModifierStackEntry]): [Read-Write] List of Modifiers (executed in order)

  • on_component_activated (ActorComponentActivatedSignature): [Read-Write] Called when the component has been activated, with parameter indicating if it was from a reset

  • on_component_deactivated (ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivated

  • on_component_replaced (OnComponentReplaced): [Read-Write] There are situations in the editor where the component may be replaced by another component as part of the actor being reconstructed This event will notify you of that change and give you a reference to the new component. Bindings will be copied to the new component so you do not need to rebind this event

    Note: When the component is replaced you will need to get all properties on the component again such as Modifiers and Output Providers

  • output_providers (Array[VCamOutputProviderBase]): [Read-Write] List of Output Providers (executed in order)

  • physics_volume_changed_delegate (PhysicsVolumeChanged): [Read-Write] Delegate that will be called when PhysicsVolume has been changed *

  • primary_component_tick (ActorComponentTickFunction): [Read-Write] Main tick function for the Component

  • relative_location (Vector): [Read-Write] Location of the component relative to its parent

  • relative_rotation (Rotator): [Read-Write] Rotation of the component relative to its parent

  • relative_scale3d (Vector): [Read-Write] Non-uniform scaling of the component relative to its parent. Note that scaling is always applied in local space (no shearing etc)

  • replicate_using_registered_sub_object_list (bool): [Read-Write] When true the replication system will only replicate the registered subobjects list When false the replication system will instead call the virtual ReplicateSubObjects() function where the subobjects need to be manually replicated.

  • replicates (bool): [Read-Write] Is this component currently replicating? Should the network code consider it for replication? Owning Actor must be replicating first!

  • role (GameplayTag): [Read-Write] The role of this virtual camera. If this value is set and the corresponding tag set on the editor matches this value, then this camera is the sender and the authority in the case when connected to a multi-user session.

  • should_update_physics_volume (bool): [Read-Write] Whether or not the cached PhysicsVolume this component overlaps should be updated when the component is moved. see: GetPhysicsVolume()

  • update_frequency_ms (float): [Read-Write] Indicates the frequency which camera updates are sent when in Multi-user mode. This has a minimum value of 11ms. Using values below 30ms is discouraged. When higher refresh rates are needed consider using LiveLink rebroadcast to stream camera data.

  • use_attach_parent_bound (bool): [Read-Write] If true, this component uses its parents bounds when attached. This can be a significant optimization with many components attached together.

  • viewport_locker (VCamViewportLocker): [Read-Write] Sync with output providers keeping track of which viewports are locked.

  • visible (bool): [Read-Write] Whether to completely draw the primitive; if false, the primitive is not drawn, does not cast a shadow.

add_input_profile_with_currently_active_mappings(profile_name, update_if_profile_already_exists=True) bool

Tries to add a new Input Profile to the VCam Input Settings and populates it with any currently active player mappable keys Note: The set of currently active player mappable keys may be larger than the set of mappings in this component’s Input Profile

Optionally this function can update an existing profile, this will only add any mappable keys that don’t currently exist in the profile but will not remove any existing mappings Returns whether the profile was successfully added or updated

Parameters:
  • profile_name (Name) –

  • update_if_profile_already_exists (bool) –

Return type:

bool

add_modifier(name, modifier_class) VCamModifier or None

Add a modifier to the stack with a given name. If that name is already in use then the modifier will not be added. Returns the created modifier if the Add succeeded

Parameters:
Returns:

created_modifier (VCamModifier):

Return type:

VCamModifier or None

add_output_provider(provider_class) VCamOutputProviderBase or None

************* Output Provider access ***************

Parameters:

provider_class (type(Class)) –

Returns:

created_provider (VCamOutputProviderBase):

Return type:

VCamOutputProviderBase or None

clear_modifiers() None

deprecated: ‘clear_modifiers’ was renamed to ‘remove_all_modifiers’.

property disable_component_when_spawned_by_sequencer: bool

[Read-Write] If true, the component will force bEnabled to false when it is part of a spawnable in Sequencer

Type:

(bool)

property disable_output_on_multi_user_receiver: bool

[Read-Write] Do we disable the output if the virtual camera is in a Multi-user session and the camera is a “receiver” from multi-user

Type:

(bool)

property enabled: bool

[Read-Write] Whether the VCamComponent will update every frame

Type:

(bool)

find_modifier_by_interface(interface_class: Class) None

deprecated: ‘find_modifier_by_interface’ was renamed to ‘get_modifiers_by_interface’.

find_modifier_by_name(name: Name) VCamModifier

deprecated: ‘find_modifier_by_name’ was renamed to ‘get_modifier_by_name’.

find_modifiers_by_class(modifier_class: Class) None

deprecated: ‘find_modifiers_by_class’ was renamed to ‘get_modifiers_by_class’.

get_all_modifier_names() Array[Name]

Returns all the modifier names used to identifying connection points.

Return type:

Array[Name]

get_all_modifiers() Array[VCamModifier]

Returns all the Modifiers in the Component’s Stack Note: It’s possible not all Modifiers will be valid (such as if the user has not set a class for the modifier in the details panel)

Returns:

modifiers (Array[VCamModifier]):

Return type:

Array[VCamModifier]

get_all_output_providers() Array[VCamOutputProviderBase]

Get All Output Providers

Returns:

providers (Array[VCamOutputProviderBase]):

Return type:

Array[VCamOutputProviderBase]

get_all_player_mappable_action_key_mappings() Array[EnhancedActionKeyMapping]

Searches the currently active input system for all registered key mappings that are marked as Player Mappable.

Return type:

Array[EnhancedActionKeyMapping]

get_disable_component_when_spawned_by_sequencer() bool

Get Disable Component when Spawned by Sequencer

Return type:

bool

get_disable_output_on_multi_user_receiver() bool

Get Disable Output on Multi User Receiver

Return type:

bool

get_input_device_settings() VCamInputDeviceConfig

Gets the current input device settings being used (if this component is enabled) or that will be used (if not enabled).

Return type:

VCamInputDeviceConfig

get_input_profile() VCamInputProfile

Get Input Profile

Return type:

VCamInputProfile

get_input_v_cam_subsystem() InputVCamSubsystem

Gets the subsystem responsible for input handling.

Return type:

InputVCamSubsystem

Returns:

Whether LiveLinkData has a valid result.

live_link_data (LiveLinkCameraBlueprintData):

Return type:

LiveLinkCameraBlueprintData or None

Get Live Link Subobject

Return type:

LiveLinkSubjectName

get_modifier_by_index(index) VCamModifier

Returns the Modifier in the Stack with the given index if it exist.

Parameters:

index (int32) –

Return type:

VCamModifier

get_modifier_by_name(name) VCamModifier

Tries to find a Modifier in the Stack with the given name. The returned Modifier must be checked before it is used.

Parameters:

name (Name) –

Return type:

VCamModifier

get_modifier_context() VCamModifierContext

Get the current Modifier Context

Returns:

Current Context

Return type:

VCamModifierContext

get_modifiers_by_class(modifier_class) Array[VCamModifier]

Given a specific Modifier class, returns a list of matching Modifiers

Parameters:

modifier_class (type(Class)) –

Returns:

found_modifiers (Array[VCamModifier]):

Return type:

Array[VCamModifier]

get_modifiers_by_interface(interface_class) Array[VCamModifier]

Given a specific Interface class, returns a list of matching Modifiers

Parameters:

interface_class (type(Class)) –

Returns:

found_modifiers (Array[VCamModifier]):

Return type:

Array[VCamModifier]

get_number_of_modifiers() int32

Get Number Of Modifiers

Return type:

int32

get_number_of_output_providers() int32

Get Number Of Output Providers

Return type:

int32

get_output_provider_by_index(provider_index) VCamOutputProviderBase

Get Output Provider by Index

Parameters:

provider_index (int32) –

Return type:

VCamOutputProviderBase

get_output_providers_by_class(provider_class) Array[VCamOutputProviderBase]

Get Output Providers by Class

Parameters:

provider_class (type(Class)) –

Returns:

found_providers (Array[VCamOutputProviderBase]):

Return type:

Array[VCamOutputProviderBase]

get_player_mappable_keys() Array[EnhancedActionKeyMapping]

Get Player Mappable Keys deprecated: GetPlayerMappableKeys has been deprecated. Please use UEnhancedPlayerMappableKeyProfile::GetPlayerMappingRows instead.

Return type:

Array[EnhancedActionKeyMapping]

get_player_mapped_key(mapping_name) Key

Searches the currently active input system for the current key mapped to a given input mapping If there is not a player mapped key, then this will return EKeys::Invalid.

Parameters:

mapping_name (Name) –

Return type:

Key

get_role() GameplayTag

************* Blueprint Getters & Setters ***************

Return type:

GameplayTag

get_subsystem_array(class_) Array[VCamSubsystem]

Gets all subsystems implementing this interface

Parameters:

class (type(Class)) –

Return type:

Array[VCamSubsystem]

get_target_camera() CineCameraComponent

Get Target Camera

Return type:

CineCameraComponent

inject_input_for_action(action, raw_value, modifiers, triggers) None

Injects an input action.

Parameters:
inject_input_vector_for_action(action, value, modifiers, triggers) None

Injects an input vector for action.

Parameters:
property input_device_settings: VCamInputDeviceConfig

[Read-Write]

Type:

(VCamInputDeviceConfig)

property input_profile: VCamInputProfile

[Read-Write]

Type:

(VCamInputProfile)

insert_modifier(name, index, modifier_class) VCamModifier or None

Insert a modifier to the stack with a given name and index. If that name is already in use then the modifier will not be added. The index must be between zero and the number of existing modifiers inclusive Returns the created modifier if the Add succeeded.

Parameters:
  • name (Name) –

  • index (int32) –

  • modifier_class (type(Class)) –

Returns:

created_modifier (VCamModifier):

Return type:

VCamModifier or None

insert_output_provider(index, provider_class) VCamOutputProviderBase or None

Insert Output Provider

Parameters:
  • index (int32) –

  • provider_class (type(Class)) –

Returns:

created_provider (VCamOutputProviderBase):

Return type:

VCamOutputProviderBase or None

[Read-Write] LiveLink subject name for the incoming camera transform

Type:

(LiveLinkSubjectName)

property on_component_replaced: OnComponentReplaced

[Read-Write] There are situations in the editor where the component may be replaced by another component as part of the actor being reconstructed This event will notify you of that change and give you a reference to the new component. Bindings will be copied to the new component so you do not need to rebind this event

Note: When the component is replaced you will need to get all properties on the component again such as Modifiers and Output Providers

Type:

(OnComponentReplaced)

register_object_for_input(object) None

Registers the given object with the VCamComponent’s Input Component This allows dynamic input bindings such as input events in blueprints to work correctly Note: Ensure you call UnregisterObjectForInput when you are finished with the object otherwise input events will still fire until GC actually destroys the object

Parameters:

object (Object) – The object to register

remove_all_modifiers() None

Remove all Modifiers from the Stack.

remove_all_output_providers() None

Remove All Output Providers

remove_modifier(modifier) bool
Parameters:

modifier (VCamModifier) –

Returns:

Whether the modifier was removed successfully

Return type:

bool

remove_modifier_by_index(modifier_index) bool
Parameters:

modifier_index (int32) –

Returns:

Whether the modifier was removed successfully

Return type:

bool

remove_modifier_by_name(name) bool
Parameters:

name (Name) –

Returns:

Whether the modifier was removed successfully.

Return type:

bool

remove_output_provider(provider) bool

Remove Output Provider

Parameters:

provider (VCamOutputProviderBase) –

Return type:

bool

remove_output_provider_by_index(provider_index) bool

Remove Output Provider by Index

Parameters:

provider_index (int32) –

Return type:

bool

property role: GameplayTag

[Read-Write] The role of this virtual camera. If this value is set and the corresponding tag set on the editor matches this value, then this camera is the sender and the authority in the case when connected to a multi-user session.

Type:

(GameplayTag)

save_current_input_profile_to_settings(profile_name) bool

Saves the current input profile settings to the VCam Input Settings using the provided Profile Name

Parameters:

profile_name (Name) –

Return type:

bool

set_disable_component_when_spawned_by_sequencer(value) None

Set Disable Component when Spawned by Sequencer

Parameters:

value (bool) –

set_disable_output_on_multi_user_receiver(value) None

Set Disable Output on Multi User Receiver

Parameters:

value (bool) –

set_input_profile_from_name(profile_name) bool

Attempts to apply key mapping settings from an input profile defined in VCam Input Settings Returns whether the profile was found and able to be applied

Parameters:

profile_name (Name) –

Return type:

bool

Set Live Link Subobject

Parameters:

value (LiveLinkSubjectName) –

set_modifier_context_class(context_class) VCamModifierContext

Sets the Modifier Context to a new instance of the provided class

Parameters:

context_class (type(Class)) – The Class to create the context from

Returns:

created_context (VCamModifierContext): The created Context, can be invalid if Context Class was None

Return type:

VCamModifierContext

set_modifier_index(original_index, new_index) bool

Moves an existing modifier in the stack from its current index to a new index

Parameters:
  • original_index (int32) –

  • new_index (int32) –

Return type:

bool

set_output_provider_index(original_index, new_index) bool

Moves an existing Output Provider in the stack from its current index to a new index

Parameters:
  • original_index (int32) –

  • new_index (int32) –

Return type:

bool

set_role(value) None

Set Role

Parameters:

value (GameplayTag) –

unregister_object_for_input(object) None

Unregisters the given object with the VCamComponent’s Input Component

Parameters:

object (Object) – The object to unregister