unreal.LayersSubsystem
¶
- class unreal.LayersSubsystem(outer: Object | None = None, name: Name | str = 'None')¶
Bases:
EditorSubsystem
Layers Subsystem
C++ Source:
Module: UnrealEd
File: LayersSubsystem.h
- add_all_layer_names_to() Array[Name] ¶
Gets all known layers and appends their names to the provide array
- add_level_layer_information(level) None ¶
Aggregates any information regarding layers associated with the level and it contents
- Parameters:
level (Level) – The process
- append_actors_from_layer(layer_name) Array[Actor] ¶
Appends all the actors associated with the specified layer.
- append_actors_from_layers(layer_names) Array[Actor] ¶
Appends all the actors associated with ANY of the specified layers.
- delete_layer(layer_to_delete) None ¶
Deletes the provided layer, disassociating all actors from them
- Parameters:
layer_to_delete (Name) – A valid layer name
- delete_layers(layers_to_delete) None ¶
Deletes all of the provided layers, disassociating all actors from them
- disassociate_actor_from_layers(actor) bool ¶
Disassociates an Actor’s layers from the layer system, general used before deleting the Actor
- disassociate_actors_from_layers(actors) bool ¶
Disassociates actors from the layer system, generally used before deleting the Actors
- editor_map_change() None ¶
Delegate handler for FEditorDelegates::MapChange. It internally calls LayersChanged.Broadcast.
- editor_refresh_layer_browser() None ¶
Delegate handler for FEditorDelegates::RefreshLayerBrowser. It internally calls UpdateAllActorsVisibility to refresh the actors of each layer.
- get_actors_from_layer(layer_name) Array[Actor] ¶
Gets all the actors associated with the specified layer. Analog to AppendActorsFromLayer but it returns rather than appends the actors.
- get_actors_from_layers(layer_names) Array[Actor] ¶
Gets all the actors associated with ANY of the specified layers. Analog to AppendActorsFromLayers but it returns rather than appends the actors.
- initialize_new_actor_layers(actor) bool ¶
Synchronizes an newly created Actor’s layers with the layer system
- is_actor_valid_for_layer(actor) bool ¶
Checks to see if the specified actor is in an appropriate state to interact with layers
- remove_actor_from_layer(actor, layer_to_remove, update_stats=True) bool ¶
Removes an actor from the specified layer.
- Parameters:
- Returns:
true if the actor was removed from the layer. false is returned if the actor already belonged to the layer.
- Return type:
- remove_actor_from_layers(actor, layer_names, update_stats=True) bool ¶
Removes the provided actor from the named layers.
- remove_actors_from_layer(actors, layer_name, update_stats=True) bool ¶
Removes the actors from the specified layer.
- remove_actors_from_layers(actors, layer_names, update_stats=True) bool ¶
Remove the actors to the named layers
- Parameters:
- Returns:
true if at least one actor was removed from at least one layer. false is returned if none of the actors belonged to any of the specified layers.
- Return type:
- remove_level_layer_information(level) None ¶
Purges any information regarding layers associated with the level and it contents
- Parameters:
level (Level) – The process
- remove_selected_actors_from_layer(layer_name) bool ¶
Removes the selected actors from the named layer.
- remove_selected_actors_from_layers(layer_names) bool ¶
Removes selected actors from the named layers.
- rename_layer(original_layer_name, new_layer_name) bool ¶
Renames the provided originally named layer to the provided new name
- select_actors_in_layer(layer_name, select, notify, select_even_if_hidden=False) bool ¶
Selects/de-selects actors belonging to the named layer.
- Parameters:
layer_name (Name) – A valid layer name.
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:
- select_actors_in_layers(layer_names, select, notify, select_even_if_hidden=False) bool ¶
Selects/de-selects actors belonging to the named layers.
- Parameters:
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:
- set_layer_visibility(layer_name, is_visible) None ¶
Changes the named layer’s visibility to the provided state
- set_layers_visibility(layer_names, is_visible) None ¶
Changes visibility of the named layers to the provided state
- toggle_layer_visibility(layer_name) None ¶
Toggles the named layer’s visibility
- Parameters:
layer_name (Name) – The name of the layer to affect
- try_get_layer(layer_name) Layer or None ¶
Attempts to get the ULayer Object of the provided layer name.
- update_actor_all_views_visibility(actor) None ¶
Updates per-view visibility for the given actor for all views
- Parameters:
actor (Actor) – Actor to update
- 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:
- 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