MetadataObjectModel#
- class omni.kit.property.usd.MetadataObjectModel(
- stage: Stage,
- object_paths: List[Path],
- self_refresh: bool,
- metadata: dict,
- key: str,
- default,
- options: list,
Bases:
AbstractItemModel
,UsdBase
The value model that is reimplemented in Python to watch a USD paths. Paths can be either Attribute or Prim paths
Methods
__init__
(self)Constructs AbstractItemModel.
Begins the edit process.
clean
()Cleans up the instance by removing listeners and resetting state.
end_edit
()Ends the edit process.
get_item_children
(item)Retrieves the children of an item.
get_item_value_model
(item, column_id)Retrieves the value model for an item.
Checks if the value is different from the default.
set_default
([comp])Sets the default value for the model.
set_value
(value[, comp])Sets the value of the model.
Attributes
- __init__(
- self: omni.ui._ui.AbstractItemModel,
Constructs AbstractItemModel.
- `kwargsdict`
See below
### Keyword Arguments:
- begin_edit()#
Begins the edit process.
This method is not supported in MetadataObjectModel.
- clean()#
Cleans up the instance by removing listeners and resetting state.
- end_edit()#
Ends the edit process.
This method is not supported in MetadataObjectModel.
- get_item_children(item)#
Retrieves the children of an item.
This method returns the children of the given item.
- Parameters:
item – The item to get children for.
- Returns:
A list of children for the given item.
- Return type:
list
- get_item_value_model(item, column_id)#
Retrieves the value model for an item.
This method returns the value model for the given item.
- Parameters:
item – The item to get the value model for.
column_id – The column ID to get the value model for.
- Returns:
The value model for the given item.
- is_different_from_default() bool #
Checks if the value is different from the default.
This method checks if the value is different from the default.
- Returns:
True if the value is different from the default, False otherwise.
- Return type:
bool
- set_default(comp=-1)#
Sets the default value for the model.
This method sets the default value for the model and triggers an item change event.
- set_value(value, comp=-1)#
Sets the value of the model.
This method sets the value of the model and triggers an item change event.