LayerStackModel#
- class omni.kit.window.layer_stack.LayerStackModel(
- columns: LayerStackColumns,
- on_prim_selection_changed: Callable[[str], None] = None,
Bases:
AbstractItemModelModel for the layer stack tree view
Methods
__init__(self)Constructs AbstractItemModel.
clear()Clear the model
destroy()Destroy the model
get_item_children(item)Returns the children of the item.
get_item_value_model(item, column_id)Returns the value model for the given item and column.
Returns the number of columns.
toggle_mute_layer(layer)Toggle muting a layer.
Attributes
Gets the selected property.
- __init__(self: omni.ui._ui.AbstractItemModel) None#
Constructs AbstractItemModel.
- `kwargsdict`
See below
### Keyword Arguments:
- clear()#
Clear the model
- destroy()#
Destroy the model
- get_item_children(item)#
Returns the children of the item.
- Parameters:
item (object) – The item to obtain children from.
- Returns:
A list of child items.
- Return type:
list
- get_item_value_model(
- item: LayerStackItem,
- column_id: int,
Returns the value model for the given item and column.
- Parameters:
item (LayerStackItem) – The layer stack item.
column_id (int) – The identifier of the column.
- Returns:
The value model corresponding to the specified column.
- Return type:
object
- get_item_value_model_count(item)#
Returns the number of columns.
- Parameters:
item (object) – The item for which to count the columns.
- Returns:
The number of columns in the layer stack.
- Return type:
int
- toggle_mute_layer(layer)#
Toggle muting a layer.
- Parameters:
layer (object) – The layer to be toggled for mute state.
- Returns:
True if the layer mute state is successfully toggled, otherwise False.
- Return type:
bool
- property selected_property#
Gets the selected property.
- Returns:
The current selected property of the layer stack.
- Return type:
object