unreal.MagicLeapCameraComponent

class unreal.MagicLeapCameraComponent(outer=None, name='None')

Bases: unreal.ActorComponent

The MagicLeapCameraComponent provides access to and maintains state for camera capture functionality. The connection to the device’s camera is managed internally. Users of this component are able to asynchronously capture camera images and footage to file. Alternatively, a camera image can be captured directly to texture. The user need only make the relevant asynchronous call and then register the appropriate event handlers for the operation’s completion.

C++ Source:

  • Plugin: MagicLeapCamera

  • Module: MagicLeapCamera

  • File: MagicLeapCameraComponent.h

Editor Properties: (see get_editor_property/set_editor_property)

  • asset_user_data (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.

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

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

  • on_capture_img_to_file (MagicLeapCameraCaptureImgToFileMulti): [Read-Write] On Capture Img to File

  • on_capture_img_to_texture (MagicLeapCameraCaptureImgToTextureMulti): [Read-Write] On Capture Img to Texture

  • 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_log_message (MagicLeapCameraLogMessageMulti): [Read-Write] On Log Message

  • on_start_recording (MagicLeapCameraStartRecordingMulti): [Read-Write] On Start Recording

  • on_stop_recording (MagicLeapCameraStopRecordingMulti): [Read-Write] On Stop Recording

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

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

capture_image_to_file_async()bool

Initiates a capture image to file task on a separate thread. The newly created jpeg file will have an automatically generated name which is guaranteed to be unique. Upon completion, a successful operation will provide the file path of the newly created jpeg to the FMagicLeapCameraCaptureImgToFile event handler.:

Returns

True if the call succeeds, false otherwise.

Return type

bool

capture_image_to_texture_async()bool

Initiates a capture image to memory task on a speparate thread. The user should register event handlers for both the success and fail events. Upon completion, a successful operation will provide a dynamically generated texture containing the captured image to the FMagicLeapCameraCaptureImgToTextureSuccess event handler.: The generated texture will be garbage collected when this app is destroyed.:

Returns

True if the call succeeds, false otherwise.

Return type

bool

is_capturing()bool

Gets the capture state of the component.

Returns

True if the component is currently capturing, false otherwise.

Return type

bool

property on_capture_img_to_file

[Read-Write] On Capture Img to File

Type

(MagicLeapCameraCaptureImgToFileMulti)

property on_capture_img_to_texture

[Read-Write] On Capture Img to Texture

Type

(MagicLeapCameraCaptureImgToTextureMulti)

property on_log_message

[Read-Write] On Log Message

Type

(MagicLeapCameraLogMessageMulti)

property on_start_recording

[Read-Write] On Start Recording

Type

(MagicLeapCameraStartRecordingMulti)

property on_stop_recording

[Read-Write] On Stop Recording

Type

(MagicLeapCameraStopRecordingMulti)

start_recording_async()bool

Initiates the capturing of video/audio data on a separate thread. The system will continue to record video until StopRecordingVideo is called.:

Returns

True if the call succeeds, false otherwise.

Return type

bool

stop_recording_async()bool

Stops the recording and saves the video/audio data to an mp4 file. The newly created mp4 file will have an automatically generated name which is guaranteed to be unique.:

Returns

True if the call succeeds, false otherwise.

Return type

bool