LayerPathModel
- class omni.kit.property.layer.layer_property_models.LayerPathModel(layer_item: <module 'weakref' from '/root/.cache/packman/python/3.10.5-1-linux-x86_64/lib/python3.10/weakref.py'>)
Bases:
SimpleStringModel
A model representing the path of a layer within a layer hierarchy.
This model is designed to interact with layer items and provide a way to edit and retrieve the path identifier for a given layer. It also includes functionality to handle the beginning and end of an edit operation, as well as utility methods to check if a layer is reserved or anonymous.
- Parameters
layer_item (
weakref
) – A weak reference to the layer item associated with this model.
Methods
__init__
(layer_item)Initializer for the LayerPathModel.
Checks if the layer is anonymous.
Begins editing process for the layer path model.
end_edit
()Ends editing process and applies changes to the layer path model.
Gets the layer identifier as a string.
Checks whether the layer is reserved or not.
replace_layer
(value)Replaces the layer with a new value and ends the editing process.
set_value
(value)Sets a new value for the layer identifier.
Attributes
- __init__(layer_item: <module 'weakref' from '/root/.cache/packman/python/3.10.5-1-linux-x86_64/lib/python3.10/weakref.py'>)
Initializer for the LayerPathModel.
- anonymous()
Checks if the layer is anonymous.
- Returns
True if the layer is anonymous, False otherwise.
- Return type
bool
- begin_edit()
Begins editing process for the layer path model.
- end_edit()
Ends editing process and applies changes to the layer path model.
- get_value_as_string()
Gets the layer identifier as a string.
- Returns
The layer identifier.
- Return type
str
- is_reserved_layer()
Checks whether the layer is reserved or not.
- Returns
True if the layer is reserved, False otherwise.
- Return type
bool
- replace_layer(value)
Replaces the layer with a new value and ends the editing process.
- Parameters
value (str) – The new value for the layer identifier.
- set_value(value)
Sets a new value for the layer identifier.
- Parameters
value (str) – The new value for the layer identifier.