unreal.LensComponent
¶
- class unreal.LensComponent(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
ActorComponent
Component for applying a post-process lens distortion effect to a CineCameraComponent on the same actor
C++ Source:
Plugin: CameraCalibrationCore
Module: CameraCalibrationCore
File: LensComponent.h
Editor Properties: (see get_editor_property/set_editor_property)
apply_distortion
(bool): [Read-Write] Whether or not to apply distortion to the target camera componentapply_nodal_offset_on_tick
(bool): [Read-Write] If checked, nodal offset will be applied automatically when this component ticks. Set to false if nodal offset needs to be manually applied at some other time (via Blueprints).asset_user_data
(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.cropped_filmback
(CameraFilmbackSettings): [Read-Write] Cropped filmback to use if the filmback override settings are set to use itdistortion_source
(DistortionHandlerPicker): [Read-Write] deprecated: This property has been deprecated. Use GetDistortionSource() and SetDistortionSource() instead.distortion_state
(LensDistortionState): [Read-Write] The current distortion statedistortion_state_source
(DistortionSource): [Read-Write] Specifies from where the distortion state information comeseditable_when_inherited
(bool): [Read-Write] True if this component can be modified when it was inherited from a parent actor classeval_inputs
(LensFileEvaluationInputs): [Read-Only] Inputs to LensFile evaluationevaluation_mode
(FIZEvaluationMode): [Read-Write] Specify how the Lens File should be evaluatedfilmback_override
(FilmbackOverrideSource): [Read-Write] Controls whether this component can override the camera’s filmback, and if so, which override to useis_editor_only
(bool): [Read-Write] If true, the component will be excluded from non-editor buildslens_file_picker
(LensFilePicker): [Read-Write] Lens File used to drive distortion with current camera settingslens_model
(type(Class)): [Read-Write] The current lens model used for distortionon_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 deactivatedoriginal_tracked_component_transform
(Transform): [Read-Only] Serialized transform of the TrackedComponent prior to nodal offset being appliedoverscan_multiplier
(float): [Read-Write] The percentage of the computed overscan that should be applied to the target cameraprimary_component_tick
(ActorComponentTickFunction): [Read-Write] Main tick function for the Componentreplicate_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!scale_overscan
(bool): [Read-Write] Whether to scale the computed overscan by the overscan percentagetarget_camera_component
(ComponentReference): [Read-Write] The CineCameraComponent on which to apply the post-process distortion effect
- property apply_distortion: bool¶
[Read-Write] Whether or not to apply distortion to the target camera component
- Type:
(bool)
- apply_nodal_offset(component_to_offset, use_manual_inputs=False, manual_focus_input=0.000000, manual_zoom_input=0.000000) None ¶
Manually apply nodal offset to the specified component. If bUseManualInputs is true, the input Focus and Zoom values will be used to evaluate the LensFile . If bUseManualInputs is false, the LensFile be will evaluated based on the Lens Component’s evaluation mode.
- Parameters:
component_to_offset (SceneComponent) –
use_manual_inputs (bool) –
manual_focus_input (float) –
manual_zoom_input (float) –
- property distortion_source: DistortionHandlerPicker¶
[Read-Write] deprecated: This property has been deprecated. Use GetDistortionSource() and SetDistortionSource() instead.
- Type:
- property distortion_state: LensDistortionState¶
[Read-Write] The current distortion state
- Type:
- get_cropped_filmback() CameraFilmbackSettings ¶
Get the cropped filmback (only relevant if the filmback override setting is set to use the CroppedFilmback
- Return type:
- get_distortion_source() DistortionSource ¶
Get the distortion source setting
- Return type:
- get_distortion_state() LensDistortionState ¶
Get the current distortion state
- Return type:
- get_filmback_override_setting() FilmbackOverrideSource ¶
Get the filmback override setting
- Return type:
- get_fiz_evaluation_mode() FIZEvaluationMode ¶
Get the evaluation mode used to evaluate the LensFile
- Return type:
- get_lens_file_evaluation_inputs() LensFileEvaluationInputs ¶
Get the data used by this component to evaluate the LensFile
- Return type:
- get_lens_file_picker() LensFilePicker ¶
Get the LensFile picker used by this component
- Return type:
- get_original_focal_length() float ¶
Get the original (not adjusted for overscan) focal length of the camera
- Return type:
- get_overscan_multiplier() float ¶
Get the evaluation mode used to evaluate the LensFile
- Return type:
- property original_tracked_component_transform: Transform¶
[Read-Only] Serialized transform of the TrackedComponent prior to nodal offset being applied
- Type:
- property overscan_multiplier: float¶
[Read-Write] The percentage of the computed overscan that should be applied to the target camera
- Type:
(float)
- property scale_overscan: bool¶
[Read-Write] Whether to scale the computed overscan by the overscan percentage
- Type:
(bool)
- set_apply_distortion(apply) None ¶
Set whether distortion should be applied to the target camera
- Parameters:
apply (bool) –
- set_apply_nodal_offset_on_tick(apply_nodal_offset) None ¶
Set whether nodal offset should be automatically applied during this component’s tick
- Parameters:
apply_nodal_offset (bool) –
- set_cropped_filmback(filmback) None ¶
Set the cropped filmback (only relevant if the filmback override setting is set to use the CroppedFilmback
- Parameters:
filmback (CameraFilmbackSettings) –
- set_distortion_source(source) None ¶
Set the distortion source setting
- Parameters:
source (DistortionSource) –
- set_distortion_state(state) None ¶
Set the current distortion state
- Parameters:
state (LensDistortionState) –
- set_filmback_override_setting(setting) None ¶
Set the filmback override setting
- Parameters:
setting (FilmbackOverrideSource) –
- set_fiz_evaluation_mode(mode) None ¶
Set the evaluation mode used to evaluate the LensFile
- Parameters:
mode (FIZEvaluationMode) –
- set_lens_file(lens_file) None ¶
Set the LensFile used by this component
- Parameters:
lens_file (LensFile) –
- set_lens_file_picker(lens_file) None ¶
Set the LensFile picker used by this component
- Parameters:
lens_file (LensFilePicker) –
- set_overscan_multiplier(multiplier) None ¶
Set the LensFile used by this component
- Parameters:
multiplier (float) –
- should_apply_distortion() bool ¶
Whether distortion should be applied to the target camera
- Return type:
- should_apply_nodal_offset_on_tick() bool ¶
Returns true if nodal offset will be automatically applied during this component’s tick, false otherwise
- Return type: