Extension: omni.kit.widget.filebrowser-2.10.51 |
Documentation Generated: Nov 07, 2024 |
Overview
This extension provides a widget to navigate through a filesystem while offering two options to display it, tree view and grid view.
Tree View
Grid View
Both views can mount multiple directories locally on the machine or remotely on servers, with remote servers being Omniverse Nucleus Servers. At the bottom of the hierarchy are file browser items which can be either folders or files.
Example
Here is a example to create the file browser widget under a window and adding a model to display items under “ov-content” server.
window = ui.Window("DemoFileBrowser", width=1000, height=500)
with window.frame:
browser = FileBrowserWidget("Demo",
allow_multi_selection=False,
show_grid_view=True,
# Only keep folders and USD files
filter_fn=lambda item: item is not None and item._is_folder or item.path.endswith(".usd")
)
# Add a model NucleusModel or FileSystemModel
model = NucleusModel("ov-content", "omniverse://ov-content")
browser.add_model_as_subtree(model)