NucleusModel#
- class omni.kit.widget.filebrowser.NucleusModel(name: str, root_path: str, **kwargs)#
Bases:
FileBrowserModel
A Filebrowser model class for navigating a Nucleus server in a Filebrowser view. Sub-classed from
FileBrowserModel
.- Parameters:
name (str) – Name of root item..
root_path (str) – Root path. If None, then create empty model. Example: “omniverse://ov-content”.
- Keyword Arguments:
drop_fn (Callable) – Function called to handle drag-n-drops. Function signature: void drop_fn(dst_item:
FileBrowserItem`, src_item: :obj:`FileBrowserItem
)filter_fn (Callable) – This handler should return True if the given Filebrowser view item is visible, False otherwise. Function signature: bool filter_fn(item:
FileBrowserItem
)sort_by_field (str) – Name of column by which to sort items in the same folder. Default “name”.
sort_ascending (bool) – Sort in ascending order. Default True.
Methods
__init__
(self)Constructs AbstractItemModel.
create_root_item
(name, path)Create the root item.
Attributes
- __init__(self: omni.ui._ui.AbstractItemModel) None #
Constructs AbstractItemModel.
- `kwargsdict`
See below
### Keyword Arguments:
- create_root_item(
- name: str,
- path: str,
Create the root item. Override this method to create a custom root item.
- Parameters:
name (str) – Name of the root item.
path (str) – Path of the root item.
- Returns:
The root item.
- Return type: