unreal.DataLayerEditorSubsystem

class unreal.DataLayerEditorSubsystem(outer: Optional[Object] = None, name: Union[Name, str] = 'None')

Bases: EditorSubsystem

Data Layer Editor Subsystem

C++ Source:

  • Module: DataLayerEditor

  • File: DataLayerEditorSubsystem.h

add_actor_to_data_layer(actor, data_layer) bool

Adds the actor to the DataLayer.

Parameters:
  • actor (Actor) – The actor to add to the DataLayer

  • data_layer (DataLayerInstance) – The DataLayer to add the actor to

Returns:

true if the actor was added. false is returned if the actor already belongs to the DataLayer.

Return type:

bool

add_actor_to_data_layers(actor, data_layers) bool

Adds the provided actor to the DataLayers.

Parameters:
Returns:

true if the actor was added to at least one of the provided DataLayers.

Return type:

bool

add_actors_to_data_layer(actors, data_layer) bool

Add the actors to the DataLayer

Parameters:
Returns:

true if at least one actor was added to the DataLayer. false is returned if all the actors already belonged to the DataLayer.

Return type:

bool

add_actors_to_data_layers(actors, data_layers) bool

Add the actors to the DataLayers

Parameters:
Returns:

true if at least one actor was added to at least one DataLayer. false is returned if all the actors already belonged to all specified DataLayers.

Return type:

bool

add_selected_actors_to_data_layer(data_layer) bool

Adds selected actors to the DataLayer.

Parameters:

data_layer (DataLayerInstance) – A DataLayer.

Returns:

true if at least one actor was added. false is returned if all selected actors already belong to the DataLayer.

Return type:

bool

add_selected_actors_to_data_layers(data_layers) bool

Adds selected actors to the DataLayers.

Parameters:

data_layers (Array[DataLayerInstance]) – A valid list of DataLayers.

Returns:

true if at least one actor was added. false is returned if all selected actors already belong to the DataLayers.

Return type:

bool

append_actors_from_data_layer(data_layer) Array[Actor]

Appends all the actors associated with the specified DataLayer.

Parameters:

data_layer (DataLayerInstance) – The DataLayer to find actors for.

Returns:

out_actors (Array[Actor]): The list to append the found actors to.

Return type:

Array[Actor]

append_actors_from_data_layers(data_layers) Array[Actor]

Appends all the actors associated with ANY of the specified DataLayers.

Parameters:

data_layers (Array[DataLayerInstance]) – The DataLayers to find actors for.

Returns:

out_actors (Array[Actor]): The list to append the found actors to.

Return type:

Array[Actor]

create_data_layer(parent_data_layer=None) DataLayerInstance

Create Data Layer

Parameters:

parent_data_layer (DataLayerInstance) –

Return type:

DataLayerInstance

create_data_layer_instance(parameters) DataLayerInstance

Creates a UDataLayerInstance Object

Parameters:

parameters (DataLayerCreationParameters) – The Data Layer Instance creation parameters

Returns:

The newly created UDataLayerInstance Object

Return type:

DataLayerInstance

delete_data_layer(data_layer_to_delete) None

Deletes the provided DataLayer

Parameters:

data_layer_to_delete (DataLayerInstance) – A valid DataLayer

delete_data_layers(data_layers_to_delete) None

Deletes all of the provided DataLayers

Parameters:

data_layers_to_delete (Array[DataLayerInstance]) – A valid list of DataLayer.

get_actors_from_data_layer(data_layer) Array[Actor]

Gets all the actors associated with the specified DataLayer. Analog to AppendActorsFromDataLayer but it returns rather than appends the actors.

Parameters:

data_layer (DataLayerInstance) – The DataLayer to find actors for.

Returns:

The list to assign the found actors to.

Return type:

Array[Actor]

get_actors_from_data_layers(data_layers) Array[Actor]

Gets all the actors associated with ANY of the specified DataLayers. Analog to AppendActorsFromDataLayers but it returns rather than appends the actors.

Parameters:

data_layers (Array[DataLayerInstance]) – The DataLayers to find actors for.

Returns:

The list to assign the found actors to.

Return type:

Array[Actor]

get_all_data_layers() Array[DataLayerInstance]

Returns all Data Layers

Return type:

Array[DataLayerInstance]

get_data_layer(actor_data_layer) DataLayerInstance

Get Data Layer

Parameters:

actor_data_layer (ActorDataLayer) –

Return type:

DataLayerInstance

get_data_layer_from_label(data_layer_label) DataLayerInstance

Get Data Layer from Label

Parameters:

data_layer_label (Name) –

Return type:

DataLayerInstance

get_data_layer_instance(data_layer_asset) DataLayerInstance

Gets the UDataLayerInstance associated to the DataLayerAsset

Parameters:

data_layer_asset (DataLayerAsset) – The DataLayerAsset associated to the UDataLayerInstance

Returns:

The UDataLayerInstance of the provided DataLayerAsset

