NucleusItem
- class omni.kit.widget.filebrowser.nucleus_model.NucleusItem(path: str, fields: FileBrowserItemFields, is_folder: bool = True, is_deleted: bool = False)
Bases:
FileBrowserItem
A Filebrowser item class for navigating a Nucleus server in a Filebrowser view. Sub-classed from
FileBrowserItem
.- Parameters
path (str) – Path of the item.
fields (
FileBrowserItemFields
) – Fields of the item.is_folder (bool) – Specify the item as a folder.
is_deleted (bool) – Specify the item as deleted.
Methods
__init__
(self)on_list_change_event
(event, entry)Handle ListEvent changes, should update this item's children list with the corresponding ListEntry.
populate_async
([callback_async, timeout])Populate current item asynchronously if not already.
Attributes
Return True if the item is readable.
Return True if the writable is readable.
- __init__(self: omni.ui._ui.AbstractItem) None
- on_list_change_event(event: ListEvent, entry: ListEntry) bool
Handle ListEvent changes, should update this item’s children list with the corresponding ListEntry.
- Parameters
event (
omni.client.ListEvent
) – One of of {UNKNOWN, CREATED, UPDATED, DELETED, METADATA, LOCKED, UNLOCKED}.entry (
omni.client.ListEntry
) – Updated entry as defined by omni.client.
- async populate_async(callback_async: Optional[Callable] = None, timeout: float = 10.0) Any
Populate current item asynchronously if not already. Overrides base method.
- Parameters
callback_async (Callable) – Function signature is void callback(result, children: [FileBrowserItem]), where result is an Exception type upon error.
timeout (float) – Time out duration on failed server connections. Default 10.0.
- Returns
Result of executing callback.
- Return type
Any
- property readable: bool
Return True if the item is readable.
- property writeable: bool
Return True if the writable is readable.