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 parentabsolute_rotation
(bool): [Read-Write] If RelativeRotation should be considered relative to the world, rather than the parentabsolute_scale
(bool): [Read-Write] If RelativeScale3D should be considered relative to the world, rather than the parentasset_user_data
(Array[AssetUserData]): [Read-Write] Array of user data stored with the componentasset_user_data_editor_only
(Array[AssetUserData]): [Read-Write] Array of user data stored with the componentauto_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 navigationcomponent_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 Sequencerdisable_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-usereditable_when_inherited
(bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor classenabled
(bool): [Read-Write] Whether the VCamComponent will update every framehidden_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 buildslive_link_subject
(LiveLinkSubjectName): [Read-Write] LiveLink subject name for the incoming camera transformmobility
(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 Stackmodifier_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 reseton_component_deactivated
(ActorComponentDeactivateSignature): [Read-Write] Called when the component has been deactivatedon_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 eventNote: 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 Componentrelative_location
(Vector): [Read-Write] Location of the component relative to its parentrelative_rotation
(Rotator): [Read-Write] Rotation of the component relative to its parentrelative_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
- 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:
- Returns:
created_provider (VCamOutputProviderBase):
- Return type:
VCamOutputProviderBase or None
- 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)
- 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.
- 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:
- get_all_output_providers() Array[VCamOutputProviderBase] ¶
Get All Output Providers
- Returns:
providers (Array[VCamOutputProviderBase]):
- Return type:
- 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:
- get_disable_component_when_spawned_by_sequencer() bool ¶
Get Disable Component when Spawned by Sequencer
- Return type:
- get_disable_output_on_multi_user_receiver() bool ¶
Get Disable Output on Multi User Receiver
- Return type:
- 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:
- get_input_profile() VCamInputProfile ¶
Get Input Profile
- Return type:
- get_input_v_cam_subsystem() InputVCamSubsystem ¶
Gets the subsystem responsible for input handling.
- Return type:
- get_live_link_data_for_current_frame() LiveLinkCameraBlueprintData or None ¶
- Returns:
Whether LiveLinkData has a valid result.
live_link_data (LiveLinkCameraBlueprintData):
- Return type:
LiveLinkCameraBlueprintData or None
- get_live_link_subobject() LiveLinkSubjectName ¶
Get Live Link Subobject
- Return type:
- get_modifier_by_index(index) VCamModifier ¶
Returns the Modifier in the Stack with the given index if it exist.
- Parameters:
index (int32) –
- Return type:
- 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:
- get_modifier_context() VCamModifierContext ¶
Get the current Modifier Context
- Returns:
Current Context
- Return type:
- get_modifiers_by_class(modifier_class) Array[VCamModifier] ¶
Given a specific Modifier class, returns a list of matching Modifiers
- Parameters:
- Returns:
found_modifiers (Array[VCamModifier]):
- Return type:
- get_modifiers_by_interface(interface_class) Array[VCamModifier] ¶
Given a specific Interface class, returns a list of matching Modifiers
- Parameters:
- Returns:
found_modifiers (Array[VCamModifier]):
- Return type:
- 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:
- get_output_providers_by_class(provider_class) Array[VCamOutputProviderBase] ¶
Get Output Providers by Class
- Parameters:
- Returns:
found_providers (Array[VCamOutputProviderBase]):
- Return type:
- get_player_mappable_keys() Array[EnhancedActionKeyMapping] ¶
Get Player Mappable Keys deprecated: GetPlayerMappableKeys has been deprecated. Please use UEnhancedPlayerMappableKeyProfile::GetPlayerMappingRows instead.
- Return type:
- 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.
- get_role() GameplayTag ¶
************* Blueprint Getters & Setters ***************
- Return type:
- get_subsystem_array(class_) Array[VCamSubsystem] ¶
Gets all subsystems implementing this interface
- Parameters:
- Return type:
- get_target_camera() CineCameraComponent ¶
Get Target Camera
- Return type:
- inject_input_for_action(action, raw_value, modifiers, triggers) None ¶
Injects an input action.
- Parameters:
action (InputAction) –
raw_value (InputActionValue) –
modifiers (Array[InputModifier]) –
triggers (Array[InputTrigger]) –
- inject_input_vector_for_action(action, value, modifiers, triggers) None ¶
Injects an input vector for action.
- Parameters:
action (InputAction) –
value (Vector) –
modifiers (Array[InputModifier]) –
triggers (Array[InputTrigger]) –
- property input_device_settings: VCamInputDeviceConfig¶
[Read-Write]
- Type:
- property input_profile: VCamInputProfile¶
[Read-Write]
- Type:
- 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:
- Returns:
created_modifier (VCamModifier):
- Return type:
VCamModifier or None
- insert_output_provider(index, provider_class) VCamOutputProviderBase or None ¶
Insert Output Provider
- Parameters:
- Returns:
created_provider (VCamOutputProviderBase):
- Return type:
VCamOutputProviderBase or None
- property live_link_subject: LiveLinkSubjectName¶
[Read-Write] LiveLink subject name for the incoming camera transform
- Type:
- 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:
- 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_modifier(modifier) bool ¶
- Parameters:
modifier (VCamModifier) –
- Returns:
Whether the modifier was removed successfully
- Return type:
- remove_modifier_by_index(modifier_index) bool ¶
- Parameters:
modifier_index (int32) –
- Returns:
Whether the modifier was removed successfully
- Return type:
- remove_output_provider(provider) bool ¶
Remove Output Provider
- Parameters:
provider (VCamOutputProviderBase) –
- Return type:
- remove_output_provider_by_index(provider_index) bool ¶
Remove Output Provider by Index
- Parameters:
provider_index (int32) –
- Return type:
- 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:
- 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
- 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
- set_live_link_subobject(value) None ¶
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
- 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:
- 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:
- set_role(value) None ¶
Set Role
- Parameters:
value (GameplayTag) –