Return type:

DataLayerInstance

get_data_layer_instances(data_layer_assets) Array[DataLayerInstance]

Gets the UDataLayerInstances associated to the each DataLayerAssets

Parameters:

data_layer_assets (Array[DataLayerAsset]) – The array of DataLayerAssets associated to UDataLayerInstances

Returns:

The array of UDataLayerInstances corresponding to a DataLayerAsset in the DataLayerAssets array

Return type:

Array[DataLayerInstance]

is_actor_valid_for_data_layer(actor) bool

Checks to see if the specified actor is in an appropriate state to interact with DataLayers

Parameters:

actor (Actor) – The actor to validate

Return type:

bool

make_all_data_layers_visible() None

Set the visibility of all DataLayers to true

remove_actor_from_all_data_layers(actor) bool

Removes an actor from all DataLayers.

Parameters:

actor (Actor) – The actor to modify

Returns:

true if the actor was changed.

Return type:

bool

remove_actor_from_data_layer(actor, data_layer_to_remove) bool

Removes an actor from the specified DataLayer.

Parameters:
  • actor (Actor) – The actor to remove from the provided DataLayer

  • data_layer_to_remove (DataLayerInstance) – The DataLayer to remove the actor from

Returns:

true if the actor was removed from the DataLayer. false is returned if the actor already belonged to the DataLayer.

Return type:

bool

remove_actor_from_data_layers(actor, data_layers) bool

Removes the provided actor from the DataLayers.

Parameters:
  • actor (Actor) – The actor to remove from the provided DataLayers

  • data_layers (Array[DataLayerInstance]) – A valid list of DataLayers.

Returns:

true if the actor was removed from at least one of the provided DataLayers.

Return type:

bool

remove_actors_from_all_data_layers(actors) bool

Removes an actor from all DataLayers.

Parameters:

actors (Array[Actor]) –

Returns:

true if any actor was changed.

Return type:

bool

remove_actors_from_data_layer(actors, data_layer) bool

Removes the actors from the specified DataLayer.

Parameters:
Returns:

true if at least one actor was removed from the DataLayer. false is returned if all the actors already belonged to the DataLayer.

Return type:

bool

remove_actors_from_data_layers(actors, data_layers) bool

Remove the actors to the DataLayers

Parameters:
Returns:

true if at least one actor was removed from at least one DataLayer. false is returned if none of the actors belonged to any of the specified DataLayers.

Return type:

bool

remove_selected_actors_from_data_layer(data_layer) bool

Removes the selected actors from the DataLayer.

Parameters:

data_layer (DataLayerInstance) – A DataLayer.

Returns:

true if at least one actor was added. false is returned if all selected actors already belong to the DataLayer.

Return type:

bool

remove_selected_actors_from_data_layers(data_layers) bool

Removes selected actors from the DataLayers.

Parameters:

data_layers (Array[DataLayerInstance]) – A valid list of DataLayers.

Returns:

true if at least one actor was removed.

Return type:

bool

rename_data_layer(data_layer, new_data_layer_label) bool

Rename Data Layer

Parameters:
Return type:

bool

select_actors_in_data_layer(data_layer, select, notify, select_even_if_hidden=False) bool

Selects/de-selects actors belonging to the DataLayer.

Parameters:
  • data_layer (DataLayerInstance) – A valid DataLayer.

  • select (bool) – If true actors are selected; if false, actors are deselected.

  • notify (bool) – If true the Editor is notified of the selection change; if false, the Editor will not be notified.

  • select_even_if_hidden (bool) – [optional] If true even hidden actors will be selected; if false, hidden actors won’t be selected.

Returns:

true if at least one actor was selected/deselected.

Return type:

bool

select_actors_in_data_layers(data_layers, select, notify, select_even_if_hidden=False) bool

Selects/de-selects actors belonging to the DataLayers.

Parameters:
  • data_layers (Array[DataLayerInstance]) – A valid list of DataLayers.

  • select (bool) – If true actors are selected; if false, actors are deselected.

  • notify (bool) – If true the Editor is notified of the selection change; if false, the Editor will not be notified

  • select_even_if_hidden (bool) – [optional] If true even hidden actors will be selected; if false, hidden actors won’t be selected.

Returns:

true if at least one actor was selected/deselected.

Return type:

bool

set_data_layer_is_dynamically_loaded_in_editor(data_layer, is_loaded_in_editor, is_from_user_change) bool

Set Data Layer Is Dynamically Loaded in Editor deprecated: Use SetDataLayerIsLoadedInEditor instead

Parameters:
  • data_layer (DataLayer) –

  • is_loaded_in_editor (bool) –

  • is_from_user_change (bool) –

Return type:

bool

set_data_layer_is_loaded_in_editor(data_layer, is_loaded_in_editor, is_from_user_change) bool

Changes the DataLayer’s IsLoadedInEditor flag to the provided state

Parameters:
  • data_layer (DataLayerInstance) – The DataLayer to affect.

  • is_loaded_in_editor (bool) – The new value of the flag IsLoadedInEditor. If True, the Editor loading will consider this DataLayer to load or not an Actor part of this DataLayer. An Actor will not be loaded in the Editor if all its DataLayers are not LoadedInEditor.

  • is_from_user_change (bool) – If this change originates from a user change or not.

Return type:

bool

set_data_layer_visibility(data_layer, is_visible) None

Changes the DataLayer’s visibility to the provided state

Parameters:
  • data_layer (DataLayerInstance) – The DataLayer to affect.

  • is_visible (bool) – If true the DataLayer will be visible; if false, the DataLayer will not be visible.

set_data_layers_is_dynamically_loaded_in_editor(data_layers, is_loaded_in_editor, is_from_user_change) bool

Set Data Layers Is Dynamically Loaded in Editor deprecated: Use SetDataLayersIsLoadedInEditor instead

Parameters:
Return type:

bool

set_data_layers_is_loaded_in_editor(data_layers, is_loaded_in_editor, is_from_user_change) bool

Changes the IsLoadedInEditor flag of the DataLayers to the provided state

Parameters:
  • data_layers (Array[DataLayerInstance]) – The DataLayers to affect

  • is_loaded_in_editor (bool) – The new value of the flag IsLoadedInEditor. If True, the Editor loading will consider this DataLayer to load or not an Actor part of this DataLayer. An Actor will not be loaded in the Editor if all its DataLayers are not LoadedInEditor.

  • is_from_user_change (bool) – If this change originates from a user change or not.

Return type:

bool

set_data_layers_visibility(data_layers, is_visible) None

Changes visibility of the DataLayers to the provided state

Parameters:
  • data_layers (Array[DataLayerInstance]) – The DataLayers to affect

  • is_visible (bool) – If true the DataLayers will be visible; if false, the DataLayers will not be visible

set_parent_data_layer(data_layer, parent_data_layer) bool

Sets a Parent DataLayer for a specified DataLayer

Parameters:
Returns:

true if succeeded, false if failed.

Return type:

bool

toggle_data_layer_is_dynamically_loaded_in_editor(data_layer, is_from_user_change) bool

Toggle Data Layer Is Dynamically Loaded in Editor deprecated: Use ToggleDataLayerIsLoadedInEditor instead

Parameters:
Return type:

bool

toggle_data_layer_is_loaded_in_editor(data_layer, is_from_user_change) bool

Toggles the DataLayer’s IsLoadedInEditor flag

Parameters:
  • data_layer (DataLayerInstance) – The DataLayer to affect

  • is_from_user_change (bool) – If this change originates from a user change or not.

Return type:

bool

toggle_data_layer_visibility(data_layer) None

Toggles the DataLayer’s visibility

Parameters:

data_layer (DataLayerInstance) – The DataLayer to affect

toggle_data_layers_is_dynamically_loaded_in_editor(data_layers, is_from_user_change) bool

Toggle Data Layers Is Dynamically Loaded in Editor deprecated: Use ToggleDataLayersIsLoadedInEditor instead

Parameters:
Return type:

bool

toggle_data_layers_is_loaded_in_editor(data_layers, is_from_user_change) bool

Toggles the IsLoadedInEditor flag of all of the DataLayers

Parameters:
  • data_layers (Array[DataLayerInstance]) – The DataLayers to affect

  • is_from_user_change (bool) – If this change originates from a user change or not.

Return type:

bool

toggle_data_layers_visibility(data_layers) None

Toggles the visibility of all of the DataLayers

Parameters:

data_layers (Array[DataLayerInstance]) – The DataLayers to affect

update_actor_all_views_visibility(actor) None

Update Actor All Views Visibility deprecated: Per-view Data Layer visibility was removed.

Parameters:

actor (Actor) –

update_actor_visibility(actor, notify_selection_change, redraw_viewports) (out_selection_changed=bool, out_actor_modified=bool) or None

Updates the provided actors visibility in the viewports

Parameters:
  • actor (Actor) – Actor to update

  • notify_selection_change (bool) – If true the Editor is notified of the selection change; if false, the Editor will not be notified

  • redraw_viewports (bool) – If true the viewports will be redrawn; if false, they will not

Returns:

out_selection_changed (bool): [OUT] Whether the Editors selection changed

out_actor_modified (bool): [OUT] Whether the actor was modified

Return type:

tuple or None

update_all_actors_visibility(notify_selection_change, redraw_viewports) bool

Updates the visibility of all actors in the viewports

Parameters:
  • notify_selection_change (bool) – If true the Editor is notified of the selection change; if false, the Editor will not be notified

  • redraw_viewports (bool) – If true the viewports will be redrawn; if false, they will not

Return type:

bool

update_all_view_visibility(data_layer_that_changed) None

Update All View Visibility deprecated: Per-view Data Layer visibility was removed.

Parameters:

data_layer_that_changed (DataLayer) –