file_path
stringlengths 5
148
| content
stringlengths 150
498k
| size
int64 150
498k
|
---|---|---|
omni.kit.widget.settings.settings_model.SettingModel.md | # SettingModel
## SettingModel
```
```markdown
class omni.kit.widget.settings.settings_model.SettingModel(setting_path: str, draggable: bool = False)
```
```markdown
Bases: AbstractValueModel
Model for simple scalar/POD carb.settings
### Methods
- **__init__(setting_path[, draggable])**
- SettingModel init function.
- **begin_edit(self)**
- Called when the user starts the editing.
- **destroy()**
- Destroy class and cleanup.
```
# omni.kit.widget.settings.settings_model.SettingModel Methods
## end_edit (self)
Called when the user finishes the editing.
## get_value ()
Get current value
## get_value_as_bool ()
Get current value as bool
## get_value_as_float ()
Get current value as float
## get_value_as_int ()
Get current value as integer
## get_value_as_string ()
Get current value as string
## set_range (min_val, max_val)
set the allowable range for the setting.
## set_reset_button (button)
Set reset button from ui.Rectangle.
## set_value (*args, **kwargs)
Overloaded function.
# Attributes
## __init__ (setting_path: str, draggable: bool = False)
SettingModel init function.
### Parameters
- **setting_path** – setting_path carb setting to create a model for
- **draggable** – is it a numeric value you will drag in the UI?
## begin_edit (self)
### SettingModel.begin_edit
Called when the user starts the editing. If it’s a field, this method is called when the user activates the field and places the cursor inside. This method should be reimplemented.
### SettingModel.destroy
Destroy class and cleanup.
### SettingModel.end_edit
Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo. This method should be reimplemented.
### SettingModel.get_value
Get current value
### SettingModel.get_value_as_bool
Get current value as bool
### SettingModel.get_value_as_float
Get current value as float
### SettingModel.get_value_as_int
Get current value as integer
### SettingModel.get_value_as_string
Get current value as string
### SettingModel.set_range
set the allowable range for the setting. This is more restrictive than the UI min/max setting which still lets you set out of range values using the keyboard (e.g click and type in slider)
## set_reset_button
Set reset button from ui.Rectangle.
## set_value
Overloaded function.
1. set_value(self: omni.ui._ui.AbstractValueModel, value: bool) -> None
Set the value.
2. set_value(self: omni.ui._ui.AbstractValueModel, value: int) -> None
Set the value.
3. set_value(self: omni.ui._ui.AbstractValueModel, value: float) -> None
Set the value.
4. set_value(self: omni.ui._ui.AbstractValueModel, value: str) -> None
Set the value. | 2,754 |
omni.kit.widget.settings.settings_model.SettingsComboItemModel.md | # SettingsComboItemModel
## SettingsComboItemModel
```
```python
class omni.kit.widget.settings.settings_model.SettingsComboItemModel(setting_path, key_value_pairs: Dict[str, Any], setting_is_index: bool = True)
```
- Bases: `AbstractItemModel`
- Model for a combo box - for each setting we have a dictionary of key, values
### Methods
- `__init__(self)`
- Constructs AbstractItemModel.
- `destroy()`
- (Description not provided in the HTML snippet)
Destroy class and cleanup.
`get_item_children` ([item])
this is called by the widget when it needs the submodel items
`get_item_index` (value)
Get the item index to the given value.
`get_item_value_model` (self[, item, column_id])
Get the value model associated with this item.
`get_value` ()
Get current selected item value or index value if setting_is_index is True.
`get_value_as_int` ()
Get current selected item index :returns: (int) Current selected item index
`get_value_as_string` ()
Get current selected item label string.
`set_items` (key_value_pairs)
Set items and refresh UI.
`set_reset_button` (button)
Set reset button from ui.Rectangle.
`set_value` (value)
Set current selected to the given value
`setting_is_index`
Attributes
`__init__` (self: omni.ui._ui.AbstractItemModel) -> None
Constructs AbstractItemModel.
### Keyword Arguments:
- `kwargs` dict: See below
`class` ComboboxIndexModel
ComboboxIndexModel(combobox_model, *args, **kwargs)
Bases:
```python
SimpleIntModel
```
A custom ui.SimpleIntModel that can handle value <-> index conversion when setting values.
set_value(value, as_index=True)
Set the given index value to the model.
If the given value is not int type, it will try to find the index from the given value.
If the given value is int but as_index is False, it will still try to find the index
from the given value.
destroy()
Destroy class and cleanup.
get_item_children(item: Optional[AbstractItem] = None)
this is called by the widget when it needs the submodel items
get_item_index(value: Any) -> Optional[int]
Get the item index to the given value.
Arg:
- value (int|str|float): The value to set.
Returns
- (int|None) Item index. None if no item found.
get_item_value_model(self: omni.ui._ui.AbstractItemModel, item)
### omni.kit.widget.settings.settings_model.SettingsComboItemModel.get_item_value_model
```
```python
def get_item_value_model(item: omni.ui._ui.AbstractItem = None, column_id: int = 0) -> omni.ui._ui.AbstractValueModel:
pass
```
```markdown
Get the value model associated with this item.
### Arguments:
```
```markdown
- `item :` The item to request the value model from. If it’s null, the root value model will be returned.
- `index :` The column number to get the value model.
```
### omni.kit.widget.settings.settings_model.SettingsComboItemModel.get_value
```python
def get_value() -> Any:
pass
```
```markdown
Get current selected item value or index value if setting_is_index is True.
Returns: (int|str|float) Current selected item value or index value depends on the self._setting_is_index attribute.
```
### omni.kit.widget.settings.settings_model.SettingsComboItemModel.get_value_as_int
```python
def get_value_as_int() -> int:
pass
```
```markdown
Get current selected item index
:returns: (int) Current selected item index
```
### omni.kit.widget.settings.settings_model.SettingsComboItemModel.get_value_as_string
```python
def get_value_as_string() -> str:
pass
```
```markdown
Get current selected item label string.
Returns: (str) Current selected item label string.
```
### omni.kit.widget.settings.settings_model.SettingsComboItemModel.set_items
```python
def set_items(key_value_pairs: Dict[str, Any]) -> None:
pass
```
```markdown
Set items and refresh UI.
```
### omni.kit.widget.settings.settings_model.SettingsComboItemModel.set_reset_button
```python
def set_reset_button(button: Any) -> None:
pass
```
```markdown
Set reset button and refresh UI.
```
```markdown
### set_reset_button(Rectangle)
Set reset button from ui.Rectangle.
### set_value(value: Any) -> Optional[int]
Set current selected to the given value
**Arg:**
- value (int|str|float): The value to set.
**Returns:**
- (int|None) Item index set. None if no item found. | 4,248 |
omni.kit.widget.settings.settings_model.SettingsComboNameValueItem.md | # SettingsComboNameValueItem
## SettingsComboNameValueItem
```
```text
class omni.kit.widget.settings.settings_model.SettingsComboNameValueItem(label: str, value: str)
```
```text
Bases: AbstractItem
SettingsComboNameValueItem for combo boxes
```
### Methods
| Method | Description |
|--------|-------------|
| `__init__(label: str, value: str)` | SettingsComboNameValueItem init function. |
```text
__init__(label: str, value: str)
```
## SettingsComboNameValueItem init function. | 488 |
omni.kit.widget.settings.settings_model.SettingsComboValueModel.md | # SettingsComboValueModel
## SettingsComboValueModel
```python
class omni.kit.widget.settings.settings_model.SettingsComboValueModel(label: str, value: Any)
```
Bases: `AbstractValueModel`
Model to store a pair (label, value of arbitrary type) for use in a ComboBox
### Methods
```python
__init__(label, value)
```
SettingsComboValueModel init function.
```python
get_setting_value()
```
we call this to get the value of the combo box item
```python
get_value_as_string()
```
this is called to get the label of the combo box item
### Attributes
```
<colgroup>
<col style="width: 10%"/>
<col style="width: 90%"/>
<tbody>
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_model.SettingsComboValueModel.__init__">
<span class="sig-name descname">
<span class="pre">
__init__
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
label
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
,
<em class="sig-param">
<span class="n">
<span class="pre">
value
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
Any
<span class="sig-paren">
)
<dd>
<p>
SettingsComboValueModel init function.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
label
– what appears in the UI widget
<li>
<p>
<strong>
value
– the value corresponding to that label
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_model.SettingsComboValueModel.get_setting_value">
<span class="sig-name descname">
<span class="pre">
get_setting_value
<span class="sig-paren">
(
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
Union
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
int
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
float
<span class="p">
<span class="pre">
]
<dd>
<p>
we call this to get the value of the combo box item
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_model.SettingsComboValueModel.get_value_as_string">
<span class="sig-name descname">
<span class="pre">
get_value_as_string
<span class="sig-paren">
(
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
str
<dd>
<p>
this is called to get the label of the combo box item
<footer>
<hr/>
| 3,324 |
omni.kit.widget.settings.settings_model.update_reset_button.md | # update_reset_button
## update_reset_button
```python
omni.kit.widget.settings.settings_model.update_reset_button(settingModel)
```
work out whether to show the reset button highlighted or not depending on whether the setting is set to it’s default value
``` | 261 |
omni.kit.widget.settings.settings_model.VectorFloatComponentModel.md | # VectorFloatComponentModel
## VectorFloatComponentModel
```python
class omni.kit.widget.settings.settings_model.VectorFloatComponentModel(parent, vec_index, immediate_mode)
```
**Bases:** `SimpleFloatModel`
**Methods:**
- **`__init__(parent, vec_index, immediate_mode)`**
- VectorFloatComponentModel init function.
- **`get_value_as_float(self)`**
- Return the float representation of the value.
- **`set_range([min_val, max_val])`**
- Set the allowable range for the setting.
- **`set_value(*args, **kwargs)`**
- (Description not provided in the HTML)
# Attributes
## __init__
```python
__init__(parent, vec_index, immediate_mode)
```
VectorFloatComponentModel init function.
## get_value_as_float
```python
get_value_as_float(self: omni.ui._ui.AbstractValueModel) -> float
```
Return the float representation of the value.
## set_range
```python
set_range(min_val=None, max_val=None)
```
set the allowable range for the setting. This is more restrictive than the UI min/max setting which still lets you set out of range values using the keyboard (e.g click and type in slider)
## set_value
```python
set_value(*args, **kwargs)
```
Overloaded function.
1. set_value(self: omni.ui._ui.AbstractValueModel, value: bool) -> None
2. set_value(self: omni.ui._ui.AbstractValueModel, value: int) -> None
3. set_value(self: omni.ui._ui.AbstractValueModel, value: float) -> None
4. set_value(self: omni.ui._ui.AbstractValueModel, value: str) -> None
Set the value. | 1,475 |
omni.kit.widget.settings.settings_model.VectorFloatSettingsModel.md | # VectorFloatSettingsModel
## VectorFloatSettingsModel
```python
class omni.kit.widget.settings.settings_model.VectorFloatSettingsModel(setting_path: str, component_count: int, immediate_mode: bool = True)
```
Bases: `VectorSettingsModel`
### Methods
- `__init__(setting_path, component_count[, ...])`
- VectorSettingsModel init function.
- `end_edit(self, item)`
- (Description not provided in HTML)
| Called when the user finishes the editing.
| Return current float values tuple.
__init__(setting_path: str, component_count: int, immediate_mode: bool = True)
- VectorSettingsModel init function.
- Parameters:
- setting_path – setting_path carb setting to create a model for
- component_count – how many elements does the setting have?
- immediate_mode – do we update the underlying setting immediately, or wait for endEdit
end_edit(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem) -> None
- Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo.
get_value() -> tuple
- Return current float values tuple. | 1,173 |
omni.kit.widget.settings.settings_model.VectorIntComponentModel.md | # VectorIntComponentModel
## Class Definition
```python
class omni.kit.widget.settings.settings_model.VectorIntComponentModel(parent, vec_index, immediate_mode)
```
Bases: `SimpleIntModel`
### Methods
| Method | Description |
|--------|-------------|
| `__init__(parent, vec_index, immediate_mode)` | VectorIntComponentModel init function. |
| `get_value_as_int(self)` | Return the int representation of the value. |
| `set_value(*args, **kwargs)` | Overloaded function. |
### Attributes
| Attribute | Description |
|-----------|-------------|
VectorIntComponentModel init function.
### get_value_as_int
```python
get_value_as_int(self: omni.ui._ui.AbstractValueModel) -> int
```
Return the int representation of the value.
### set_value
```python
set_value(*args, **kwargs)
```
Overloaded function.
1. ```python
set_value(self: omni.ui._ui.AbstractValueModel, value: bool) -> None
```
Set the value.
2. ```python
set_value(self: omni.ui._ui.AbstractValueModel, value: int) -> None
```
Set the value.
3. ```python
set_value(self: omni.ui._ui.AbstractValueModel, value: float) -> None
```
Set the value.
4. ```python
set_value(self: omni.ui._ui.AbstractValueModel, value: str) -> None
```
Set the value.
``` | 1,249 |
omni.kit.widget.settings.settings_model.VectorIntSettingsModel.md | # VectorIntSettingsModel
## VectorIntSettingsModel
```python
class omni.kit.widget.settings.settings_model.VectorIntSettingsModel(setting_path: str, component_count: int, immediate_mode: bool = True)
```
Bases: `VectorSettingsModel`
### Methods
| Method | Description |
|--------|-------------|
| `__init__(setting_path, component_count[, ...])` | VectorSettingsModel init function. |
| `end_edit(self, item)` | Called when the user finishes the editing. |
```
<table>
<tbody>
<tr class="row-odd">
<td>
<p>
<code>get_value
()
<td>
<p>Return current int values tuple.
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_model.VectorIntSettingsModel.__init__">
<span class="sig-name descname">
<span class="pre">__init__
<span class="sig-paren">(
<em class="sig-param">
<span class="n">setting_path
<span class="p">:
<span class="n">str
,
<em class="sig-param">
<span class="n">component_count
<span class="p">:
<span class="n">int
,
<em class="sig-param">
<span class="n">immediate_mode
<span class="p">:
<span class="n">bool
<span class="o">=
<span class="default_value">True
<span class="sig-paren">)
<dd>
<p>VectorSettingsModel init function.
<dl class="field-list simple">
<dt class="field-odd">Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p><strong>setting_path
<li>
<p><strong>component_count
<li>
<p><strong>immediate_mode
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_model.VectorIntSettingsModel.end_edit">
<span class="sig-name descname">
<span class="pre">end_edit
<span class="sig-paren">(
<em class="sig-param">
<span class="n">self
<span class="p">:
<span class="n">omni.ui._ui.AbstractItemModel
,
<em class="sig-param">
<span class="n">item
<span class="p">:
<span class="n">omni.ui._ui.AbstractItem
<span class="sig-paren">)
<span class="sig-return">
<span class="sig-return-icon">→
<span class="sig-return-typehint">
<span class="pre">None
<dd>
<p>Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo.
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_model.VectorIntSettingsModel.get_value">
<span class="sig-name descname">
<span class="pre">get_value
<span class="sig-paren">()
<span class="sig-return">
<span class="sig-return-icon">→
<span class="sig-return-typehint">
<span class="pre">tuple
<dd>
<p>Return current int values tuple.
| 3,090 |
omni.kit.widget.settings.settings_model.VectorSettingsModel.md | # VectorSettingsModel
## VectorSettingsModel
```python
class omni.kit.widget.settings.settings_model.VectorSettingsModel(setting_path: str, component_count: int, item_class: AbstractItemModel, immediate_mode: bool)
```
Bases: `AbstractItemModel`
Model For Color, Vec3 and other multi-component settings. Assumption is the items are draggable, so we only store a command when the dragging has completed.
TODO: Needs testing with component_count = 2,4
### Methods
| Method | Description |
|--------|-------------|
| `__init__(setting_path, component_count, ...)` | VectorSettingsModel init function. |
| `begin_edit()` | |
| Method Name | Description |
|-------------|-------------|
| destroy() | Destroy class and cleanup. |
| end_edit(self, item) | Called when the user finishes the editing. |
| get_item_children([item]) | This is called by the widget when it needs the submodel items. |
| get_item_value_model([sub_model_item, column_id]) | This is called by the widget when it needs the submodel item models. |
| set_reset_button(button) | Set reset button from ui.Rectangle. |
| set_value(values) | Set list of values to the model. |
### __init__(setting_path: str, component_count: int, item_class: AbstractItemModel, immediate_mode: bool)
VectorSettingsModel init function.
**Parameters:**
- **setting_path** – setting_path carb setting to create a model for
- **component_count** – how many elements does the setting have?
- **immediate_mode** – do we update the underlying setting immediately, or wait for endEdit
### begin_edit(item: AbstractItem)
Stub: need implementation to prevent crashes.
### destroy
Destroy class and cleanup.
### end_edit
Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo.
### get_item_children
this is called by the widget when it needs the submodel items
### get_item_value_model
This is called by the widget when it needs the submodel item models. (to then get or set them)
### set_reset_button
Set reset button from ui.Rectangle.
### set_value
### set_value(
Union[
tuple,
list
]
)
Set list of values to the model. | 2,207 |
omni.kit.widget.settings.settings_widget.Classes.md | # omni.kit.widget.settings.settings_widget Classes
## Classes Summary
| Class | Description |
|-------|-------------|
| [SettingType](#settingtype) | Supported setting types for create_setting_widget. |
| [SettingWidgetType](#settingwidgettype) | Supported setting UI widget types |
| [SettingsSearchableCombo](#settingssearchablecombo) | Searchable combo box, needs omni.kit.widget.searchable_combobox extensions |
### SettingType
Supported setting types for create_setting_widget.
### SettingWidgetType
Supported setting UI widget types
### SettingsSearchableCombo
Searchable combo box, needs omni.kit.widget.searchable_combobox extensions | 646 |
omni.kit.widget.settings.settings_widget.create_setting_widget.md | # create_setting_widget
## create_setting_widget
```
```python
omni.kit.widget.settings.settings_widget.create_setting_widget(setting_path: str, setting_type: SettingType, range_from=0, range_to=0, speed=1, **kwargs) -> Tuple[Widget, AbstractValueModel]
Create a UI widget connected with a setting.
If `range_from` >= `range_to` there is no limit. Undo/redo operations are also supported, because changing setting
goes through the `omni.kit.commands`
```code
module,
using
:class:`.ChangeSettingCommand
```
### Parameters
- **setting_path** – Path to the setting to show and edit.
- **setting_type** – Type of the setting to expect.
- **range_from** – Limit setting value lower bound.
- **range_to** – Limit setting value upper bound.
- **speed** – Range speed
### Returns
A `ui.Widget` and `ui.AbstractValueModel` connected with the setting on the path specified. | 868 |
omni.kit.widget.settings.settings_widget.create_setting_widget_combo.md | # create_setting_widget_combo
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
####### create_setting_widget_combo
```
```markdown
###### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
# create_setting_widget_combo
```
```markdown
## create_setting_widget_combo
```
```markdown
### create_setting_widget_combo
```
```markdown
#### create_setting_widget_combo
```
```markdown
##### create_setting_widget_combo
specified. Underlying setting values are used from values of `items` dict.
### Parameters
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:`list`. For `:py:obj:`dict`, keys are UI displayed names, values are actual values set into settings. If it is a `list`, UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list | 13,991 |
omni.kit.widget.settings.settings_widget.Functions.md | # omni.kit.widget.settings.settings_widget Functions
## Functions Summary
- **create_setting_widget**
- Create a UI widget connected with a setting.
- **create_setting_widget_combo**
- Create a Combo Setting widget. | 221 |
omni.kit.widget.settings.settings_widget.md | # omni.kit.widget.settings.settings_widget
## Classes Summary
- **SettingType**
- Supported setting types for create_setting_widget.
- **SettingWidgetType**
- Supported setting UI widget types.
- **SettingsSearchableCombo**
- Searchable combo box, needs omni.kit.widget.searchable_combobox extensions.
## Functions Summary
- **create_setting_widget**
- Create a UI widget connected with a setting.
- **create_setting_widget_combo**
- Create a Combo Setting widget. | 478 |
omni.kit.widget.settings.settings_widget.SettingsSearchableCombo.md | # SettingsSearchableCombo
## Class: omni.kit.widget.settings.settings_widget.SettingsSearchableCombo
**Bases:** `object`
Searchable combo box, needs omni.kit.widget.searchable_combobox extensions
### Methods
- **`__init__(setting_path: str, key_value_pairs: dict, default_key: str)`**
- **`destroy()`**
- Destroy class and cleanup.
- **`get_current_key()`**
| Method Name | Description |
|-------------|-------------|
| get_key_from_value(value) | Gets key from value. |
| get_current_key() | Gets current key selected in combo box. |
| destroy() | Destroy class and cleanup. |
| __init__(setting_path: str, key_value_pairs: dict, default_key: str) | Initialize the class with setting path, key-value pairs, and default key. | | 733 |
omni.kit.widget.settings.settings_widget.SettingType.md | # SettingType
## SettingType
```python
class omni.kit.widget.settings.settings_widget.SettingType(value)
```
Bases: `Enum`
Supported setting types for create_setting_widget.
### Attributes
| Attribute | Description |
|-----------|-------------|
| `FLOAT` | Setting is a floating-point number. |
| `INT` | Setting is a integer number. |
| `COLOR3` | Setting is a three color floating-point numbers (0.0-1.0). |
| `BOOL` | Setting is a boolean. |
| `STRING` | Setting is a string. |
```
| Setting Type | Description |
|--------------|-------------|
| `DOUBLE3` | Setting is a three double-precision floating-point numbers. |
| `INT2` | Setting is a two integer numbers. |
| `DOUBLE2` | Setting is a two double-precision floating-point numbers. |
| `ASSET` | Setting is a asset path. |
### omni.kit.widget.settings.settings_widget.SettingType.__init__
```python
__init__()
```
### omni.kit.widget.settings.settings_widget.SettingType.ASSET
```python
ASSET = 8
```
Setting is a asset path.
### omni.kit.widget.settings.settings_widget.SettingType.BOOL
```python
BOOL = 3
```
Setting is a boolean.
### omni.kit.widget.settings.settings_widget.SettingType.COLOR3
```python
COLOR3 = 2
```
Setting is a three color floating-point numbers (0.0-1.0).
### omni.kit.widget.settings.settings_widget.SettingType.DOUBLE2
```python
DOUBLE2 = 7
```
Setting is a two double-precision floating-point numbers.
### omni.kit.widget.settings.settings_widget.SettingType.DOUBLE3
```python
DOUBLE3 = 5
```
Setting is a three double-precision floating-point numbers.
### omni.kit.widget.settings.settings_widget.SettingType.FLOAT
```python
FLOAT = 0
```
Setting is a floating-point number.
### omni.kit.widget.settings.settings_widget.SettingType.INT
```python
INT = 1
```
Setting is a integer number.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingType.INT">
<span class="sig-name descname">
<span class="pre">
INT
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
5
<dd>
<p>
Setting is a integer number.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingType.INT2">
<span class="sig-name descname">
<span class="pre">
INT2
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
6
<dd>
<p>
Setting is a two integer numbers.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingType.STRING">
<span class="sig-name descname">
<span class="pre">
STRING
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
4
<dd>
<p>
Setting is a string.
| 3,262 |
omni.kit.widget.settings.settings_widget.SettingWidgetType.md | # SettingWidgetType
## SettingWidgetType
```
```markdown
class omni.kit.widget.settings.settings_widget.SettingWidgetType(value)
```
```markdown
Bases: Enum
```
```markdown
Supported setting UI widget types
```
```markdown
Attributes
```
```markdown
FLOAT
```
```markdown
Setting is a floating-point number.
```
```markdown
INT
```
```markdown
Setting is a integer number.
```
```markdown
COLOR3
```
```markdown
Setting is a three color floating-point numbers (0.0-1.0).
```
```markdown
BOOL
```
```markdown
Setting is a boolean.
```
```markdown
STRING
```
```markdown
Setting is a string.
| Setting Type | Description |
| --- | --- |
| `DOUBLE3` | Setting is a three double-precision floating-point numbers. |
| `INT2` | Setting is a two integer numbers. |
| `DOUBLE2` | Setting is a two double-precision floating-point numbers. |
| `ASSET` | Setting is a asset path. |
| `COMBOBOX` | Setting is Combo box. |
| `RADIOBUTTON` | Setting is Radio buttons. |
| `VECTOR3` | Setting is Vector3. |
### SettingWidgetType.__init__()
### SettingWidgetType.ASSET = 8
Setting is a asset path.
### SettingWidgetType.BOOL = 3
Setting is a boolean.
### SettingWidgetType.COLOR3 = 2
Setting is a three color floating-point numbers (0.0-1.0).
### SettingWidgetType.COMBOBOX = 9
Setting is Combo box.
### SettingWidgetType.DOUBLE2 = 7
Setting is a two double-precision floating-point numbers.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingWidgetType.DOUBLE2">
<span class="sig-name descname">
<span class="pre">DOUBLE2
<em class="property">
<span class="w">
<span class="p">
<span class="pre">=
<span class="w">
<span class="pre">7
<a class="headerlink" href="#omni.kit.widget.settings.settings_widget.SettingWidgetType.DOUBLE2" title="Permalink to this definition">
<dd>
<p>Setting is a two double-precision floating-point numbers.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingWidgetType.DOUBLE3">
<span class="sig-name descname">
<span class="pre">DOUBLE3
<em class="property">
<span class="w">
<span class="p">
<span class="pre">=
<span class="w">
<span class="pre">5
<a class="headerlink" href="#omni.kit.widget.settings.settings_widget.SettingWidgetType.DOUBLE3" title="Permalink to this definition">
<dd>
<p>Setting is a three double-precision floating-point numbers.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingWidgetType.FLOAT">
<span class="sig-name descname">
<span class="pre">FLOAT
<em class="property">
<span class="w">
<span class="p">
<span class="pre">=
<span class="w">
<span class="pre">0
<a class="headerlink" href="#omni.kit.widget.settings.settings_widget.SettingWidgetType.FLOAT" title="Permalink to this definition">
<dd>
<p>Setting is a floating-point number.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingWidgetType.INT">
<span class="sig-name descname">
<span class="pre">INT
<em class="property">
<span class="w">
<span class="p">
<span class="pre">=
<span class="w">
<span class="pre">1
<a class="headerlink" href="#omni.kit.widget.settings.settings_widget.SettingWidgetType.INT" title="Permalink to this definition">
<dd>
<p>Setting is a integer number.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingWidgetType.INT2">
<span class="sig-name descname">
<span class="pre">INT2
<em class="property">
<span class="w">
<span class="p">
<span class="pre">=
<span class="w">
<span class="pre">6
<a class="headerlink" href="#omni.kit.widget.settings.settings_widget.SettingWidgetType.INT2" title="Permalink to this definition">
<dd>
<p>Setting is a two integer numbers.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingWidgetType.RADIOBUTTON">
<span class="sig-name descname">
<span class="pre">RADIOBUTTON
<em class="property">
<span class="w">
<span class="p">
<span class="pre">=
<span class="w">
<span class="pre">10
<a class="headerlink" href="#omni.kit.widget.settings.settings_widget.SettingWidgetType.RADIOBUTTON" title="Permalink to this definition">
<dd>
<p>Setting is Radio buttons.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingWidgetType.STRING">
<span class="sig-name descname">
<span class="pre">STRING
<em class="property">
<span class="w">
<span class="p">
<span class="pre">=
<span class="w">
<span class="pre">4
<a class="headerlink" href="#omni.kit.widget.settings.settings_widget.SettingWidgetType.STRING" title="Permalink to this definition">
<dd>
<p>Setting is a string.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.settings_widget.SettingWidgetType.VECTOR3">
<span class="sig-name descname">
<span class="pre">VECTOR3
<em class="property">
<span class="w">
<span class="p">
<span class="pre">=
<span class="w">
<span class="pre">11
<a class="headerlink" href="#omni.kit.widget.settings.settings_widget.SettingWidgetType.VECTOR3" title="Permalink to this definition">
<dd>
<p>Setting is Vector3.
| 5,880 |
omni.kit.widget.settings.settings_widget_builder.AssetPicker.md | # AssetPicker
## AssetPicker Class
```python
class omni.kit.widget.settings.settings_widget_builder.AssetPicker(model)
```
**Bases:** `object`
AssetPicker class.
### Methods
| Method | Description |
|--------|-------------|
| `__init__(model)` | AssetPicker init function. |
| `build_ui([additional_widget_kwargs])` | Build UI for asset picker. |
| `get_icon_path()` | Get icon path for extension |
| `on_show_dialog(model, item_filter_options)` | Browse button clicked function. |
### AssetPicker Methods
#### `__init__(model)`
AssetPicker init function.
#### `build_ui(additional_widget_kwargs=None)`
Build UI for asset picker.
#### `get_icon_path()`
Get icon path for extension
#### `on_show_dialog(model, item_filter_options)`
Browse button clicked function. | 771 |
omni.kit.widget.settings.settings_widget_builder.Classes.md | # omni.kit.widget.settings.settings_widget_builder Classes
## Classes Summary
- **AssetPicker**
- [AssetPicker class.](omni.kit.widget.settings.settings_widget_builder/omni.kit.widget.settings.settings_widget_builder.AssetPicker.html)
- **SettingsWidgetBuilder**
- [Widget builder functions.](omni.kit.widget.settings.settings_widget_builder/omni.kit.widget.settings.settings_widget_builder.SettingsWidgetBuilder.html) | 424 |
omni.kit.widget.settings.settings_widget_builder.md | # omni.kit.widget.settings.settings_widget_builder
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| [AssetPicker](omni.kit.widget.settings.settings_widget_builder/omni.kit.widget.settings.settings_widget_builder.AssetPicker.html) | AssetPicker class. |
| [SettingsWidgetBuilder](omni.kit.widget.settings.settings_widget_builder/omni.kit.widget.settings.settings_widget_builder.SettingsWidgetBuilder.html) | Widget builder functions. | | 467 |
omni.kit.widget.settings.settings_widget_builder.SettingsWidgetBuilder.md | # SettingsWidgetBuilder
## SettingsWidgetBuilder
```python
class omni.kit.widget.settings.settings_widget_builder.SettingsWidgetBuilder
```
Widget builder functions.
### Methods
| Method | Description |
|--------|-------------|
| `createAssetWidget(model[, ...])` | Create widget for file asset with filepicker. |
| `createBoolWidget(model[, ...])` | Create a boolean widget. |
| `createColorWidget(model[, comp_count, ...])` | Create a three color floating-point widget. |
| `createComboboxWidget(setting_path[, items, ...])` | Create a Combo Setting widget. |
```
| Method Name | Description |
|-------------|-------------|
| `createDoubleArrayWidget(model, range_min, ...)` | Create a widget for multiple double-precision floating-point numbers. |
| `createFloatWidget(model, range_min, range_max)` | Create a floating point widget. |
| `createIntArrayWidget(model, range_min, range_max)` | Create a widget for multiple integer numbers. |
| `createIntWidget(model, range_min, range_max)` | Create a integer widget. |
| `createRadiobuttonWidget(model[, ...])` | Create a RadioButtons Setting widget. |
| `createVecWidget(model, range_min, range_max)` | Create a widget for multiple XYZW float values. |
| `get_checkbox_alignment()` | Get checkbox alignment from setting "/ext/omni.kit.window.property/checkboxAlignment" and return True/False |
| `get_label_alignment()` | Get label alignment from setting "/ext/omni.kit.window.property/labelAlignment" and return True/False |
### `__init__()`
### `createAssetWidget(model, additional_widget_kwargs=None)`
Create widget for file asset with filepicker.
### `createBoolWidget(model, additional_widget_kwargs=None)`
Create a boolean widget.
### createColorWidget
```python
classmethod
createColorWidget(model, comp_count=3, additional_widget_kwargs=None) -> HStack
```
Create a three color floating-point widget.
### createComboboxWidget
```python
classmethod
createComboboxWidget(setting_path: str, items: Optional[Union[list, dict]] = None, setting_is_index: Optional[bool] = None, additional_widget_kwargs: Optional[dict] = None) -> Tuple[SettingsComboItemModel, ComboBox]
```
Create a Combo Setting widget.
This function creates a combo box that shows a provided list of names and it is connected with setting by path specified. Underlying setting values are used from values of `items` dict.
```
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
```markdown
- **setting_path** – Path to the setting to show and edit.
- **items** – Can be either `dict` or `:py:obj:list`. For `:py:obj:dict` keys are UI displayed names, values are actual values set into settings. If it is a `list` UI displayed names are equal to setting values.
- **setting_is_index** – None - Detect type from setting_path value. If the type is int, set to True. True - setting_path value is index into items list (default) False - setting_path value is string in items list
```
### SettingsWidgetBuilder.createIntWidget
```python
classmethod createIntWidget(model: IntSettingModel, setting_path: str = '', range_min: int, range_max: int, additional_widget_kwargs: Optional[dict] = None) -> IntWidget
```
Create a integer widget.
### SettingsWidgetBuilder.createRadiobuttonWidget
```python
classmethod createRadiobuttonWidget(model: RadioButtonSettingModel, setting_path: str = '', additional_widget_kwargs: Optional[dict] = None) -> RadioCollection
```
Create a RadioButtons Setting widget.
This function creates a Radio Buttons that shows a list of names that are connected with setting by path specified - “{setting_path}/items”.
**Parameters**
- **model** – A RadioButtonSettingModel instance.
- **setting_path** – Path to the setting to show and edit.
**Returns**
- A omni.ui.RadioCollection instance.
**Return type**
- (omni.ui.RadioCollection)
### SettingsWidgetBuilder.createVecWidget
```python
classmethod createVecWidget(model, range_min: int, range_max: int, comp_count: int = 3, additional_widget_kwargs: Optional[dict] = None)
```
Create a widget for multiple XYZW float values.
## get_checkbox_alignment
Get checkbox alignment from setting “/ext/omni.kit.window.property/checkboxAlignment” and return True/False
## get_label_alignment
Get label alignment from setting “/ext/omni.kit.window.property/labelAlignment” and return True/False | 18,283 |
omni.kit.widget.settings.SettingType.md | # SettingType
## SettingType
### omni.kit.widget.settings.SettingType
#### class SettingType(value)
Bases: Enum
Supported setting types for create_setting_widget.
### Attributes
| Attribute | Description |
|-----------|-------------|
| FLOAT | Setting is a floating-point number. |
| INT | Setting is a integer number. |
| COLOR3 | Setting is a three color floating-point numbers (0.0-1.0). |
| BOOL | Setting is a boolean. |
| STRING | Setting is a string. |
| DOUBLE3 | Setting is a three double-precision floating-point numbers. |
<p>
INT2
<p>
Setting is a two integer numbers.
<p>
DOUBLE2
<p>
Setting is a two double-precision floating-point numbers.
<p>
ASSET
<p>
Setting is a asset path.
<p>
__init__()
<p>
ASSET = 8
<p>
Setting is a asset path.
<p>
BOOL = 3
<p>
Setting is a boolean.
<p>
COLOR3 = 2
<p>
Setting is a three color floating-point numbers (0.0-1.0).
<p>
DOUBLE2 = 7
<p>
Setting is a two double-precision floating-point numbers.
<p>
DOUBLE3 = 5
<p>
Setting is a three double-precision floating-point numbers.
<p>
FLOAT = 0
<p>
Setting is a floating-point number.
<p>
INT = 1
<p>
Setting is a integer number.
<p>
INT2 = 6
<p>
Setting is a two integer numbers.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.SettingType.INTEGER">
<span class="sig-name descname">
<span class="pre">
INTEGER
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
3
<a class="headerlink" href="#omni.kit.widget.settings.SettingType.INTEGER" title="Permalink to this definition">
<dd>
<p>
Setting is a two integer numbers.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.SettingType.STRING">
<span class="sig-name descname">
<span class="pre">
STRING
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
4
<a class="headerlink" href="#omni.kit.widget.settings.SettingType.STRING" title="Permalink to this definition">
<dd>
<p>
Setting is a string.
| 2,422 |
omni.kit.widget.settings.SettingWidgetType.md | # SettingWidgetType
## SettingWidgetType
- **Bases:** `Enum`
- **Description:** Supported setting UI widget types
### Attributes
| Attribute | Description |
|-----------|-------------|
| `FLOAT` | Setting is a floating-point number. |
| `INT` | Setting is a integer number. |
| `COLOR3` | Setting is a three color floating-point numbers (0.0-1.0). |
| `BOOL` | Setting is a boolean. |
| `STRING` | Setting is a string. |
| `DOUBLE3` | Setting is a double precision vector of three numbers. |
| Setting Type | Description |
|--------------|-------------|
| `INT2` | Setting is a two integer numbers. |
| `DOUBLE2` | Setting is a two double-precision floating-point numbers. |
| `ASSET` | Setting is a asset path. |
| `COMBOBOX` | Setting is Combo box. |
| `RADIOBUTTON`| Setting is Radio buttons. |
| `VECTOR3` | Setting is Vector3. |
### SettingWidgetType Methods
#### `__init__()`
### SettingWidgetType Attributes
#### `ASSET`
Setting is a asset path.
#### `BOOL`
Setting is a boolean.
#### `COLOR3`
Setting is a three color floating-point numbers (0.0-1.0).
#### `COMBOBOX`
Setting is Combo box.
#### `DOUBLE2`
Setting is a two double-precision floating-point numbers.
#### `DOUBLE3`
Setting is a three double-precision floating-point numbers.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.SettingWidgetType.DOUBLE3">
<span class="sig-name descname">
<span class="pre">
DOUBLE3
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
5
<dd>
<p>
Setting is a three double-precision floating-point numbers.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.SettingWidgetType.FLOAT">
<span class="sig-name descname">
<span class="pre">
FLOAT
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
0
<dd>
<p>
Setting is a floating-point number.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.SettingWidgetType.INT">
<span class="sig-name descname">
<span class="pre">
INT
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
1
<dd>
<p>
Setting is a integer number.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.SettingWidgetType.INT2">
<span class="sig-name descname">
<span class="pre">
INT2
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
6
<dd>
<p>
Setting is a two integer numbers.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.SettingWidgetType.RADIOBUTTON">
<span class="sig-name descname">
<span class="pre">
RADIOBUTTON
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
10
<dd>
<p>
Setting is Radio buttons.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.SettingWidgetType.STRING">
<span class="sig-name descname">
<span class="pre">
STRING
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
4
<dd>
<p>
Setting is a string.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.widget.settings.SettingWidgetType.VECTOR3">
<span class="sig-name descname">
<span class="pre">
VECTOR3
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
11
<dd>
<p>
Setting is Vector3.
| 4,634 |
omni.kit.widget.settings.style.Functions.md | # omni.kit.widget.settings.style Functions
## Functions Summary:
| Function | Description |
|----------|-------------|
| get_style | Get default style. |
| get_ui_style_name | Gets which light/dark theme kit is using. Not widely supported. | | 243 |
omni.kit.widget.settings.Submodules.md | # omni.kit.widget.settings Submodules
## Submodules Summary
- **omni.kit.widget.settings.settings_model**
- Source for SettingModel, RadioButtonSettingModel, AssetPathSettingsModel, VectorFloatComponentModel, VectorIntComponentModel, VectorSettingsModel, VectorFloatSettingsModel, VectorIntSettingsModel, SettingsComboValueModel, SettingsComboNameValueItem, SettingsComboItemModel.
- **omni.kit.widget.settings.settings_widget**
- Source for SettingType, SettingWidgetType, SettingsSearchableCombo, create_setting_widget, create_setting_widget_combo.
- **omni.kit.widget.settings.settings_widget_builder**
- Source for SettingsWidgetBuilder, AssetPicker.
- **omni.kit.widget.settings.style**
- Source for get_ui_style_name, get_style. | 747 |
omni.kit.widget.toolbar.Classes.md | # omni.kit.widget.toolbar Classes
## Classes Summary
- **Hotkey**
- A helper class to add hotkey to a Toolbar widget.
- **SimpleToolButton**
- A helper class to create simple WidgetGroup that contains only one ToolButton.
- **Toolbar**
- Main Toolbar class.
- **WidgetGroup**
- Base class to create a group of widgets on Toolbar | 341 |
omni.kit.widget.toolbar.Functions.md | # omni.kit.widget.toolbar Functions
## Functions Summary
| Function | Description |
|----------|-------------|
| get_instance | Get the instance of the toolbar. | | 164 |
omni.kit.widget.toolbar.get_instance.md | # get_instance
## get_instance
```python
omni.kit.widget.toolbar.get_instance()
```
- **Returns**: `Toolbar`
- **Description**: Get the instance of the toolbar.
``` | 168 |
omni.kit.widget.toolbar.Hotkey.md | # Hotkey
## Hotkey
```python
class omni.kit.widget.toolbar.Hotkey:
def __init__(self, action_name: str, hotkey: KeyboardInput, on_action_fn: Callable[[], None], hotkey_enabled_fn: Callable[[], bool], modifiers: int = 0, on_hotkey_changed_fn: Optional[Callable[[], None]] = None):
pass
Bases:
```python
object
```
A helper class to add hotkey to a Toolbar widget.
Hotkey registers an Action with `omni.kit.actions.core` and assigns a hotkey using `omni.kit.hotkeys.core`. If `omni.kit.hotkeys.core` is not enabled, hotkey will not be in effect.
### Methods
| Method | Description |
| --- | --- |
| `__init__(action_name, hotkey, on_action_fn, ...)` | Initialize a Hotkey object. |
| `clean()` | Cleanup function to be called before Hotkey object is destroyed. |
| `get_as_string(default)` | Gets the string representation of the hotkey combo. |
#### `__init__(action_name: str, hotkey: KeyboardInput, on_action_fn: Callable[[], None], hotkey_enabled_fn: Callable[[], bool], modifiers: int = 0, on_hotkey_changed_fn: Optional[Callable[[], None]] = None)`
Initialize a Hotkey object.
Initialize a Hotkey object.
### Parameters
- **action_name** (str) – The Action name associated with the hotkey. It needs to be unique.
- **hotkey** (carb.input.KeyboardInput) – The keyboard key binding.
- **on_action_fn** (Callable[[], None]) – Callback function to be called when Action is triggered.
- **hotkey_enabled_fn** (Callable[[bool], None]) – Predicate callback function to be called when Action is triggered, but before `on_action_fn` to determine if it should be called.
- **modifiers** (int) – Modifier of the hotkey.
- **on_hotkey_changed_fn** (Callable[[str], None]) – Callback function when Hotkey is reassigned by external system such as `omni.kit.hotkeys.window`. The parameter will be the new key combo.
### clean()
Cleanup function to be called before Hotkey object is destroyed.
### get_as_string(default: str) -> str
Gets the string representation of the hotkey combo. Useful as tooltip. | 2,014 |
omni.kit.widget.toolbar.md | # omni.kit.widget.toolbar
## Classes Summary:
- **Hotkey**
- A helper class to add hotkey to a Toolbar widget.
- **SimpleToolButton**
- A helper class to create simple WidgetGroup that contains only one ToolButton.
- **Toolbar**
- Main Toolbar class.
- **WidgetGroup**
- Base class to create a group of widgets on Toolbar
## Functions Summary:
- **get_instance**
- Get the instance of the toolbar. | 411 |
omni.kit.widget.toolbar.SimpleToolButton.md | # SimpleToolButton
## SimpleToolButton
```
```markdown
class omni.kit.widget.toolbar.SimpleToolButton(name, tooltip, icon_path, icon_checked_path, hotkey=None, toggled_fn=None, model=None, additional_style=None)
```
```markdown
Bases: `WidgetGroup`
A helper class to create simple WidgetGroup that contains only one ToolButton.
### Parameters
- **name** – Name of the ToolButton.
- **tooltip** – Tooltip of the ToolButton.
- **icon_path** – The icon to be used when button is not checked.
- **icon_checked_path** – The icon to be used when button is checked.
- **hotkey** – HotKey to toggle the button (optional).
- **toggled_fn** – Callback function when button is toggled. Signature: on_toggled(checked) (optional).
## Attributes
- **name** – Name for the ToolButton (required).
- **tooltip** – Tooltip text for the ToolButton (optional).
- **icon_path** – Path to the icon file for the ToolButton (required).
- **icon_checked_path** – Path to the icon file when the ToolButton is checked (optional).
- **hotkey** – Hotkey for the ToolButton (optional).
- **toggled_fn** – Function to call when the ToolButton is toggled (optional).
- **model** – Model for the ToolButton (optional).
- **additional_style** – Additional styling to apply to the ToolButton (optional).
## Methods
### `__init__(name, tooltip, icon_path, [...])`
- Initializes the SimpleToolButton.
### `clean()`
- Clean up function to be called before destroying the object.
### `create(default_size)`
- Main function to create the widget.
### `get_style()`
- Gets the style of all widgets defined in this Widgets group.
### `get_tool_button()`
- (No description provided)
---
title: "Example Document"
author: "John Doe"
date: "2023-01-01"
---
# Introduction
This is an example document.
## Section 1
Here is some content.
## Section 2
More content here.
### Subsection 2.1
Even more detailed content.
### Subsection 2.2
Additional details.
## Section 3
Final section of the document.
### Subsection 3.1
Last bit of content.
### Subsection 3.2
Closing thoughts.
---
This is the end of the document. | 2,093 |
omni.kit.widget.toolbar.Toolbar.md | # Toolbar
## omni.kit.widget.toolbar.Toolbar
Main Toolbar class.
### Methods
- `__init__()`
- `acquire_toolbar_context(context)`
- Request toolbar to switch to given context.
- `add_custom_move_type(entry_name, move_type)`
- `add_custom_select_type(entry_name, ...)`
- `add_widget(widget_group, priority[, context])`
- Adds a WidgetGroup instance to the Toolbar.
- `destroy()`
- `get_context()`
- Gets the current context of the Toolbar.
- `get_widget()`
| Method | Description |
|--------|-------------|
| `get_widget(name)` | Gets a ui.Widget item by its name. |
| `rebuild_toolbar([root_frame])` | |
| `release_toolbar_context(token)` | Request toolbar to release context associated with token. |
| `remove_custom_move(entry_name)` | |
| `remove_custom_select(entry_name)` | |
| `remove_widget(widget_group)` | Removes a WidgetGroup instance from the Toolbar. |
| `set_axis(axis)` | Sets the axis direction of the Toolbar |
| `subscribe_grab_mouse_pressed(function)` | |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `DEFAULT_CONTEXT` | |
| `DEFAULT_CONTEXT_TOKEN` | |
| `DEFAULT_SIZE` | |
| `WINDOW_NAME` | |
| `context_menu` | |
### Methods
#### `__init__()`
#### `acquire_toolbar_context(context: str)`
Request toolbar to switch to given context. It takes the context preemptively even if previous context owner has not release the context.
**Parameters:**
- **context** (str) – Context to switch to.
**Returns:**
A token to be used to release_toolbar_context
#### `add_widget(widget_group: WidgetGroup)`
### omni.kit.widget.toolbar.Toolbar.add_widget
```python
add_widget(widget_group: WidgetGroup, priority: int, context: str = '')
```
Adds a WidgetGroup instance to the Toolbar.
#### Parameters
- **widget_group** (WidgetGroup) – The WidgetGroup instance to be added to the Toolbar.
- **priority** (int) – priority of the WidgetGroup. With a smaller number the WidgetGroup will be shown on Toolbar first.
- **context** (str) – A context the WidgetGroup is associated with.
### omni.kit.widget.toolbar.Toolbar.get_context
```python
get_context()
```
Gets the current context of the Toolbar.
### omni.kit.widget.toolbar.Toolbar.get_widget
```python
get_widget(name: str) -> Widget
```
Gets a ui.Widget item by its name.
#### Parameters
- **name** (str) – The name of widget to fetch.
#### Returns
The ui.Widget associated with such name. None if not found.
### omni.kit.widget.toolbar.Toolbar.release_toolbar_context
```python
release_toolbar_context(token: int)
```
Request toolbar to release context associated with token. If token is expired (already released or context ownership taken by others), this function does nothing.
#### Parameters
- **token** (int) – Context token to release.
### omni.kit.widget.toolbar.Toolbar.remove_widget
```python
remove_widget(widget_group: WidgetGroup)
```
Removes a WidgetGroup instance from the Toolbar.
#### Parameters
- **widget_group** (WidgetGroup) – The WidgetGroup instance to be removed from the Toolbar.
## WidgetGroup
(WidgetGroup) – The WidgetGroup instance to be removed from the Toolbar.
## set_axis
```python
set_axis(axis: ToolBarAxis)
```
Sets the axis direction of the Toolbar
### Parameters
- **axis** (ui.ToolBarAxis) –
``` | 3,258 |
omni.kit.widget.toolbar.WidgetGroup.md | # WidgetGroup
## WidgetGroup
Base class to create a group of widgets on Toolbar
### Methods
- `__init__()`
- `clean()`
- Clean up function to be called before destroying the object.
- `create(default_size)`
- Main function to creates widget.
- `get_style()`
- Gets the style of all widgets defined in this Widgets group.
- `on_added(context)`
- Called when widget is added to toolbar when calling Toolbar.add_widget
- `on_removed()`
- Called when widget is removed from toolbar when calling Toolbar.remove_widget
(context)
Called when toolbar's effective context has changed.
__init__()
clean()
Clean up function to be called before destroying the object.
create(default_size) -> dict[str, omni.ui._ui.Widget]
Main function to creates widget.
If you want to export widgets and allow external code to fetch and manipulate them, return a Dict[str, Widget] mapping from name to instance at the end of the function.
get_style() -> dict
Gets the style of all widgets defined in this Widgets group.
on_added(context)
Called when widget is added to toolbar when calling Toolbar.add_widget
Parameters
----------
context – the context used to add widget when calling Toolbar.add_widget.
on_removed()
Called when widget is removed from toolbar when calling Toolbar.remove_widget
on_toolbar_context_changed(context: str)
Called when toolbar’s effective context has changed.
Parameters
----------
context – new toolbar context. | 1,445 |
omni.kit.widget.viewport.Classes.md | # omni.kit.widget.viewport Classes
## Classes Summary:
| Class | Description |
|-------|-------------|
| [ViewportWidget](#) | A low level omni.ui.Widget for displaying rendered output. | | 189 |
omni.kit.widget.viewport.ViewportWidget.md | # ViewportWidget
## ViewportWidget
[Union[ViewportAPI, str]] = None,
hydra_engine_options: Optional[dict] = None,
*ui_args,
**ui_kwargs)
Bases: object
A low level omni.ui.Widget for displaying rendered output.
### Methods
- `__init__(usd_context_name, camera_path, ...)` - ViewportWidget constructor
- `destroy()` - Called by extension before destroying this object.
- `get_instances()` - Return an iterable object to enumerate all known ViewportWidget instances
- `set_resolution(resolution)`
### Attributes
- `display_delegate`
- `expand_viewport` - Whether the ui object containing the Viewport texture expands one dimension of resolution to cover the full ui size
- `fill_frame` - Whether the ui object containing the Viewport texture expands both dimensions of resolution based on the ui size
- `full_resolution` - Return the resolution being requested (not accounting for any % down-scaling
- `name` - Return the name of the ViewportWidget
- `resolution`
| Property | Description |
|----------|-------------|
| `resolution` | Return the resolution that the renderer is providing images at. |
| `resolution_uses_dpi` | Whether to account for DPI when driving the Viewport texture resolution |
| `usd_context_name` | Return the name of the USdContext this instance is attached to |
| `viewport_api` | Return the active omni.kit.widget.viewport.ViewportAPI for the ViewportWidget |
| `visible` | Set the visibility of this ViewportWidget |
### `__init__`
- `usd_context_name` (str, default: '')
- `camera_path` (Optional[str], default: None)
- `resolution` (Optional[tuple], default: None)
- `hd_engine` (Optional[str], default: None)
- `viewport_api` (Optional[Union[ViewportAPI, str]], default: None)
### ViewportWidget constructor
#### Parameters
- **usd_context_name** (`str`) – The name of a UsdContext this Viewport will be viewing.
- **camera_path** (`str`) – The path to a UsdGeom.Camera to render with.
- **resolution** – (x,y): The size of the backing texture that is rendered into (or 'fill_frame' to lock to UI size).
- **viewport_api** – (`ViewportAPI`, `str`) A ViewportAPI instance that users have access to via `.viewport_api` property or a unique string id used to create a default ViewportAPI instance.
### destroy()
Called by extension before destroying this object. It doesn’t happen automatically. Without this hot reloading doesn’t work.
### classmethod get_instances()
Return an iterable object to enumerate all known ViewportWidget instances
### property expand_viewport: bool
Whether the ui object containing the Viewport texture expands one dimension of resolution to cover the full ui size
### property fill_frame: bool
Whether the ui object containing the Viewport texture expands both dimensions of resolution based on the ui size
### property full_resolution
Return the resolution being requested (not accounting for any % down-scaling
### property name
Return the name of the ViewportWidget
### property resolution
<em>
<span class="sig-name descname">
<span class="pre">
resolution
<em class="property">
<span class="p">
<span class="pre">
:
<span class="w">
<span class="pre">
Tuple
<span class="p">
<span class="pre">
[
<span class="pre">
float
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
float
<span class="p">
<span class="pre">
]
<dd>
<p>
Return the resolution that the renderer is providing images at.
<dl class="py property">
<dt class="sig sig-object py" id="omni.kit.widget.viewport.ViewportWidget.resolution_uses_dpi">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
resolution_uses_dpi
<em class="property">
<span class="p">
<span class="pre">
:
<span class="w">
<span class="pre">
bool
<dd>
<p>
Whether to account for DPI when driving the Viewport texture resolution
<dl class="py property">
<dt class="sig sig-object py" id="omni.kit.widget.viewport.ViewportWidget.usd_context_name">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
usd_context_name
<em class="property">
<span class="p">
<span class="pre">
:
<span class="w">
<span class="pre">
str
<dd>
<p>
Return the name of the USdContext this instance is attached to
<dl class="py property">
<dt class="sig sig-object py" id="omni.kit.widget.viewport.ViewportWidget.viewport_api">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
viewport_api
<dd>
<p>
Return the active omni.kit.widget.viewport.ViewportAPI for the ViewportWidget
<dl class="py property">
<dt class="sig sig-object py" id="omni.kit.widget.viewport.ViewportWidget.visible">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
visible
<dd>
<p>
Set the visibility of this ViewportWidget
<footer>
<hr/>
| 4,967 |
omni.kit.widget.viewport.ViewportWidget_omni.kit.widget.viewport.ViewportWidget.md | # ViewportWidget
## ViewportWidget
[Union[ViewportAPI, str]] = None,
hydra_engine_options: Optional[dict] = None,
*ui_args,
**ui_kwargs
)
Bases:
object
```
A low level omni.ui.Widget for displaying rendered output.
### Methods
| Method | Description |
| --- | --- |
| `__init__(usd_context_name, camera_path, ...)` | ViewportWidget constructor |
| `destroy()` | Called by extension before destroying this object. |
| `get_instances()` | Return an iterable object to enumerate all known ViewportWidget instances |
| `set_resolution(resolution)` | |
### Attributes
| Attribute | Description |
| --- | --- |
| `display_delegate` | |
| `expand_viewport` | Whether the ui object containing the Viewport texture expands one dimension of resolution to cover the full ui size |
| `fill_frame` | Whether the ui object containing the Viewport texture expands both dimensions of resolution based on the ui size |
| `full_resolution` | Return the resolution being requested (not accounting for any % down-scaling |
| `name` | Return the name of the ViewportWidget |
| `resolution` | |
```
| Property | Description |
|----------|-------------|
| `resolution` | Return the resolution that the renderer is providing images at. |
| `resolution_uses_dpi` | Whether to account for DPI when driving the Viewport texture resolution |
| `usd_context_name` | Return the name of the USdContext this instance is attached to |
| `viewport_api` | Return the active omni.kit.widget.viewport.ViewportAPI for the ViewportWidget |
| `visible` | Set the visibility of this ViewportWidget |
### `__init__(usd_context_name: str = '', camera_path: Optional[str] = None, resolution: Optional[tuple] = None, hd_engine: Optional[str] = None, viewport_api: Optional[Union[ViewportAPI, str]] = None)`
- `usd_context_name`: The name of the USD context. Default is an empty string.
- `camera_path`: The path to the camera. Default is None.
- `resolution`: The resolution settings. Default is None.
- `hd_engine`: The hardware description engine. Default is None.
- `viewport_api`: The viewport API. Default is None.
### ViewportWidget Constructor
ViewportWidget constructor
#### Parameters
- **usd_context_name** (str) – The name of a UsdContext this Viewport will be viewing.
- **camera_path** (str) – The path to a UsdGeom.Camera to render with.
- **resolution** – (x,y): The size of the backing texture that is rendered into (or ‘fill_frame’ to lock to UI size).
- **viewport_api** – (ViewportAPI, str) A ViewportAPI instance that users have access to via .viewport_api property or a unique string id used to create a default ViewportAPI instance.
### ViewportWidget.destroy()
Called by extension before destroying this object. It doesn’t happen automatically. Without this hot reloading doesn’t work.
### ViewportWidget.get_instances()
Return an iterable object to enumerate all known ViewportWidget instances
### ViewportWidget.expand_viewport
: bool
Whether the ui object containing the Viewport texture expands one dimension of resolution to cover the full ui size
### ViewportWidget.fill_frame
: bool
Whether the ui object containing the Viewport texture expands both dimensions of resolution based on the ui size
### ViewportWidget.full_resolution
Return the resolution being requested (not accounting for any % down-scaling
### ViewportWidget.name
Return the name of the ViewportWidget
### ViewportWidget.resolution
: property
### resolution
: Tuple[float, float]
Return the resolution that the renderer is providing images at.
### resolution_uses_dpi
: bool
Whether to account for DPI when driving the Viewport texture resolution
### usd_context_name
: str
Return the name of the USdContext this instance is attached to
### viewport_api
Return the active omni.kit.widget.viewport.ViewportAPI for the ViewportWidget
### visible
Set the visibility of this ViewportWidget | 3,876 |
omni.kit.window.content_browser.ContentBrowserExtension.md | # ContentBrowserExtension
## ContentBrowserExtension
The Content Browser extension
### Methods
- `__init__(self)`
- `add_checkpoint_menu(name, glyph, click_fn, ...)`
- Add menu item, with corresponding callbacks, to checkpoint items.
- `add_collection_data(collection_data)`
- `add_connections(connections)`
- Adds specified server connections to the tree browser.
- `add_context_menu(name, glyph, click_fn, show_fn)`
- Add menu item, with corresponding callbacks, to the context menu.
- `add_file_open_handler(name, open_fn, file_type)`
Registers callback/handler to open a file of matching type.
- `add_import_menu(name, glyph, click_fn, show_fn)`
Add menu item, with corresponding callbacks, to the Import combo box.
- `add_listview_menu(name, glyph, click_fn, show_fn)`
Add menu item, with corresponding callbacks, to the list view menu.
- `decorate_from_registry(event)`
- `delete_checkpoint_menu(name)`
Delete the menu item, with the given name, from context menu of checkpoint item.
- `delete_context_menu(name)`
Delete the menu item, with the given name, from the context menu.
- `delete_file_open_handler(name)`
Unregisters the named file open handler.
- `delete_import_menu(name)`
Delete the menu item, with the given name, from the Import combo box.
- `delete_listview_menu(name)`
Delete the menu item, with the given name, from the list view menu.
- `get_checkpoint_widget()`
Returns the checkpoint widget
- `get_current_directory()`
Returns the current directory from the browser bar.
- `get_current_selections([pane])`
Returns current selected as list of system path names.
- `get_file_open_handler(url)`
Returns the matching file open handler for the given file path.
- `get_timestamp_widget()`
Returns the timestamp widget
- `navigate_to` (url)
- Navigates to the given url, expanding all parent directories along the path.
- `navigate_to_async` (url)
- Asynchronously navigates to the given url, expanding all parent directories along the path.
- `on_shutdown` ()
- `on_startup` (ext_id)
- `refresh_current_directory` ()
- Refreshes the current directory set in the browser bar.
- `remove_collection_data` (collection_id)
- `select_items_async` (url[, filenames])
- Asynchronously selects display items by their names.
- `set_current_directory` (path)
- Procedurally sets the current directory path.
- `set_search_delegate` (delegate)
- Sets a custom search delegate for the tool bar.
- `show_model` (model)
- Displays the given model in the list view, overriding the default model.
- `show_window` (menu, value)
- Shows this window.
- `subscribe_selection_changed` (fn)
- Subscribes to file selection changes.
- `toggle_bookmark_from_path` (name, path, ...[, ...])
- Adds/deletes the given bookmark with the specified path.
- `toggle_grid_view` (show_grid_view)
- Toggles file picker between grid and list view.
- `unset_search_delegate` (delegate)
Clears the custom search delegate for the tool bar.
Unsubscribes this callback from selection changes.
Unsubscribes this callback from selection changes.
Attributes
| MENU_GROUP |
|------------|
| WINDOW_NAME |
|-------------|
| api |
|----|
| window |
|-------|
Main dialog window for this extension.
__init__(self: omni.ext._extensions.IExt) -> None
add_checkpoint_menu(name: str, glyph: str, click_fn: Callable, show_fn: Callable, index: int = -1) -> str
Add menu item, with corresponding callbacks, to checkpoint items.
Parameters
* name (str) – Name of the menu item, this name must be unique across the menu.
* glyph (str) – Associated glyph to display for this menu item.
* click_fn (Callable) – This callback function is executed when the menu item is clicked. Function signature: void fn(name: str, path: str), where name is menu name and path is absolute path to clicked item.
* show_fn (Callable) – Returns True to display this menu item. Function signature: bool fn(path: str). For example, test filename extension to decide whether to display a ‘Play Sound’ action.
### add_context_menu
```python
add_context_menu(name: str, glyph: str, click_fn: Callable, show_fn: Callable, index: int = 0, separator_name: str = '_add_on_end_separator_') -> str
```
Add menu item, with corresponding callbacks, to the context menu.
#### Parameters
- **name** (str) – Name of the menu item (e.g. ‘Open’), this name must be unique across the context menu.
- **glyph** (str) – Associated glyph to display for this menu item.
- **click_fn** (Callable) – This callback function is executed when the menu item is clicked. Function signature is void fn(name: str, path: str), where name is menu name and path is absolute path to clicked item.
- **show_fn** (Callable) – Returns True to display this menu item. Function signature - bool fn(path: str). For example, test filename extension to decide whether to display a ‘Play Sound’ action.
- **index** (int) – The position that this menu item will be inserted to.
- **separator_name** (str) – The separator name of the separator menu item. Default to ‘_placeholder_’. When the index is not explicitly set, or if the index is out of range, this will be used to locate where to add the menu item; if specified, the index passed in will be counted from the separator with the provided name.
```
### add_connections
```python
add_connections(connections: dict)
```
Adds specified server connections to the tree browser.
#### Parameters
- **connections** (dict) – A dictionary of name, path pairs. For example: {"C:": "C:", "ov-content": "omniverse://ov-content"}. Paths to Omniverse servers should be prefixed with “omniverse://”.
```
### add_menu_item
```python
add_menu_item(name: str, glyph: str, click_fn: Callable, show_fn: Callable, index: int = 0, separator_name: str = '_add_on_end_separator_') -> str
```
Adds a menu item with associated callbacks to the context menu.
#### Parameters
- **name** (str) – Name of the menu item (e.g. ‘Open’), this name must be unique across the context menu.
- **glyph** (str) – Associated glyph to display for this menu item.
- **click_fn** (Callable) – This callback function is executed when the menu item is clicked. Function signature is void fn(name: str, path: str), where name is menu name and path is absolute path to clicked item.
- **show_fn** (Callable) – Returns True to display this menu item. Function signature - bool fn(path: str). For example, test filename extension to decide whether to display a ‘Play Sound’ action.
- **index** (int) – The position that this menu item will be inserted to.
- **separator_name** (str) – The separator name of the separator menu item. Default to ‘_placeholder_’. When the index is not explicitly set, or if the index is out of range, this will be used to locate where to add the menu item; if specified, the index passed in will be counted from the separator with the provided name.
```
## ContentBrowserExtension Methods
### add_file_open_handler
Registers callback/handler to open a file of matching type.
**Parameters:**
- **name** (str) – Unique name of handler.
- **open_fn** (Callable) – This function is executed when a matching file is selected for open, i.e. double clicked, right mouse menu open, or path submitted to browser bar. Function signature: `void open_fn(full_path: str)`, full_path is the file’s system path.
- **file_type** (Union[int, Callable]) – Can either be an enumerated int that is one of: [FILE_TYPE_USD, FILE_TYPE_IMAGE, FILE_TYPE_SOUND, FILE_TYPE_TEXT, FILE_TYPE_VOLUME] or a more general boolean function that returns True if this function should be activated on the given file. Function signature: `bool file_type(full_path: str)`.
**Returns:**
- str - Name if successful, None otherwise.
### add_import_menu
Add menu item, with corresponding callbacks, to the Import combo box.
**Parameters:**
- **name** (str) – Name of the menu item, this name must be unique across the menu.
- **glyph** (str) – Description of glyph parameter.
- **click_fn** (Callable) – Description of click_fn parameter.
- **show_fn** (Callable) – Description of show_fn parameter.
**Returns:**
- str - Name if successful, None otherwise.
### add_listview_menu
```python
add_listview_menu(name: str, glyph: str, click_fn: Callable, show_fn: Callable, index: int = -1) -> str
```
Add menu item, with corresponding callbacks, to the list view menu.
#### Parameters
- **name** (str) – Name of the menu item (e.g. ‘Open’), this name must be unique across the list view menu.
- **glyph** (str) – Associated glyph to display for this menu item.
- **click_fn** (Callable) – This callback function is executed when the menu item is clicked. Function signature: void fn(name: str, path: str), where name is menu name and path is absolute path to clicked item.
- **show_fn** (Callable) – Returns True to display this menu item. Function signature: bool fn(path: str). For example, test filename extension to decide whether to display a ‘Play Sound’ action.
- **index** (int) – The position that this menu item will be inserted to.
#### Returns
- Name of menu item if successful, None otherwise.
#### Return type
- str
### delete_checkpoint_menu
```python
delete_checkpoint_menu(name: str)
```
Delete the menu item, with the given name, from context menu of checkpoint item.
#### Parameters
- **name** (str) – Name of the menu item.
### delete_context_menu
- **Parameters**
- **name** (str) – Name of the menu item (e.g. ‘Open’).
### delete_file_open_handler
- **Parameters**
- **name** (str) – Name of the handler.
### delete_import_menu
- **Parameters**
- **name** (str) – Name of the menu item.
### delete_listview_menu
- **Parameters**
- **name** (str) – Name of the menu item (e.g. 'Open').
### get_checkpoint_widget
- **Returns**
- CheckpointWidget
### get_current_directory
- **Returns**
- str
### get_current_selections
Returns current selected as list of system path names.
**Parameters**
- **pane** (int) – Specifies pane to retrieve selections from, one of {TREEVIEW_PANE = 1, LISTVIEW_PANE = 2, BOTH = None}. Default LISTVIEW_PANE.
**Returns**
- List of system paths (which may be different from displayed paths, e.g. bookmarks)
**Return type**
- List[str]
### get_file_open_handler
Returns the matching file open handler for the given file path.
**Parameters**
- **url** (str) – The url of the file to open.
### get_timestamp_widget
Returns the timestamp widget
### navigate_to
Navigates to the given url, expanding all parent directories along the path.
**Parameters**
- **url** (str) – The path to navigate to.
### navigate_to_async
Navigates to the given url asynchronously, expanding all parent directories along the path.
**Parameters**
- **url** (str) – The path to navigate to.
<dl>
<dt>
<p>
Asynchronously navigates to the given url, expanding all parent directories along the path.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<p>
<strong>
url
(
<em>
str
) – The url to navigate to.
<dd>
<p>
Refreshes the current directory set in the browser bar.
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.content_browser.ContentBrowserExtension.select_items_async">
<em class="property">
<span class="pre">
async
<span class="w">
<span class="sig-name descname">
<span class="pre">
select_items_async
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
url
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
,
<em class="sig-param">
<span class="n">
<span class="pre">
filenames
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
List
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
]
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
[]
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
List
<span class="p">
<span class="pre">
[
<span class="pre">
FileBrowserItem
<span class="p">
<span class="pre">
]
<dd>
<p>
Asynchronously selects display items by their names.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
url
(
<em>
str
) – Url of the parent folder.
<li>
<p>
<strong>
filenames
(
<em>
str
) – Names of items to select.
<dt class="field-even">
Returns
<dd class="field-even">
<p>
List of selected items.
<dt class="field-odd">
Return type
<dd class="field-odd">
<p>
List[FileBrowserItem]
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.content_browser.ContentBrowserExtension.set_current_directory">
<span class="sig-name descname">
<span class="pre">
set_current_directory
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
path
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
<span class="sig-paren">
)
<dd>
<p>
Procedurally sets the current directory path.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<p>
<strong>
path
(
<em>
str
) – The full path name of the folder, e.g. “omniverse://ov-content/Users/me.
<dt class="field-even">
Raises
<dd class="field-even">
<p>
<strong>
RuntimeWarning
– If path doesn’t exist or is unreachable.
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.content_browser.ContentBrowserExtension.set_search_delegate">
<span class="sig-name descname">
<span class="pre">
set_search_delegate
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
delegate
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
SearchDelegate
<span class="sig-paren">
)
<dd>
<p>
Sets a custom search delegate for the tool bar.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<p>
<strong>
delegate
(
<em>
SearchDelegate
## Methods
### show_model
```python
show_model(model: FileBrowserModel)
```
Displays the given model in the list view, overriding the default model. For example, this model might be the result of a search.
**Parameters**
- **model** (`FileBrowserModel`) – Model to display.
### show_window
```python
show_window(menu, value)
```
Shows this window. Inputs are for backwards compatibility only and not used.
### subscribe_selection_changed
```python
subscribe_selection_changed(fn: Callable)
```
Subscribes to file selection changes.
**Parameters**
- **fn** (`Callable`) – callback function when file selection changed.
### toggle_bookmark_from_path
```python
toggle_bookmark_from_path(name: str, path: str, is_bookmark: bool, is_folder: bool = True) -> bool
```
Adds/deletes the given bookmark with the specified path. If deleting, then the path argument is optional.
**Parameters**
- **name** (`str`) – Name to call the bookmark or existing name if delete.
- **path** (`str`) – Path to the bookmark.
- **is_bookmark** (`bool`) – True to add, False to delete.
- **is_folder** (`bool`) – Whether the item to be bookmarked is a folder.
## Returns
- True if successful.
## Return type
- bool
## toggle_grid_view
- Toggles file picker between grid and list view.
- **Parameters**
- **show_grid_view** (bool) – True to show grid view, False to show list view.
## unset_search_delegate
- Clears the custom search delegate for the tool bar.
- **Parameters**
- **delegate** (SearchDelegate) – Object that creates the search widget.
## unsubscribe_selection_changed
- Unsubscribes this callback from selection changes.
- **Parameters**
- **fn** (Callable) – callback function when file selection changed.
## window
- Main dialog window for this extension.
- **Type**
- ui.Window | 18,208 |
omni.kit.window.content_browser.Functions.md | # omni.kit.window.content_browser Functions
## Functions Summary:
| Function | Description |
|----------|-------------|
| `get_content_window` | Returns the singleton content_browser extension instance | | 205 |
omni.kit.window.content_browser.md | # omni.kit.window.content_browser
## Classes Summary
- **ContentBrowserExtension**
- The Content Browser extension
## Functions Summary
- **get_content_window**
- Returns the singleton content_browser extension instance | 225 |
omni.kit.window.file.add_reference.md | # add_reference
## add_reference
```python
omni.kit.window.file.add_reference(is_payload=False)
```
Prompt for the file to add reference or payload to.
### Keyword Arguments
- **is_payload** (bool) – True to add payload instead of reference.
``` | 248 |
omni.kit.window.file.Classes.md | # omni.kit.window.file Classes
## Classes Summary:
| Class | Description |
|-------|-------------|
| DialogOptions | Enum for dialog options. |
| FileWindowExtension | File window extension interface. |
| Prompt | A pop up window in context manager style to perform operations when inside the context. |
| ReadOnlyOptionsWindow | Prompt window class to show when opening a read only file. |
| StageSaveDialog | Dialog class for saving stage. | | 447 |
omni.kit.window.file.close.md | # close
## close
Check if current stage is dirty. If it’s dirty, it will ask if to save the file, then close stage.
### Keyword Arguments
- **on_closed** (`Callable`) – function to call after closing, Function Signature: `on_closed() -> None` | 243 |
omni.kit.window.file.DialogOptions.md | # DialogOptions
## DialogOptions
```python
class omni.kit.window.file.DialogOptions(value)
```
Bases: `Enum`
Enum for dialog options.
### Attributes
| Attribute | Description |
|-----------|-------------|
| `NONE` | Show dialog using is-required logic |
| `FORCE` | Force dialog to show and ignore is-required logic |
| `HIDE` | Never show dialog |
```python
def __init__(self):
pass
```
```python
FORCE = (1,)
```
Force dialog to show and ignore is-required logic
```python
HIDE = ()
```
Never show dialog
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
(2,)
<dd>
<p>
Never show dialog
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.kit.window.file.DialogOptions.NONE">
<span class="sig-name descname">
<span class="pre">
NONE
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
(0,)
<dd>
<p>
Show dialog using is-required logic
<footer>
<hr/>
| 1,137 |
omni.kit.window.file.FileWindowExtension.md | # FileWindowExtension
## Methods
- **add_reference(is_payload)**
- Prompt for the file to add reference or payload to.
- **close(on_closed, fast_shutdown)**
- Check if current stage is dirty.
- **create_stage(edit_layer_path, file_path, ...)**
- Create a stage with edit layer from paths.
- **new(template)**
- Create a new USD stage.
- **on_shutdown()**
- Cleanup the extension.
- **on_startup(ext_id)**
- Initialize the extension.
| Method | Description |
| ------ | ----------- |
| `open` ([open_loadset]) | Bring up a file picker to choose a USD file to open. |
| `open_stage` (path[, open_loadset, open_options]) | Open stage. |
| `open_with_new_edit_layer` (path[, ...]) | Open stage and create a new edit layer. |
| `post_notification` ([info, duration]) | Post a notification message. |
| `prompt_if_unsaved_stage` (callback) | Check if current stage is dirty. |
| `register_open_stage_addon` (callback) | Register callback to call when opening a stage. |
| `register_open_stage_complete` (callback) | Register callback to call when finish opening a stage. |
| `reopen` () | Reopen currently opened stage. |
| `save` (callback[, allow_skip_sublayers, ...]) | Save currently opened stage to file. |
| `save_as` (flatten, callback[, ...]) | Bring up a file picker to choose a file to save current stage to. |
| `save_layers` (new_root_path, dirty_layers, ...) | Save current layers. |
| `save_stage` (path[, callback, flatten, ...]) | Save current stage to the given path, if the path exists bring up the filepicker to choose a potential new path. |
| `stop_timeline` () | Stop the timeline. |
```
```markdown
__init__ (self: omni.ext._extensions.IExt)
### omni.kit.window.file.FileWindowExtension Methods
#### __init__
- **Description**: Initializes the extension.
#### add_reference
- **Description**: Prompt for the file to add reference or payload to.
- **Keyword Arguments**:
- **is_payload** (bool) – True to add payload instead of reference.
#### close
- **Description**: Check if current stage is dirty. If it’s dirty, it will ask if to save the file, then close stage.
- **Parameters**:
- **on_closed** (Callable) – function to call after closing, Function Signature: on_closed() -> None
- **Keyword Arguments**:
- **fast_shutdown** (bool) – clear pending edits immediately to shutdown faster.
#### create_stage
- **Description**: Create a stage with edit layer from paths.
- **Parameters**:
- **edit_layer_path** (str) – path to create the edit layer.
- **file_path** (str) – path to create the stage.
- **Keyword Arguments**:
- **callback** – (Callable): callback to call after creating stage. Function Signature: callback() -> None
Create a new USD stage. If currently opened stage is dirty, a prompt will show to let you save it.
**Keyword Arguments**
* **template** (`Optional` `[str]`) – the template to use.
Cleanup the extension.
Initialize the extension.
:param ext_id: Extension identifier.
:type ext_id: str
Bring up a file picker to choose a USD file to open. If currently opened stage is dirty, a prompt will show to let you save it.
**Keyword Arguments**
* **open_loadset** (`omni.usd.UsdContextInitialLoadSet`) – initial load set enum, LOAD_ALL or LOAD_NONE.
Open stage. If the current stage is dirty, a prompt will show to let you save it.
**Parameters**
* **path** (`str`) – the path to the stage file to open.
**Keyword Arguments**
* **open_loadset** (`omni.usd.UsdContextInitialLoadSet`) – initial load set enum, LOAD_ALL or LOAD_NONE.
* **open_options** (`OpenOptionsDelegate`) – if set, use the open_loadset setting from options.
### open_with_new_edit_layer
Open stage and create a new edit layer.
#### Parameters
- **path** (str) – path to open the stage.
#### Keyword Arguments
- **open_loadset** (omni.usd.UsdContextInitialLoadSet) – initial load set enum, LOAD_ALL or LOAD_NONE.
- **callback** – (Callable): callback to call after creating stage. Function Signature:
callback() -> None
### post_notification
Post a notification message.
#### Parameters
- **message** (str) – message text.
- **info** (bool) – If True, post the message as info or otherwise warning.
- **duration** (int) – Duration of notification, in seconds.
### prompt_if_unsaved_stage
Check if current stage is dirty. If it’s dirty, ask to save the file, then execute callback. Otherwise runs callback directly.
#### Parameters
- **callback** (Callable) – function to call upon saving. Function Signature:
callback() -> None
### register_open_stage_addon
### omni.kit.window.file.FileWindowExtension.register_open_stage_addon
Register callback to call when opening a stage.
#### Parameters
- **callback** (`Callable`) – function to call. Function Signature: `callback() -> None`
#### Returns
- The callback subscription.
#### Return type
- `_CallbackRegistrySubscription`
### omni.kit.window.file.FileWindowExtension.register_open_stage_complete
Register callback to call when finish opening a stage.
#### Parameters
- **callback** (`Callable`) – function to call. Function Signature: `callback() -> None`
#### Returns
- The callback subscription.
#### Return type
- `_CallbackRegistrySubscription`
### omni.kit.window.file.FileWindowExtension.reopen
Reopen currently opened stage. If the stage is dirty, a prompt will show to let you save it.
### omni.kit.window.file.FileWindowExtension.save
Save currently opened stage to file. Will call Save As for a newly created stage.
### Keyword Arguments
- **callback** (`Callable`) – function to call after saving. Function Signature: `callback(result: bool, url: str) -> None`
- **allow_skip_sublayers** (`bool`) – True to skip sublayers.
- **dialog_options** (`DialogOptions`) – options for opening the dialog.
### save_as
```python
save_as(flatten: bool, callback: Callable[[bool, str], None], allow_skip_sublayers: bool = False)
```
Bring up a file picker to choose a file to save current stage to.
#### Parameters
- **flatten** (`bool`) – Whether to flatten the stage or not.
#### Keyword Arguments
- **callback** (`Callable`) – function to call after saving. Function Signature: `callback(result: bool, url: str) -> None`
- **allow_skip_sublayers** (`bool`) – True to skip sublayers.
### save_layers
```python
save_layers(new_root_path: str, dirty_layers: List[str], on_save_done: Callable[[bool, str], None])
```
## save_layers
Save current layers.
### Parameters
- **new_root_path** (str) – path to set the root layer.
- **dirty_layers** (List[str]) – layer identifiers to save.
- **on_save_done** (Callable) – function to call after saving. Function Signature: `on_save_done(result: bool, url: str) -> None`
### Keyword Arguments
- **create_checkpoint** (bool) – true to create checkpoints.
- **checkpoint_comments** (str) – comment on the created checkpoint.
## save_stage
### Parameters
- **path** (str)
- **callback** (Optional[Callable[[bool, str], None]] = None)
- **flatten** (bool = False)
- **save_options** (Optional[SaveOptionsDelegate] = None)
- **allow_skip_sublayers** (bool = True)
## omni.kit.window.file.FileWindowExtension.save_stage
Save current stage to the given path, if the path exists bring up the filepicker to choose a potential new path.
### Parameters
- **path** (str) – path to save the file.
### Keyword Arguments
- **callback** (Callable) – function to call after saving. Function Signature: `callback(result: bool, url: str) -> None`
- **flatten** (bool) – whether to flatten the stage or not.
- **save_options** (SaveOptionsDelegate) – if set, load save settings from it.
- **allow_skip_sublayers** (bool) – True to skip sublayers.
## omni.kit.window.file.FileWindowExtension.stop_timeline
Stop the timeline. | 7,684 |
omni.kit.window.file.Functions.md | # omni.kit.window.file Functions
## Functions Summary:
| Function | Description |
|----------|-------------|
| `add_reference` | Prompt for the file to add reference or payload to. |
| `close` | Check if current stage is dirty. If it’s dirty, it will ask if to save the file, then close stage. |
| `get_instance` | Get the extension instance. |
| `new` | Create a new USD stage. If currently opened stage is dirty, a prompt will show to let you save it. |
| `open` | Bring up a file picker to choose a USD file to open. If currently opened stage is dirty, a prompt will show to let you save it. |
| `open_stage` | Open stage. If the current stage is dirty, a prompt will show to let you save it. |
| `open_with_new_edit_layer` | Open stage and create a new edit layer. |
| `prompt_if_unsaved_stage` | Check if current stage is dirty. If it’s dirty, ask to save the file, then execute callback. Otherwise runs callback directly. |
| `register_open_stage_addon` | Register callback to call when opening a stage. |
| `register_open_stage_complete` | Register callback to call when finish opening a stage. |
| `reopen` | |
| 操作 | 描述 |
| --- | --- |
| reopen | Reopen currently opened stage. If the stage is dirty, a prompt will show to let you save it. |
| save | Save currently opened stage to file. Will call Save As for a newly created stage. |
| save_as | Bring up a file picker to choose a file to save current stage to. |
| save_layers | Save current layers. | | 1,465 |
omni.kit.window.file.md | # omni.kit.window.file
## Classes Summary:
- **DialogOptions**
- Enum for dialog options.
- **FileWindowExtension**
- File window extension interface.
- **Prompt**
- A pop up window in context manager style to perform operations when inside the context.
- **ReadOnlyOptionsWindow**
- Prompt window class to show when opening a read only file.
- **StageSaveDialog**
- Dialog class for saving stage.
## Functions Summary:
- **add_reference**
- Prompt for the file to add reference or payload to.
- **close**
- Check if current stage is dirty. If it’s dirty, it will ask if to save the file, then close stage.
- **get_instance**
- Get the extension instance.
- **new**
- Create a new USD stage. If currently opened stage is dirty, a prompt will show to let you save it.
- **open**
- Bring up a file picker to choose a USD file to open. If currently opened stage is dirty, a prompt will show to let you save it.
- **open_stage**
- (Function description not provided in the HTML)
| | |
|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| open_stage | Open stage. If the current stage is dirty, a prompt will show to let you save it. |
| | |
| open_with_new_edit_layer | Open stage and create a new edit layer. |
| | |
| prompt_if_unsaved_stage | Check if current stage is dirty. If it’s dirty, ask to save the file, then execute callback. Otherwise runs callback directly. |
| | |
| register_open_stage_addon | Register callback to call when opening a stage. |
| | |
| register_open_stage_complete | Register callback to call when finish opening a stage. |
| | |
| reopen | Reopen currently opened stage. If the stage is dirty, a prompt will show to let you save it. |
| | |
| save | Save currently opened stage to file. Will call Save As for a newly created stage. |
| | |
| save_as | Bring up a file picker to choose a file to save current stage to. |
| | |
| save_layers | Save current layers. | | 5,019 |
omni.kit.window.file.new.md | # new
## new
Create a new USD stage. If currently opened stage is dirty, a prompt will show to let you save it.
### Keyword Arguments
- **template** (Optional [str]) – the template to use. | 190 |
omni.kit.window.file.open.md | # open
## open
Bring up a file picker to choose a USD file to open. If currently opened stage is dirty, a prompt will show to let you save it.
### Keyword Arguments
- **open_loadset** (omni.usd.UsdContextInitialLoadSet) – initial load set enum, LOAD_ALL or LOAD_NONE. | 268 |
omni.kit.window.file.open_stage.md | # open_stage
## open_stage
```python
omni.kit.window.file.open_stage(path: str, open_loadset=<UsdContextInitialLoadSet.LOAD_ALL: 0>)
```
Open stage. If the current stage is dirty, a prompt will show to let you save it.
### Parameters
- **path** (str) – path to open the stage.
### Keyword Arguments
- **open_loadset** (omni.usd.UsdContextInitialLoadSet) – initial load set enum, LOAD_ALL or LOAD_NONE. | 405 |
omni.kit.window.file.open_with_new_edit_layer.md | # open_with_new_edit_layer
## open_with_new_edit_layer
```python
omni.kit.window.file.open_with_new_edit_layer(path: str, open_loadset=<UsdContextInitialLoadSet.LOAD_ALL: 0>, callback: Optional[Callable[[], None]] = None)
```
Open stage and create a new edit layer.
**Parameters**
- **path** (str) – path to open the stage.
**Keyword Arguments**
- **open_loadset** (UsdContextInitialLoadSet) – initial load set enum, LOAD_ALL or LOAD_NONE.
- **callback** – (Callable): callback to call after creating stage. Function Signature: `callback() -> None` | 552 |
omni.kit.window.file.Prompt.md | # Prompt
## Prompt Class
```python
class omni.kit.window.file.Prompt(title: str, text: str, button_text: List[str], button_fn: List[Callable[[], None]], modal: bool = False, callback_addons: List[Callable[[], None]] = [])
```
This class represents a prompt window in the file module of Omniverse Kit.
```
Bases:
```python
object
```
A pop up window in context manager style to perform operations when inside the context.
Parameters:
- **title** (str) – window title.
- **text** (str) – description of the operation to perform when in context.
- **button_text** (List[str]) – text of buttons to create.
- **button_fn** (List[Callable]) – functions to call after clicking buttons.
Keyword Arguments:
- **modal** (bool) – True to disable hang detection when in context.
- **callback_addons** (List[Callable]) – callbacks to perform after initializing the window.
- **callback_destroy** (List[Callable]) – callbacks to perform after destroying the window.
- **decode_text** (bool) – unwrap quotes if set.
Methods:
- `__init__(title, text, button_text, button_fn)`
- `destroy()` - Destructor.
- `hide()`
| Action | Description |
|--------|-------------|
| Hide the window. | Hide the window. |
| is_visible() | Return True if window is visible. |
| set_text(text) | Set the operation description. |
| show() | Show the window. |
__init__(title: str, text: str, button_text: List[str], button_fn: List[Callable[[], None]], modal: bool = False, callback_addons: List[Callable[[], None]] = [], callback_destroy: List[Callable[[], None]] = [])
### omni.kit.window.file.Prompt Methods
#### `__init__(self, default_files=None, decode_text=True)`
- **default_files**: Default value is `None`.
- **decode_text**: Default value is `True`.
#### `destroy()`
- Destructor.
#### `hide()`
- Hide the window.
#### `is_visible()`
- Returns:
- Return `True` if window is visible.
#### `set_text(text)`
- Set the operation description.
#### `show()`
- Show the window. | 1,961 |
omni.kit.window.file.prompt_if_unsaved_stage.md | # prompt_if_unsaved_stage
## prompt_if_unsaved_stage
```
Check if current stage is dirty. If it’s dirty, ask to save the file, then execute callback. Otherwise runs callback directly.
### Parameters
- **job** (Callable) – function to call upon saving. Function Signature: job() -> None | 287 |
omni.kit.window.file.ReadOnlyOptionsWindow.md | # ReadOnlyOptionsWindow
## ReadOnlyOptionsWindow
```python
class omni.kit.window.file.ReadOnlyOptionsWindow(open_with_new_edit_fn: Callable[[], None], open_original_fn: Callable[[], None], modal: bool = False)
```
**Bases:** `object`
**Description:**
Prompt window class to show when opening a read only file.
**Parameters:**
- **open_with_new_edit_fn** (Callable) – function to call when opening with a new edit layer.
- **open_original_fn** (Callable) – function to call when opening original file.
**Keyword Arguments:**
- **modal** (bool) – True if window is modal.
```
## Methods
| Method Name | Description |
|-------------|-------------|
| `__init__(open_with_new_edit_fn, open_original_fn)` | |
| `destroy()` | Destructor. |
| `hide()` | Hide the window. |
| `is_visible()` | Returns: Return True if window is visible. |
| `show()` | Show the window. |
### __init__(open_with_new_edit_fn: Callable[[], None], open_original_fn: Callable[[], None], modal: bool = False)
### destroy()
Destructor.
### hide()
Hide the window.
### is_visible()
Returns: Return True if window is visible.
### show()
Show the window.
show()
Show the window. | 1,155 |
omni.kit.window.file.register_open_stage_addon.md | # register_open_stage_addon
## register_open_stage_addon
```python
omni.kit.window.file.register_open_stage_addon(callback)
```
Register callback to call when opening a stage.
### Parameters
- **callback** (Callable) – function to call. Function Signature: `callback() -> None`
### Returns
- The callback subscription.
### Return type
- `_CallbackRegistrySubscription` | 373 |
omni.kit.window.file.register_open_stage_complete.md | # register_open_stage_complete
## register_open_stage_complete
```python
omni.kit.window.file.register_open_stage_complete(callback)
```
Register callback to call when finish opening a stage.
### Parameters
- **callback** (`Callable`) – function to call. Function Signature: `callback() -> None`
### Returns
- The callback subscription.
### Return type
- `_CallbackRegistrySubscription` | 391 |
omni.kit.window.file.save.md | # save
## save
```python
omni.kit.window.file.save(on_save_done: Optional[Callable[[bool, str], None]] = None, exit: bool = False, dialog_options: DialogOptions = DialogOptions.NONE)
```
Save currently opened stage to file. Will call Save As for a newly created stage.
### Keyword Arguments
- **on_save_done** (`Callable`): function to call after saving. Function Signature: `on_save_done(result: bool, url: str) -> None`
- **exit** (`bool`): Unused parameter.
- **dialog_options** ([`DialogOptions`](omni.kit.window.file.DialogOptions.html#omni.kit.window.file.DialogOptions)): options for opening the dialog.
---
title: 示例文档
---
# 示例文档标题
这是一段示例文本,用于展示如何将HTML格式转换为Markdown格式。
## 子标题
这里是子标题下的内容。
### 更小的标题
这里是更小的标题下的内容。 | 730 |
omni.kit.window.file.save_as.md | # save_as
## save_as
```python
omni.kit.window.file.save_as(flatten, on_save_done: Optional[Callable[[bool, str], None]] = None)
```
Bring up a file picker to choose a file to save current stage to.
### Parameters
- **flatten** (bool) – Whether to flatten the stage or not.
### Keyword Arguments
- **on_save_done** (Callable) – function to call after saving. Function Signature:
on_save_done(result: bool, url: str) -> None | 429 |
omni.kit.window.file.save_layers.md | # save_layers
## save_layers
Save current layers.
### Parameters
- **new_root_path** (`str`) – path to set the root layer.
- **dirty_layers** (`List[str]`) – layer identifiers to save.
- **on_save_done** (`Callable`) – function to call after saving. Function Signature: `on_save_done(result: bool, url: str) -> None`
### Keyword Arguments
- **create_checkpoint** (`bool`) – true to create checkpoints.
- **checkpoint_comments** (`str`) – comment on the created checkpoint. | 476 |
omni.kit.window.file.StageSaveDialog.md | # StageSaveDialog
## StageSaveDialog
## omni.kit.window.file.StageSaveDialog
### Description
Dialog class for saving stage.
### Keyword Arguments
- **on_save_fn** (Callable) – function to call when clicking ‘Save Selected’ button.
- **on_dont_save_fn** (Callable) – function to call when clicking ‘Don’t Save’ button.
- **on_cancel_fn** (Callable) – function to call when clicking cancel button.
- **enable_dont_save** (bool) – Disable ‘Don’t Save’ button.
### Methods
- **__init__(on_save_fn, on_dont_save_fn, on_cancel_fn, enable_dont_save)**
- Initialize the dialog.
- **destroy()**
- Destructor.
- **is_visible()**
- Returns: True if dialog is visible.
- **show(layer_identifiers)**
- Show the dialog.
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.file.StageSaveDialog.__init__">
<span class="sig-name descname">
<span class="pre">
__init__
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
parent
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
Optional
<span class="p">
<span class="pre">
[
<span class="pre">
QWidget
<span class="p">
<span class="pre">
]
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
None
,
<em class="sig-param">
<span class="n">
<span class="pre">
on_cancel_fn
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
Optional
<span class="p">
<span class="pre">
[
<span class="pre">
Callable
<span class="p">
<span class="pre">
[
<span class="p">
<span class="pre">
[
<span class="p">
<span class="pre">
]
<span class="p">
<span class="pre">
]
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
None
,
<em class="sig-param">
<span class="n">
<span class="pre">
enable_dont_save
<span class="o">
<span class="pre">
=
<span class="default_value">
<span class="pre">
False
<span class="sig-paren">
)
<dd>
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.file.StageSaveDialog.destroy">
<span class="sig-name descname">
<span class="pre">
destroy
<span class="sig-paren">
(
<span class="sig-paren">
)
<dd>
<p>
Destructor.
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.file.StageSaveDialog.is_visible">
<span class="sig-name descname">
<span class="pre">
is_visible
<span class="sig-paren">
(
<span class="sig-paren">
)
<dd>
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
Return True if dialog is visible.
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.file.StageSaveDialog.show">
<span class="sig-name descname">
<span class="pre">
show
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
layer_identifiers
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
List
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
]
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
[]
<span class="sig-paren">
)
<dd>
<p>
Show the dialog.
:keyword layer_identifiers: list of layer identifier URLs.
:kwtype layer_identifiers: List[str]
| 4,412 |
omni.kit.window.filepicker.BaseContextMenu.md | # BaseContextMenu
## BaseContextMenu
```python
class omni.kit.window.filepicker.BaseContextMenu(title: Optional[str] = None, **kwargs)
```
Bases: `object`
Base class popup menu for the hovered FileBrowserItem. Provides API for users to add menu items.
### Methods
- **`__init__(title)`**
- Initialize the BaseContextMenu.
- **`add_menu_item(name, glyph, onclick_fn, show_fn)`**
- Adds menu item, with corresponding callbacks, to this context menu.
- **`delete_menu_item(name)`**
- Deletes the menu item, with the given name, from this context menu.
- **`destroy()`**
- Destroys the context menu.
### Methods
- **destroy**()
- Destructor.
- **hide**()
- Hides the popup menu if it is shown.
- **show**(item[, selected])
- Creates the popup menu from definition for immediate display.
### Attributes
- **context**
- Provides data to the callback.
- **menu**
- `omni.ui.Menu` The menu widget
### Initialization
```python
__init__(title: Optional[str] = None, **kwargs)
```
- Initialize the BaseContextMenu.
- **Keyword Arguments**
- **title** (Optional[str]) – The title of the context menu default `None`.
### Method
```python
add_menu_item(name: str, glyph: str, onclick_fn: Callable, show_fn: Callable, index: int = -1, separator_name: str)
```
- Add a menu item to the context menu.
- **Parameters**
- **name** (str) – The name of the menu item.
- **glyph** (str) – The glyph associated with the menu item.
- **onclick_fn** (Callable) – The function to call when the menu item is clicked.
- **show_fn** (Callable) – The function to call to show the menu item.
- **index** (int) – The index at which to insert the menu item, default is -1 (append).
- **separator_name** (str) – The name of the separator to insert before the menu item.
```
### add_menu_item
Adds menu item, with corresponding callbacks, to this context menu.
#### Parameters
- **name** (str) – Name of the menu item (e.g. ‘Open’), this name must be unique across the context menu.
- **glyph** (str) – Associated glyph to display for this menu item.
- **onclick_fn** (Callable) – This callback function is executed when the menu item is clicked. Function signature: void fn(context: Dict)
- **show_fn** (Callable) – Returns True to display this menu item. Function signature: bool fn(context: Dict). For example, test filename extension to decide whether to display a ‘Play Sound’ action.
- **index** (int) – The position that this menu item will be inserted to.
- **separator_name** (str) – The separator name of the separator menu item. Default to ‘_placeholder_’. When the index is not explicitly set, or if the index is out of range, this will be used to locate where to add the menu item; if specified, the index passed in will be counted from the separator with the provided name. This is for OM-86768 as part of the effort to match Navigator and Kit UX for Filepicker/Content Browser for context menus.
#### Returns
Name of menu item if successful, None otherwise.
#### Return type
str
### delete_menu_item
Deletes the menu item, with the given name, from this context menu.
#### Parameters
- **name** (str) – Name of the menu item (e.g. ‘Open’).
### destroy
Destructor.
### hide
Hides the popup menu if it is shown.
### show
Shows the popup menu if it is shown.
#### Parameters
- **item** (FileBrowserItem)
- **selected** (List[FileBrowserItem]) = None
## omni.kit.window.filepicker.BaseContextMenu.show
Creates the popup menu from definition for immediate display. Receives as input, information about the item. These values are made available to the callback via the ‘context’ dictionary.
### Parameters
- **item** (FileBrowseritem) – Item for which to create menu.
- **selected** ([FileBrowserItem]) – List of currently selected items. Default [].
## omni.kit.window.filepicker.BaseContextMenu.context
Provides data to the callback. Available keys are {‘item’, ‘selected’}
### Type
dict
## omni.kit.window.filepicker.BaseContextMenu.menu
`omni.ui.Menu` The menu widget
### Returns
- Type: obj | 4,051 |
omni.kit.window.filepicker.BookmarkContextMenu.md | # BookmarkContextMenu
## Overview
Creates popup menu for BookmarkItems.
### Methods
| Method | Description |
|--------|-------------|
| `__init__(**kwargs)` | Initialize the BaseContextMenu. |
### Attributes
No attributes listed.
### Detailed Method Description
**`__init__(**kwargs)`**
- **Description**: Initialize the BaseContextMenu.
- **Keyword Arguments**:
- `title` (Optional [str]): The title of the context menu default `None`. | 442 |
omni.kit.window.filepicker.Classes.md | # omni.kit.window.filepicker Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| BaseContextMenu | Base class popup menu for the hovered FileBrowserItem. Provides API for users to add menu items. |
| BookmarkContextMenu | Creates popup menu for BookmarkItems. |
| CollectionContextMenu | Creates popup menu for the hovered FileBrowserItem that are collection nodes. |
| CollectionData | CollectionData holds data and callbacks used to construct a registered collection type with the content browser. |
| ContextMenu | Creates popup menu for the hovered FileBrowserItem. In addition to the set of default actions below, |
| DetailFrameController | |
| DetailView | Detail view that contains all detail frames |
| FilePickerAPI | This class defines the API methods for :obj:`FilePickerWidget`. |
| FilePickerDialog | A popup window for browsing the filesystem and taking action on a selected file. |
| FilePickerExtension | The filepicker extension is not necessarily integral to using the widget. However, it is useful for handling |
| FilePickerModel | |
| Class Name | Description |
|------------|-------------|
| FilePickerModel | The model class for :obj:`FilePickerWidget`. |
| FilePickerView | An embeddable UI component for browsing the filesystem. This widget is more full-functioned |
| FilePickerWidget | An embeddable UI widget for browsing the filesystem and taking action on a selected file. |
| SearchDelegate | |
| SearchResultsItem | Base class for the Filebrowser view Item. |
| SearchResultsModel | Base class for the Filebrowser view Model. |
| TimestampWidget | |
| ToolBar | |
| UdimContextMenu | Creates popup menu for the hovered FileBrowserItem that are Udim nodes. | | 1,733 |
omni.kit.window.filepicker.CollectionContextMenu.md | # CollectionContextMenu
## CollectionContextMenu
```python
class omni.kit.window.filepicker.CollectionContextMenu(**kwargs)
```
Bases: `BaseContextMenu`
Creates popup menu for the hovered FileBrowserItem that are collection nodes.
### Methods
| Method | Description |
|--------|-------------|
| `__init__(**kwargs)` | Initialize the BaseContextMenu. |
### Attributes
| Attribute | Description |
|-----------|-------------|
```python
def __init__(**kwargs):
Initialize the BaseContextMenu.
```
Keyword Arguments:
- `title` (Optional[str]) – The title of the context menu default `None`.
``` | 603 |
omni.kit.window.filepicker.CollectionData.md | # CollectionData
## CollectionData
Bases: `object`
CollectionData holds data and callbacks used to construct a registered collection type with the content browser.
- **identifier**: Key identifier for the collection type
- **title**: Title to display for the collection type in the content browser tree view
- **path_to_icon**: Path to the (svg) icon used in the content browser tree view for the registered collection type
- **model**: Data model inheriting FileBrowserModel for the collection
- **populate_fn**: Callback function that populates the model with pre-existing content items
### Methods
| Method | Description |
|--------|-------------|
### Attributes
- `identifier`
- `title`
- `path_to_icon`
- `model`
- `populate_fn`
### __init__ Method
```python
def __init__(identifier: str, title: str, path_to_icon: str, model: FileBrowserModel, populate_fn: Callable[[], None]) -> None:
pass
```
``` | 916 |
omni.kit.window.filepicker.ContextMenu.md | # ContextMenu
## Overview
Creates popup menu for the hovered FileBrowserItem. In addition to the set of default actions below, users can add more via the add_menu_item API.
### Methods
- `__init__(**kwargs)`
- Creates the ContextMenu for the file picker, including all common menu items
### Attributes
- None listed
## Detailed Description
### `__init__(**kwargs)`
- Creates the ContextMenu for the file picker, including all common menu items | 449 |
omni.kit.window.filepicker.DetailFrameController.md | # DetailFrameController
## DetailFrameController
### omni.kit.window.filepicker.DetailFrameController
**Parameters:**
- glyph: Optional[Callable[[], None]] = None
- build_fn: Optional[Callable[[], None]] = None
- filename_changed_fn: Optional[Callable[[str], None]] = None
- destroy_fn: Optional[Callable[[], None]] = None
- **kwargs
**Bases:**
- object
**Methods:**
- **__init__(glyph, build_fn, filename_changed_fn, destroy_fn, **kwargs)**
- Initialize the Detail Frame.
- **build_header(collapsed, title)**
- Builds the header.
- **build_ui(frame)**
- Builds the UI.
- **destroy()**
- Destructor
- **on_filename_changed(filename)**
- Called when the filename has changed. It will rebuild the detail frame.
- **on_selection_changed(selected)**
- Called when the selection changes.
(glyph: Optional[str] = None,
build_fn: Optional[Callable[[], None]] = None,
selection_changed_fn: Optional[Callable[[List[str]], None]] = None,
filename_changed_fn: Optional[Callable[[str], None]] = None,
destroy_fn: Optional[Callable[[], None]] = None)
### __init__(**kwargs)
Initialize the Detail Frame.
#### Keyword Arguments
- **glyph** (Optional [str]) – The name of the glyph to use for the widget.
- **build_fn** (Callable) – A function that will be called when build the detail frame. Function signature: void build_fn()
- **selection_changed_fn** (Callable) – A function that will be called when the selection changes. Function signature: void selection_changed_fn(list[str])
- **filename_changed_fn** (Callable) – A function that will be called when the filename of current item changes. Function signature: void filename_changed_fn(str)
- **destroy_fn** (Callable) – A function that will be called when the widget is destroyed. Function signature: void destroy_fn()
### build_header(collapsed: bool, title: str)
Builds the header. It is used to show the header of the DetailFrame.
- :param collapsed: True if the header is collapsed.
- :type collapsed: bool
- :param title: title of the header to be shown.
- :type title: str
### build_ui(frame: Frame)
Builds the UI.
- :param frame: The frame that will be used to build the UI.
- :type frame: ui.Frame
### destroy()
Destructor
### on_filename_changed(filename: str)
Called when the filename has changed. It will rebuild the detail frame.
- Parameters
- **filename** (str) – The filename that has changed.
### on_selection_changed(selected: List[str])
Called when the selection has changed.
- Parameters
- **selected** (List[str]) – The list of selected items.
## Omni.Kit.Window.FilePicker.DetailFrameController.on_selection_changed
### Description
Called when the selection changes. It will rebuild the detail frame.
### Keywords Args
- selected(List[str]): List of selected items’s path. | 2,772 |
omni.kit.window.filepicker.DetailView.md | # DetailView
## DetailView
```python
class omni.kit.window.filepicker.DetailView(**kwargs)
```
Bases: `object`
Detail view that contains all detail frames
### Methods
| Method | Description |
|--------|-------------|
| `__init__(**kwargs)` | |
| `add_detail_frame(name, glyph, build_fn[, ...])` | Adds sub-frame to the detail view, and populates it with a custom built widget. |
| `add_detail_frame_from_controller(name[, ...])` | Adds sub-frame to the detail view, and populates it with a custom built widget. |
| `delete_detail_frame(name)` | Deletes the specified detail frame. |
| `destroy()` | Destructor |
| `get_detail_frame()` | |
```
| Method | Description |
| ------ | ----------- |
| `get_detail_frame(name)` | Get the detail frame by given name. |
| `on_filename_changed([filename])` | When the user edits the filename, invokes the callbacks for the detail frames. |
| `on_selection_changed([selected])` | When the user changes their filebrowser selection(s), invokes the callbacks for the detail frames. |
### `__init__(**kwargs)`
### `add_detail_frame(name: str, glyph: str, build_fn: Callable[[], Widget], selection_changed_fn: Optional[Callable[[List[str]], None]] = None, filename_changed_fn: Optional[Callable[[str], None]] = None)`
### add_detail_frame
```python
add_detail_frame(
name: str,
glyph: str,
build_fn: Callable[[Widget], None] = None,
selection_changed_fn: Optional[Callable[[Widget], None]] = None,
filename_changed_fn: Optional[Callable[[Widget], None]] = None,
destroy_fn: Optional[Callable[[Widget], None]] = None
)
```
Adds sub-frame to the detail view, and populates it with a custom built widget.
**Parameters**
- **name** (str) – Name of the widget sub-section, this name must be unique over all detail sub-sections.
- **glyph** (str) – Associated glyph to display for this sub-section
- **build_fn** (Callable) – This callback function builds the widget.
**Keyword Arguments**
- **selection_changed_fn** (Callable) – This callback is invoked to handle selection changes.
- **filename_changed_fn** (Callable) – This callback is invoked when filename is changed.
- **destroy_fn** (Callable) – Cleanup function called when destroyed.
### add_detail_frame_from_controller
```python
add_detail_frame_from_controller(
name: str,
detail_frame: Optional[DetailFrameController] = None
)
```
Adds sub-frame to the detail view, and populates it with a custom built widget.
**Parameters**
- **name** (str) – Name of the widget sub-section, this name must be unique over all detail sub-sections.
- **controller** (DetailFrameController) – Controller object that encapsulates all aspects of creating, updating, and deleting a detail frame widget.
### delete_detail_frame
Deletes the specified detail frame.
#### Parameters
- **name** (str) – Name of the detail frame.
### destroy
Destructor
### get_detail_frame
Get the detail frame by given name. This method is thread safe. Use with caution
#### Parameters
- **name** – Name of the detail frame
#### Returns
- obj:’DetailFrameController’ with given name or None if not found
### on_filename_changed
When the user edits the filename, invokes the callbacks for the detail frames.
#### Parameters
- **filename** (str) – Current filename.
### on_selection_changed
When the user changes their filebrowser selection(s), invokes the callbacks for the detail frames.
#### Parameters
- **selected** (List[FileBrowserItem]) – List of new selections. | 3,472 |
omni.kit.window.filepicker.FilePickerAPI.md | # FilePickerAPI
## FilePickerAPI
```python
class omni.kit.window.filepicker.FilePickerAPI(model: Optional[FilePickerModel] = None, view: Optional[FilePickerView] = None)
```
Bases: `object`
This class defines the API methods for `FilePickerWidget`.
### Methods
| Method | Description |
|--------|-------------|
| `__init__(model, view)` | Initialize the FilePickerAPI. |
- `add_collection(collection_data)`
- Add custom collection to current content view.
- `add_connections(connections)`
- Adds specified server connections to the tree browser.
- `add_context_menu(name, glyph, click_fn, show_fn)`
- Adds menu item, with corresponding callbacks, to the context menu.
- `add_detail_frame(name, glyph, build_fn[, ...])`
- Adds sub-frame to the detail view, and populates it with a custom built widget.
- `add_detail_frame_from_controller(name, ...)`
- Adds sub-frame to the detail view, and populates it with a custom built widget.
- `add_listview_menu(name, glyph, click_fn, show_fn)`
- Adds menu item, with corresponding callbacks, to the list view menu.
- `add_show_only_collection(collection_id)`
- Add a filter to show collections.
- `connect_server(url[, callback])`
- Connects the server for given url.
- `delete_context_menu(name)`
- Deletes the menu item, with the given name, from the context menu.
- `delete_detail_frame(name)`
- Deletes the specified detail subsection.
- `delete_listview_menu(name)`
- Deletes the menu item, with the given name, from the list view menu.
- `destroy()`
- Destructor.
- `find_subdirs_async(url, callback)`
- Asynchronously executes callback on list of subdirectories at given url.
- `find_subdirs_with_callback(url, callback)`
- Executes callback on list of subdirectories at given url.
- `get_current_directory()`
- Returns the current directory from the browser bar.
- `get_current_selections([pane])`
- Returns current selected as list of system path names.
- `get_filename()`
- Currently selected filename.
- `hide_loading_pane()`
- Hide the loading icon if it exists.
- `navigate_to(url[, callback])`
- Navigates to the given url, expanding all parent directories in the path.
- `navigate_to_async(url[, callback])`
- Asynchronously navigates to the given url, expanding all parent directories in the path.
- `refresh_current_directory()`
- Refreshes the current directory set in the browser bar.
- `remove_collection(collection_id)`
- Remove custom collection from current content view.
- `remove_show_only_collection(collection_id)`
- Remove the collection filter.
- `select_items_async(url[, filenames])`
- Asynchronously select one or more items in the content view.
- `set_current_directory(path)`
- Procedurally sets the current directory.
- `set_filename(filename)`
- Sets the filename in the file bar, at the bottom of the dialog.
- `set_search_delegate(delegate)`
- Sets a custom search delegate for the toolbar.
- `show_model(model)`
- (Description not provided in HTML)
| Displays the given model in the list view, overriding the default model. |
| --- |
| Subscribe to omni.client bookmark changes. |
| Adds/deletes the given bookmark with the specified path. |
### __init__
```python
__init__(model: Optional[FilePickerModel] = None, view: Optional[FilePickerView] = None)
```
Initialize the FilePickerAPI.
**Parameters**
- **model** (FilePickerModel) – The model background, default None.
- **view** (FilePickerView) – The content view object. Default None.
### add_collection
```python
add_collection(collection_data: CollectionData)
```
Add custom collection to current content view.
Samples of collection: “My Computer”, “Omniverse Bookmark”, …
**Parameters**
- **collection_data** (CollectionData) – Data to add.
### add_connections
```python
add_connections(connections: dict)
```
Adds specified server connections to the tree browser. To facilitate quick startup time, doesn’t check whether the connection is actually valid.
**Parameters**
- **connections** (dict) – Connections to add.
```
**connections** (**dict**) – A dictionary of name, path pairs. For example: {"C:": "C:", "ov-content": "omniverse://ov-content"}. Paths to Omniverse servers should be prefixed with “omniverse://”.
### add_context_menu
Adds menu item, with corresponding callbacks, to the context menu.
#### Parameters
- **name** (**str**) – Name of the menu item (e.g. ‘Open’), this name must be unique across the context menu.
- **glyph** (**str**) – Associated glyph to display for this menu item.
- **click_fn** (**Callable**) – This callback function is executed when the menu item is clicked. Function signature: void fn(name: str, path: str), where name is menu name and path is absolute path to clicked item.
- **show_fn** (**Callable**) – Returns True to display this menu item. Function signature: bool fn(path: str). For example, test filename extension to decide whether to display a ‘Play Sound’ action.
- **index** (**int**) – The position that this menu item will be inserted to.
- **separator_name** (**str**) – The separator name of the separator menu item. Default to ‘_placeholder_’. When the index is not explicitly set, or if the index is out of range, this will be used to locate where to add the menu item; if specified, the index passed in will be counted from the separator with the provided name. This is for OM-86768 as part of the effort to match Navigator and Kit UX for Filepicker/Content Browser for context menus.
#### Returns
Name of menu item if successful, None otherwise.
#### Return type
str
### add_detail_frame
(Markdown for this section is incomplete as the HTML snippet provided is cut off.)
### Parameters
- **name** (str) – Name of the widget sub-section, this name must be unique over all detail sub-sections.
- **glyph** (str) – Associated glyph to display for this subj-section
- **build_fn** (Callable) – This callback function builds the widget.
### Keyword Arguments
- **selection_changed_fn** (Callable) – This callback is invoked to handle selection changes.
- **filename_changed_fn** (Callable) – This callback is invoked to handle filename changes.
- **destroy_fn** (Callable) – This callback is invoked to handle destruction of the widget.
Adds sub-frame to the detail view, and populates it with a custom built widget.
### FilePickerAPI Methods
#### add_detail_frame_from_controller
```python
add_detail_frame_from_controller(name: str, controller: DetailFrameController)
```
Adds sub-frame to the detail view, and populates it with a custom built widget.
**Parameters:**
- **name** (str) – Name of the widget sub-section, this name must be unique over all detail sub-sections.
- **controller** (DetailFrameController) – Controller object that encapsulates all aspects of creating, updating, and deleting a detail frame widget.
#### add_listview_menu
```python
add_listview_menu(name: str, glyph: str, click_fn: Callable, show_fn: Callable, index: int = -1) -> str
```
Adds menu item, with corresponding callbacks, to the list view menu.
**Parameters:**
- **name** (str) – Name of the menu item (e.g. ‘Open’), this name must be unique across the list view menu.
- **glyph** (str) – Associated glyph to display for this menu item.
- **click_fn** (Callable) – This callback function is executed when the menu item is clicked. Function signature: void fn(name: str, path: str), where name is menu name and path is absolute path to clicked item.
- **show_fn** (Callable) – Returns True to display this menu item. Function signature: bool fn(path: str). For example, test filename extension to decide whether to display a ‘Play Sound’ action.
### add_menu
Adds a new menu item to the specified position.
#### Parameters
- **index** (int) – The position that this menu item will be inserted to.
#### Returns
- Name of menu item if successful, None otherwise.
#### Return type
- str
### add_show_only_collection
Add a filter to show collections. If this collection filter is provided, only those that match the filter will be shown, other collections will be hidden. Otherwise all collections are shown.
#### Parameters
- **collection_id** (str) – the filter.
### connect_server
Connects the server for given url.
#### Parameters
- **url** (str) – Given url.
- **callback** (Callable) – On successfully connecting the server, executes this callback. Function signature: void callback(name: str, server_url: str)
### delete_context_menu
Deletes the menu item, with the given name, from the context menu.
#### Parameters
- **name** (str) – Name of the menu item (e.g. ‘Open’).
### delete_detail_frame
Deletes the specified detail subsection.
#### Parameters
- **name** (str) – Name previously assigned to the detail frame.
### delete_listview_menu
Deletes the menu item, with the given name, from the list view menu.
**Parameters**
- **name** (str) – Name of the menu item (e.g. ‘Open’).
### destroy
Destructor.
### find_subdirs_async
Asynchronously executes callback on list of subdirectories at given url.
**Parameters**
- **url** (str) – Url.
- **callback** (Callable) – On success executes this callback with the list of subdir names. Function signature: void callback(subdirs: List[str])
### find_subdirs_with_callback
Executes callback on list of subdirectories at given url.
**Parameters**
- **url** (str) – Url.
- **callback** (Callable) – On success executes this callback with the list of subdir names. Function signature: void callback(subdirs: List[str])
### get_current_directory
Returns the current directory from the browser bar.
**Returns**
- The system path, which may be different from the displayed path.
### get_current_selections
Returns current selected as list of system path names.
**Parameters**
- **pane** (int) – Specifies pane to retrieve selections from, one of {TREEVIEW_PANE = 1, LISTVIEW_PANE = 2, BOTH = None}. Default LISTVIEW_PANE.
**Returns**
- List of system paths (which may be different from displayed paths, e.g. bookmarks)
**Return type**
- [str]
### get_filename
Returns currently selected filename.
**Return type**
- str
### hide_loading_pane
Hide the loading icon if it exists.
### navigate_to
Navigates to the given url, expanding all parent directories in the path.
**Parameters**
- **url** (str) – The url to navigate to.
- **callback** (Callable) – On successfully finding the item, executes this callback. Function signature: void callback(item: FileBrowserItem)
### navigate_to_async
async navigate_to_async(url: str)
### navigate_to_async
Asynchronously navigates to the given url, expanding the all parent directories in the path.
#### Parameters
- **url** (`str`) – The url to navigate to.
- **callback** (`Callable`) – On successfully finding the item, executes this callback. Function signature: `void callback(item: FileBrowserItem)`
### refresh_current_directory
Refreshes the current directory set in the browser bar.
### remove_collection
Remove custom collection from current content view.
#### Parameters
- **collection_id** (`str`) – Data id to remove.
### remove_show_only_collection
Remove the collection filter
#### Parameters
- **collection_id** (`str`) – The filter that previously added.
### select_items_async
Asynchronously selects the specified items.
#### Parameters
- **url** (`str`) – The url to navigate to.
- **filenames** (`List[str]`) – The filenames to select, defaults to `[]`
#### Returns
- `List[str]`
### Asynchronously select one or more items in the content view.
#### Parameters
- **url** (str) – Url.
#### Keyword Arguments
- **filenames** (List[str]) – A list of file names that to be selected
### Procedurally sets the current directory. Use this method to set the path in the browser bar.
#### Parameters
- **path** (str) – The full path name of the folder, e.g. “omniverse://ov-content/Users/me.
### Sets the filename in the file bar, at bottom of the dialog. The file is not required to already exist.
#### Parameters
- **filename** (str) – The filename only (and not the fullpath), e.g. “myfile.usd”.
### Sets a custom search delegate for the tool bar.
#### Parameters
- **delegate** (SearchDelegate) – Object that creates the search widget.
### Displays the given model in the list view, overriding the default model. For example, this model might be the result of a search.
#### Parameters
- **model** (FileBrowserModel) – Model to display.
### Subscribe to omni.client bookmark changes.
### toggle_bookmark_from_path(name: str, path: str, is_bookmark: bool, is_folder: bool = True)
Adds/deletes the given bookmark with the specified path. If deleting, then the path argument is optional.
#### Parameters
- **name** (str) – Name to call the bookmark or existing name if delete.
- **path** (str) – Path to the bookmark.
- **is_bookmark** (bool) – True to add, False to delete.
- **is_folder** (bool) – Whether the item to be bookmarked is a folder. | 12,872 |
omni.kit.window.filepicker.FilePickerDialog.md | # FilePickerDialog
## FilePickerDialog
```
class omni.kit.window.filepicker.FilePickerDialog(title: str, **kwargs)
```
Bases: `object`
A popup window for browsing the filesystem and taking action on a selected file. Includes a browser bar for keyboard input with auto-completion for navigation of the tree view. For similar but different options, see also `FilePickerWidget` and `FilePickerView`.
### Parameters
- **title** (str) – Window title. Default None.
### Keyword Arguments
- **width** (int) – Window width. Default 1000.
- **height** (int) – Window height. Default 600.
- **click_apply_handler** (Callable) – Function that will be called when the user accepts the selection. Function signature: apply_handler(file_name: str, dir_name: str) -> None.
- **click_cancel_handler** (Callable) – Function that will be called when the user clicks the cancel button. Function signature: cancel_handler(file_name: str, dir_name: str) -> None.
- **other** – Additional args listed for `FilePickerWidget`.
### Methods
```
| Method Name | Description |
|-------------|-------------|
| `__init__(title, **kwargs)` | |
| `add_connections(connections)` | Adds specified server connections to the browser. |
| `add_detail_frame_from_controller(name, ...)` | Adds subsection to the detail view, and populate it with a custom built widget. |
| `delete_detail_frame(name)` | Deletes the named detail frame. |
| `destroy()` | Destructor. |
| `get_current_directory()` | Returns the current directory from the browser bar. |
| `get_current_selections([pane])` | Returns current selected as list of system path names. |
| `get_file_extension()` | Currently selected filename extension. |
| `get_file_extension_options()` | List of all extension options strings. |
| `get_file_postfix()` | Currently selected postfix. |
| `get_file_postfix_options()` | List of all postfix strings. |
| `get_filebar_label_name()` | Currently text of name label for file bar. |
| `get_filename()` | |
- `get_filename()`
- Returns: Currently selected filename.
- `hide()`
- Hides this dialog.
- `navigate_to(path)`
- Navigates to a path, i.e. the path's parent directory will be expanded and leaf selected.
- `refresh_current_directory()`
- Refreshes the current directory set in the browser bar.
- `set_click_apply_handler(click_apply_handler)`
- Sets the function to execute upon clicking apply.
- `set_current_directory(path)`
- Procedurally sets the current directory path.
- `set_file_extension(extension)`
- Sets the file extension in the file bar.
- `set_file_postfix(postfix)`
- Sets the file postfix in the file bar.
- `set_filebar_label_name(name)`
- Sets the text of the name label for filebar, at the bottom of dialog.
- `set_filename(filename)`
- Sets the filename in the file bar, at bottom of the dialog.
- `set_item_filter_fn(item_filter_fn)`
- Sets the item filter function.
- `set_search_delegate(delegate)`
- Sets a custom search delegate for the tool bar.
- `set_visibility_changed_listener(listener)`
- Call the given handler when window visibility is changed.
- `show([path])`
- Shows this dialog.
- `show_model()`
- (Description not provided in HTML)
### Functions
- **show_model** *(model)*
- Displays the given model in the list view, overriding the default model.
- **toggle_bookmark_from_path** *(name, path, ...[, ...])*
- Adds/deletes the given bookmark with the specified path.
### Attributes
- **current_filter_option**
- Index of current filter option, range 0.
### Methods
- **__init__** *(title: str, **kwargs)*
- Initialize the dialog with a title and additional keyword arguments.
- **add_connections** *(connections: dict)*
- Adds specified server connections to the browser.
- Parameters:
- **connections** *(dict)* – A dictionary of name, path pairs. For example: {"C:": "C:", "ov-content": "omniverse://ov-content"}. Paths to Omniverse servers should be prefixed with "omniverse://".
- **add_detail_frame_from_controller** *(name: str, controller: DetailFrameController)*
- Adds subsection to the detail view, and populate it with a custom built widget.
- Parameters:
- **name** *(str)* – Name of the widget sub-section, this name must be unique over all detail sub-sections.
- **controller** *(DetailFrameController)* – Controller object that encapsulates all aspects of creating, updating, and deleting a detail frame widget.
- Returns:
- Handle to created widget.
- Return type:
- ui.Widget
- **delete_detail_frame** *(name: str)*
- Deletes the detail frame with the specified name.
- Parameters:
- **name** *(str)* – Name of the detail frame to be deleted.
<em class="sig-param">
<span class="n">
<span class="pre">
name
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
<span class="sig-paren">
)
<dd>
<p>
Deletes the named detail frame.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<p>
<strong>
name
(
<em>
str
) – Name of the frame.
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.filepicker.FilePickerDialog.destroy">
<span class="sig-name descname">
<span class="pre">
destroy
<span class="sig-paren">
(
<span class="sig-paren">
)
<dd>
<p>
Destructor.
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.filepicker.FilePickerDialog.get_current_directory">
<span class="sig-name descname">
<span class="pre">
get_current_directory
<span class="sig-paren">
(
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
str
<dd>
<p>
Returns the current directory from the browser bar.
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
The system path, which may be different from the displayed path.
<dt class="field-even">
Return type
<dd class="field-even">
<p>
str
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.filepicker.FilePickerDialog.get_current_selections">
<span class="sig-name descname">
<span class="pre">
get_current_selections
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
pane
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
2
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
List
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
]
<dd>
<p>
Returns current selected as list of system path names.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<p>
<strong>
pane
(
<em>
int
) – Specifies pane to retrieve selections from, one of {TREEVIEW_PANE = 1, LISTVIEW_PANE = 2,
BOTH = None}. Default LISTVIEW_PANE.
<dt class="field-even">
Returns
<dd class="field-even">
<p>
List of system paths (which may be different from displayed paths, e.g. bookmarks)
<dt class="field-odd">
Return type
<dd class="field-odd">
<p>
[str]
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.filepicker.FilePickerDialog.get_file_extension">
<span class="sig-name descname">
<span class="pre">
get_file_extension
<span class="sig-paren">
(
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
str
<dd>
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
Currently selected filename extension.
<dt class="field-even">
Return type
<dd class="field-even">
<p>
str
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.filepicker.FilePickerDialog.get_file_extension_options">
<span class="sig-name descname">
<span class="pre">
get_file_extension_options
<span class="sig-paren">
(
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
List
<span class="p">
<span class="pre">
[
<span class="pre">
Tuple
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
str
<span class="p">
<span class="pre">
]
<dd>
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
Currently selected filename extension.
<dt class="field-even">
Return type
<dd class="field-even">
<p>
str
### get_file_extension_options
**Returns:** List of all extension options strings.
**Return type:** List[str]
### get_file_postfix
**Returns:** Currently selected postfix.
**Return type:** str
### get_file_postfix_options
**Returns:** List of all postfix strings.
**Return type:** List[str]
### get_filebar_label_name
**Returns:** Currently text of name label for file bar.
**Return type:** str
### get_filename
**Returns:** Currently selected filename.
**Return type:** str
### hide
Hides this dialog. Automatically called when “Cancel” buttons is clicked.
### navigate_to
Navigates to a path, i.e. the path’s parent directory will be expanded and leaf selected.
**Parameters:**
- **path** (str) – The path to navigate to.
### refresh_current_directory()
Refreshes the current directory set in the browser bar.
### set_click_apply_handler(click_apply_handler: Callable[[str, str], None])
Sets the function to execute upon clicking apply.
#### Parameters
- **click_apply_handler** (Callable) – Callback with filename being the name of the file, and dirname being the containing directory path with an ending slash.
Function Signature is fn(filename: str, dirname: str) -> None
### set_current_directory(path: str)
Procedurally sets the current directory path.
#### Parameters
- **path** (str) – The full path name of the folder, e.g. “omniverse://ov-content/Users/me.
#### Raises
- **RuntimeWarning** – If path doesn’t exist or is unreachable.
### set_file_extension(extension: str)
Sets the file extension in the file bar.
### set_file_postfix(postfix: str)
Sets the file postfix in the file bar.
### set_filebar_label_name(name: str)
Sets the text of the name label for filebar, at the bottom of dialog.
#### Parameters
- **name** (str) – The text to display as the label name.
- **filename** (**str**) – By default, it’s “File name” if it’s not set. For some scenarios that,
- **folder** (**it only allows to choose**) –
- **UX.** (**it can be configured with this API for better**) –
### set_filename
- **Sets the filename in the file bar, at bottom of the dialog.**
- **Parameters**
- **filename** (**str**) – The filename only (and not the fullpath), e.g. “myfile.usd”.
### set_item_filter_fn
- **Sets the item filter function.**
- **Parameters**
- **item_filter_fn** (**Callable**) – Signature is bool fn(item: FileBrowserItem)
### set_search_delegate
- **Sets a custom search delegate for the tool bar.**
- **Parameters**
- **delegate** (**SearchDelegate**) – Object that creates the search widget.
### set_visibility_changed_listener
- **Call the given handler when window visibility is changed.**
- **Parameters**
- **listener** (**Callable**) – Handler with signature listener[visible: bool).
### show
- **...**
## show
Shows this dialog. Currently pops up atop all other windows but is not completely modal, i.e. does not take over input focus.
### Parameters
- **path** (`str`) – If optional path is specified, then navigates to it upon startup.
## show_model
Displays the given model in the list view, overriding the default model. For example, this model might be the result of a search.
### Parameters
- **model** (`FileBrowserModel`) – Model to display.
## toggle_bookmark_from_path
Adds/deletes the given bookmark with the specified path. If deleting, then the path argument is optional.
### Parameters
- **name** (`str`) – Name to call the bookmark or existing name if delete.
- **path** (`str`) – Path to the bookmark.
- **is_bookmark** (`bool`) – True to add, False to delete.
- **is_folder** (`bool`) – Whether the item to be bookmarked is a folder.
## current_filter_option
Index of current filter option, range 0 .. num_filter_options.
### Type
<p>
int
| 12,490 |
omni.kit.window.filepicker.FilePickerExtension.md | # FilePickerExtension
## FilePickerExtension
The filepicker extension is not necessarily integral to using the widget. However, it is useful for handling singleton tasks for the class.
### Methods
| Method | Description |
| ------ | ----------- |
| `on_shutdown()` | |
| `on_startup(ext_id)` | |
### `__init__(self: omni.ext._extensions.IExt) -> None` | 358 |
omni.kit.window.filepicker.FilePickerModel.md | # FilePickerModel
## Methods
- `__init__(**kwargs)`
- `destroy()`
- Destructor
- `find_item_async(url[, callback])`
- Searches model for the given path and executes callback on found item.
- `find_item_in_subtree_async(root, path)`
- Finds the given item in the current model recursively asynchronously.
- `find_item_with_callback(path)`
- Searches model for the given path and executes callback on found item.
| Method | Description |
|--------|-------------|
| `get_badges(item)` | Returns fullpaths to badges for given item. |
| `get_icon(item, expanded)` | Returns fullpath to icon for given item. |
| `get_thumbnail(item)` | Returns fullpath to thumbnail for given item. |
| `is_local_path(path)` | Returns True if given path is a local path |
| `sanitize_path(path)` | Helper function for normalizing a path that may have been copied and pasted into browser bar. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `collections` | The collections loaded for this widget |
### Methods
```python
def __init__(**kwargs):
pass
```
```python
def destroy():
"""
Destructor
"""
```
```python
async def find_item_async(url: str, callback: Optional[Callable] = None) -> FileBrowserItem:
"""
Searches model for the given path and executes callback on found item.
Parameters:
- url (str): Url of item to search for.
- callback (Optional[Callable]): Optional callback function to execute when the item is found.
"""
### find_item_in_subtree_async
```python
async find_item_in_subtree_async(root: FileBrowserItem, path: str) -> FileBrowserItem
```
Finds the given item in the current model recursively asynchronously.
**Parameters:**
- **root** (FileBrowserItem): The root item to search.
- **path** (str): Path of item to search for.
**Returns:**
- obj: 'FileBrowserItem': item that has the path and under the root item.
---
### find_item_with_callback
```python
find_item_with_callback(url: str, callback: Optional[Callable] = None)
```
Searches filebrowser model for the item with the given url. Executes callback on found item.
**Parameters:**
- **url** (str): Url of item to search for.
- **callback** (Callable): Invokes this callback on found item or None if not found. Function signature is `void callback(item: FileBrowserItem)`.
---
### get_badges
```python
get_badges(item: FileBrowserItem) -> List[Tuple[str, str]]
```
Returns fullpaths to badges for given item. Override this method to implement custom badges.
**Parameters:**
- **item** (FileBrowserItem): The item to get badges for.
**Returns:**
- List[Tuple[str, str]]: List of tuples containing badge information.
### Parameters
- **item** (`FileBrowseritem`) – Item in question.
### Returns
- Where each tuple is an (icon path, tooltip string) pair.
### Return type
- List[Tuple[str, str]]
### get_icon
- **Parameters**
- **item** (`FileBrowseritem`) – Item in question.
- **expanded** (bool) – True if item is expanded.
- **Returns**
- str
### get_thumbnail
- **Parameters**
- **item** (`FileBrowseritem`) – Item in question.
- **Returns**
- Fullpath to the thumbnail file, None if not found.
- **Return type**
- str
### is_local_path
- **Parameters**
- **path** (str)
- **Returns**
- bool
### sanitize_path
- **Parameters**
- **path** (str)
- **Returns**
- str
## Helper Function for Normalizing a Path
### Description
Helper function for normalizing a path that may have been copied and pasted into browser bar. This makes the tool more resilient to user inputs from other apps.
### Parameters
- **path** (str) – Raw path
### Returns
- str
## Property: collections
### Description
The collections loaded for this widget
### Type
- [FileBrowseItem] | 3,728 |
omni.kit.window.filepicker.FilePickerView.md | # FilePickerView
## FilePickerView
```
class omni.kit.window.filepicker.FilePickerView(title: str, **kwargs)
```
Bases: `object`
An embeddable UI component for browsing the filesystem. This widget is more full-functioned than `FileBrowserWidget` but less so than `FilePickerWidget`. More specifically, this is one of the 3 sub-components of its namesake `FilePickerWidget`. The difference is it doesn’t have the Browser Bar (at top) or the File Bar (at bottom). This gives users the flexibility to substitute in other surrounding components instead.
### Parameters
- **title** (str) – Widget title. Default None.
### Keyword Arguments
- **layout** (int) – The overall layout of the window, one of: {LAYOUT_SPLIT_PANES, LAYOUT_SINGLE_PANE_SLIM, LAYOUT_SINGLE_PANE_WIDE, LAYOUT_DEFAULT}. Default LAYOUT_SPLIT_PANES.
- **splitter_offset** (int) – Position of vertical splitter bar. Default 300.
- **show_grid_view** (bool) – Display grid view in the intial layout. Default True.
- **show_recycle_widget** (bool) – Display recycle widget in the intial layout. Default False.
- **grid_view_scale** (int) –
```
- **scales_grid_view** (`Callable`) – Scales grid view, ranges from 0-5. Default 2.
- **on_toggle_grid_view_fn** (`Callable`) – Callback after toggle grid view is executed. Default None.
- **on_scale_grid_view_fn** (`Callable`) – Callback after scale grid view is executed. Default None.
- **show_only_collections** (`list[str]`) – List of collections to display, any combination of ["bookmarks", "omniverse", "my-computer"]. If None, then all are displayed. Default None.
- **tooltip** (`bool`) – Display tooltips when hovering over items. Default True.
- **allow_multi_selection** (`bool`) – Allow multiple items to be selected at once. Default False.
- **mouse_pressed_fn** (`Callable`) – Function called on mouse press. Function signature: void mouse_pressed_fn(pane: int, button: int, key_mode: int, item: FileBrowserItem)
- **mouse_double_clicked_fn** (`Callable`) – Function called on mouse double click. Function signature: void mouse_double_clicked_fn(pane: int, button: int, key_mode: int, item: FileBrowserItem)
- **selection_changed_fn** (`Callable`) – Function called when selection changed. Function signature: void selection_changed_fn(pane: int, selections: list[FileBrowserItem])
- **drop_handler** (`Callable`) – Function called to handle drag-n-drops. Function signature: void drop_fn(dst_item: FileBrowserItem, src_paths: [str])
- **item_filter_fn** (`Callable`) – This handler should return True if the given tree view item is visible, False otherwise. Function signature: bool item_filter_fn(item: FileBrowserItem)
- **thumbnail_provider** (`Callable`) – This callback returns the path to the item’s thumbnail. If not specified, then a default thumbnail is used. Signature: str thumbnail_provider(item: FileBrowserItem).
- **icon_provider** (`Callable`) – This callback provides an icon to replace the default in the tree view. Signature str icon_provider(item: FileBrowserItem)
- **badges_provider** (`Callable`) – This callback provides the list of badges to layer atop the thumbnail in the grid view. Callback signature: [str] badges_provider(item: FileBrowserItem)
- **treeview_identifier** (`str`) – widget identifier for treeview, only used by tests.
- **enable_zoombar** (`bool`) – Enables/disables zoombar. Default True.
### Methods
- `__init__(title, **kwargs)`
- `add_bookmark(name, path[, is_folder, ...])` - Creates a FileBrowserModel rooted at the given path, and connects its subtree to the tree view.
- `add_custom_collection(collection_data)`
- `add_server()`
- `add_server`(name, path[, publish_event, ...])
- Creates a `FileBrowserModel` rooted at the given path, and connects its subtree to the tree view.
- `all_collection_items`([collection])
- Returns all connections as items for the specified collection.
- `delete_bookmark`(item[, publish_event])
- Deletes the given bookmark.
- `delete_server`(item[, publish_event])
- Disconnects the subtree rooted at the given item.
- `destroy`()
- Destructor
- `get_connection_with_url`(url)
- Gets the connection item with the given url.
- `get_root`([pane])
- Returns the root item of the specified pane.
- `get_selections`([pane])
- Returns list of currently selected items.
- `has_connection_with_name`(name[, collection])
- Returns True if named connection exists within the collection.
- `hide_notification`()
- Utility to hide the notification frame.
- `is_bookmark`(item[, path])
- Returns true if given item is a bookmarked item, or if a given path is bookmarked.
- `is_collection_node`(item)
- Returns true if given item is a collection node.
- `is_collection_root`([url])
- Returns True if the given url is a collection root url.
- `is_connected`(url)
- Check if a server is connected.
- `is_connection_point`(item)
- Returns true if given item is a connection point.
- `is_connection_point` (item)
- Returns true if given item is a direct child of a collection node.
- `is_local_point` (item)
- Returns true if given item is a direct child of a my-computer's node.
- `log_out_server` (item)
- Log out from the server at the given path.
- `mount_user_folders` (folders)
- Mounts given set of user folders under the local collection.
- `reconnect_server` (item)
- Reconnects the server at the given path.
- `refresh_ui` ([item])
- Redraws the subtree rooted at the given item.
- `remove_collection` (collection_id)
-
- `rename_bookmark` (item, new_name, new_url[, ...])
- Renames the bookmark item.
- `rename_server` (item, new_name[, publish_event])
- Renames the connection item.
- `scale_grid_view` (scale)
- Scale file picker's grid view icon size.
- `select_and_center` (item)
- Selects and centers the view on the given item, expanding the tree if needed.
- `set_item_filter_fn` (item_filter_fn)
- Sets the item filter function.
- `set_selections` (selections[, pane])
- Selected given items in given pane.
- `show_connect_dialog` ()
- Displays the add connection dialog.
- `show_model` (model)
- Displays the model on the right side of the split pane
| Method | Description |
| ------ | ----------- |
| `show_notification()` | Utility to show the notification frame. |
| `toggle_grid_view(show_grid_view)` | Toggles file picker between grid and list view. |
### Attributes
| Attribute | Description |
| --------- | ----------- |
| `collections` | Dictionary of collections, e.g. |
| `filebrowser` | Gets the filebrowser of this view. |
| `notification_frame` | The notification frame. |
| `show_grid_view` | Gets file picker stage of grid or list view. |
| `show_only_collections` | Gets the collections list only to show. |
| `show_udim_sequence` | Whether or not to show UDIM sequence. |
### Methods
#### `__init__(title: str, **kwargs)`
#### `add_bookmark(name: str, path: str, is_folder: bool = True, publish_event: bool = True)`
### add_bookmark
```python
add_bookmark(name: str, path: str, is_folder: bool = True, publish_event: bool = True) -> BookmarkItem
```
Creates a `FileBrowserModel` rooted at the given path, and connects its subtree to the tree view.
#### Parameters
- **name** (str) – Name of the bookmark.
- **path** (str) – Fullpath of the connection, e.g. “omniverse://ov-content”. Paths to Omniverse servers should contain the prefix, “omniverse://”.
- **is_folder** (bool) – If the item to be bookmarked is a folder or not. Default to True.
- **publish_event** (bool) – If True, push a notification to the event stream.
#### Returns
`BookmarkItem`
### add_server
```python
add_server(name: str, path: str, publish_event: bool = True, auto_select: bool = True) -> FileBrowserModel
```
Creates a `FileBrowserModel` rooted at the given path, and connects its subtree to the tree view.
#### Parameters
- **name** (str) – Name, label really, of the connection.
- **path** (str) – Fullpath of the connection, e.g. “omniverse://ov-content”. Paths to Omniverse servers should contain the prefix, “omniverse://”.
- **publish_event** (bool) – If True, push a notification to the event stream.
#### Returns
`FileBrowserModel`
#### Raises
- **RuntimeWarning** – If unable to add server.
### all_collection_items
Returns all connections as items for the specified collection. If collection is ‘None’, then return connections from all collections.
#### Parameters
- **collection** (`str`) – One of [‘bookmarks’, ‘omniverse’, ‘my-computer’]. Default None.
#### Returns
- All connections found.
#### Return type
- `List[FileBrowserItem]`
### delete_bookmark
Deletes the given bookmark.
#### Parameters
- **item** (`FileBrowserItem`) – Bookmark item.
- **publish_event** (`bool`) – If True, push a notification to the event stream.
### delete_server
Disconnects the subtree rooted at the given item.
#### Parameters
- **item** (`FileBrowserItem`) – Root of subtree to disconnect.
- **publish_event** (`bool`) – If True, push a notification to the event stream.
### destroy
### Destructor
### get_connection_with_url
```python
get_connection_with_url(url: str) -> Optional[NucleusConnectionItem]
```
Gets the connection item with the given url.
**Parameters**
- **name** (str) – name (could be aliased name) of connection
**Returns**
- NucleusConnectionItem
### get_root
```python
get_root(pane: Optional[int] = None) -> FileBrowserItem
```
Returns the root item of the specified pane.
**Parameters**
- **pane** (int) – One of {TREEVIEW_PANE, LISTVIEW_PANE}.
### get_selections
```python
get_selections(pane: int = 2) -> List[FileBrowserItem]
```
Returns list of currently selected items.
**Parameters**
- **pane** (int) – One of {TREEVIEW_PANE, LISTVIEW_PANE}.
**Returns**
- list[FileBrowserItem]
### has_connection_with_name
```python
has_connection_with_name(name: str, collection: str)
```
### has_connection_with_name
Returns True if named connection exists within the collection.
#### Parameters
- **name** (str) – name (could be aliased name) of connection
- **collection** (str) – One of {‘bookmarks’, ‘omniverse’, ‘my-computer’}. Default None.
#### Returns
bool
### hide_notification
Utility to hide the notification frame.
### is_bookmark
Returns true if given item is a bookmarked item, or if a given path is bookmarked.
#### Parameters
- **item** (FileBrowserItem) – Item in question.
- **path** (Optional[str]) – Path in question.
#### Returns
bool
### is_collection_node
Returns true if given item is a collection node.
#### Parameters
- **item** (FileBrowserItem) – Item in question.
#### Returns
bool
## is_collection_root
Returns True if the given url is a collection root url.
### Parameters
- **url** (str) – The url to query. Default None.
### Returns
- The result.
### Return type
- bool
## is_connected
Check if a server is connected.
### Parameters
- **url** – The url of the server
### Returns
- True if the server is connected, False if not
## is_connection_point
Returns true if given item is a direct child of a collection node.
### Parameters
- **item** (FileBrowserItem) – Item in question.
### Returns
- bool
## is_local_point
Returns true if given item is a direct child of a my-computer’s node.
### Parameters
- **item** (FileBrowserItem) – Item in question.
### Returns
- bool
### Returns
- bool
### log_out_server
- **Parameters**
- **item** (NucleusConnectionItem) – Connection item.
- **Description**
- Log out from the server at the given path.
### mount_user_folders
- **Parameters**
- **folders** (dict) – Name, path pairs.
- **Description**
- Mounts given set of user folders under the local collection.
### reconnect_server
- **Parameters**
- **item** (FileBrowserItem) – Connection item.
- **Description**
- Reconnects the server at the given path. Clears out any cached authentication tokens to force the action.
### refresh_ui
- **Parameters**
- **item** (Optional[FileBrowserItem] = None) – Root of subtree to redraw. Default None, i.e. root.
- **Description**
- Redraws the subtree rooted at the given item. If item is None, then redraws entire tree.
### rename_bookmark
- **Parameters**
- **item** (BookmarkItem)
- **new_name** (str)
- **new_url** (str)
- **Description**
- Renames a bookmark and updates its URL.
### rename_bookmark
Renames the bookmark item. Note: doesn’t change the connection itself, only how it’s labeled in the tree view.
#### Parameters
- **item** (`FileBrowserItem`) – Bookmark item.
- **new_name** (`str`) – New name.
- **new_url** (`str`) – New url address.
- **publish_event** (`bool`) – If True, push a notification to the event stream.
### rename_server
Renames the connection item. Note: doesn’t change the connection itself, only how it’s labeled in the tree view.
#### Parameters
- **item** (`FileBrowserItem`) – Root of subtree to disconnect.
- **new_name** (`str`) – New name.
- **publish_event** (`bool`) – If True, push a notification to the event stream.
### scale_grid_view
Scale file picker’s grid view icon size.
#### Parameters
- **scale** (`float`) – Scale of the icon.
### select_and_center
### select_and_center
Selects and centers the view on the given item, expanding the tree if needed.
#### Parameters
- **item** (`FileBrowserItem`) – The selected item.
### set_item_filter_fn
Sets the item filter function.
#### Parameters
- **item_filter_fn** (`Callable`) – Signature is bool fn(item: FileBrowserItem)
### set_selections
Selected given items in given pane.
#### Parameters
- **selections** (list[`FileBrowserItem`]) – list of selections.
- **pane** (`int`) – One of TREEVIEW_PANE, LISTVIEW_PANE, or None for both. Default None.
### show_connect_dialog
Displays the add connection dialog.
### show_model
Displays the model on the right side of the split pane
### show_notification
Utility to show the notification frame.
## toggle_grid_view
- **Function**: toggle_grid_view(show_grid_view: bool)
- **Description**: Toggles file picker between grid and list view.
- **Parameters**:
- **show_grid_view** (bool) – True to show grid view, False to show list view.
## collections
- **Property**: property collections
- **Description**: Dictionary of collections, e.g. ‘bookmarks’, ‘omniverse’, ‘my-computer’.
- **Type**: dict
## filebrowser
- **Property**: property filebrowser
- **Description**: Gets the filebrowser of this view.
## notification_frame
- **Property**: property notification_frame
- **Description**: The notification frame.
## show_grid_view
- **Property**: property show_grid_view
- **Description**: Gets file picker stage of grid or list view.
- **Returns**:
- True if grid view shown or False if list view shown.
- **Return type**: bool
## show_only_collections
- **Property**: property show_only_collections
- **Description**: Gets the collections list only to show.
## show_udim_sequence
- **Property**: property show_udim_sequence
- **Description**: Whether or not to show UDIM sequence. | 14,900 |
omni.kit.window.filepicker.FilePickerWidget.md | # FilePickerWidget
## Overview
An embeddable UI widget for browsing the filesystem and taking action on a selected file. Includes a browser bar for keyboard input with auto-completion for navigation of the tree view. For similar but different options, see also `FilePickerDialog` and `FilePickerView`.
### Parameters
- **title** (str) – Widget title. Default None.
### Keyword Arguments
- **layout** (int) – The overall layout of the window, one of: {LAYOUT_SPLIT_PANES, LAYOUT_SINGLE_PANE_SLIM, LAYOUT_SINGLE_PANE_WIDE, LAYOUT_DEFAULT}. Default LAYOUT_SPLIT_PANES.
- **current_directory** (str) – View is set to display this directory. Default None.
- **current_filename** (str) – Filename is set to this value. Default None.
- **splitter_offset** (int) – Position of vertical splitter bar. Default 300.
- **show_grid_view** (bool) – Displays grid view in the initial layout. Default True.
- **grid_view_scale** (int) – Scales grid view, ranges from 0-5. Default 2.
- **show_only_collections** (List[str]) – Displays only the specified collections. Default None.
- **collections** (`List[str]`) – List of collections to display, any combination of ["bookmarks", "omniverse", "my-computer"]. If None, then all are displayed. Default None.
- **allow_multi_selection** (`bool`) – Allows multiple selections. Default False.
- **click_apply_handler** (`Callable`) – Function that will be called when the user accepts the selection. Function signature: `void apply_handler(file_name: str, dir_name: str)`.
- **click_cancel_handler** (`Callable`) – Function that will be called when the user clicks the cancel button. Function signature: `void cancel_handler(file_name: str, dir_name: str)`.
- **apply_button_label** (`str`) – Alternative label for the apply button. Default "Okay".
- **cancel_button_label** (`str`) – Alternative label for the cancel button. Default "Cancel".
- **enable_file_bar** (`bool`) – Enables/disables file bar. Default True.
- **enable_filename_input** (`bool`) – Enables/disables filename input. Default True.
- **file_postfix_options** (`List[str]`) – A list of filename postfix options. Default [].
- **file_extension_options** (`List[Tuple[str, str]]`) – A list of filename extension options. Each list element is an (extension name, description) pair, e.g. (".usdc", "Binary format"). Default [].
- **item_filter_options** (`List[str]`) – OBSOLETE. Use file_postfix_options & file_extension_options instead. A list of filter options to determine which files should be listed. For example: ['usd', 'wav']. Default None.
- **item_filter_fn** (`Callable`) – This user function should return True if the given tree view item is visible, False otherwise. To base the decision on which filter option is currently chosen, use the attribute filepicker.current_filter_option. Function signature: `bool item_filter_fn(item: FileBrowserItem)`
- **error_handler** (`Callable`) – OBSOLETE. This function is called with error messages when appropriate. It provides the calling app a way to display errors on top of writing them to the console window. Function signature: `void error_handler(message: str)`.
- **show_detail_view** (`bool`) – Display the details pane.
- **enable_versioning_pane** (`bool`) – OBSOLETE. Use enable_checkpoints instead.
- **enable_checkpoints** (`bool`) – Whether the checkpoints, a.k.a. versioning pane should be displayed. Default False.
- **enable_timestamp** (`bool`) – Whether the show timestamp panel. need show with checkpoint, Default False.
- **options_pane_build_fn** (`Callable[[List[FileBrowserItem]], bool]`) – OBSOLETE, add options in a detail frame instead.
- **options_pane_width** (`Union[int, omni.ui.Percent]`) – OBSOLETE.
- **selection_changed_fn** (`Callable[[List[FileBrowserItem]]]`) – Selections has changed.
- **treeview_identifier** (`str`) – widget identifier for treeview, only used by tests.
- **enable_tool_bar** (`bool`) – Enables/disables tool bar. Default True.
- **enable_zoombar** (`bool`) – Enables/disables filename input. Default True.
- **save_grid_view** (`bool`) – Save grid view mode if toggled. Default True.
- **apply_path_handler** (`Callable`) – Function that will be called when the user entered in the path field. Function Signature: void apply_path_handler(url: str)
### Methods
| Method | Description |
| --- | --- |
| `__init__(title, **kwargs)` | |
| `destroy()` | Destructor. |
| `get_selected_filename_and_directory()` | Get the current directory and filename that has been selected or entered into the filename field |
| `set_click_apply_handler(click_apply_handler)` | Sets the function to execute upon clicking apply. |
| `set_item_filter_fn(item_filter_fn)` | Sets the item filter function. |
### Attributes
| Attribute | Description |
| --- | --- |
| `api` | Provides API methods to this widget. |
| `current_filter_option` | Index of current filter option, range 0. |
| `file_bar` | Returns the file bar widget. |
| `model` | Returns the model of this widget. |
#### `__init__(title: str, **kwargs)`
#### `destroy()`
### omni.kit.window.filepicker.FilePickerWidget.destroy
**Destructor.**
### omni.kit.window.filepicker.FilePickerWidget.get_selected_filename_and_directory
**Get the current directory and filename that has been selected or entered into the filename field**
### omni.kit.window.filepicker.FilePickerWidget.set_click_apply_handler
**Sets the function to execute upon clicking apply.**
**Parameters**
- **click_apply_handler** (Callable) – Callback with filename being the name of the file, and dirname being the containing directory path with an ending slash. Signature is fn(filename: str, dirname: str) -> None
### omni.kit.window.filepicker.FilePickerWidget.set_item_filter_fn
**Sets the item filter function.**
**Parameters**
- **item_filter_fn** (Callable) – Signature is bool fn(item: FileBrowserItem)
### omni.kit.window.filepicker.FilePickerWidget.api
**Provides API methods to this widget.**
**Type**
- **FilePickerAPI**
### current_filter_option
: int
Index of current filter option, range 0 .. num_filter_options.
Type
====
OBSOLETE int
### file_bar
: FileBar
Returns the file bar widget.
Type
====
FileBar
### model
Returns the model of this widget. | 6,207 |
omni.kit.window.filepicker.SearchDelegate.md | # SearchDelegate
## Methods
- `__init__()`
- `build_ui()`
- `destroy()`
## Attributes
- `enabled` - Enable/disable Widget
- `search_dir`
- `visible`
## Property
### enabled
Enable/disable Widget | 200 |
omni.kit.window.filepicker.SearchResultsItem.md | # SearchResultsItem
## SearchResultsItem
```python
class omni.kit.window.filepicker.SearchResultsItem(path: str, fields: FileBrowserItemFields, is_folder: bool = False)
```
**Bases:** [FileBrowserItem](<>)
### Methods
| Method | Description |
|--------|-------------|
| `__init__(self)` | |
| `get_custom_thumbnails_for_folder_async()` | Returns the thumbnail dictionary for this (folder) item. |
### Attributes
| Attribute | Description |
|-----------|-------------|
<em>
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.ui._ui.AbstractItem
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
None
<dt class="sig sig-object py" id="omni.kit.window.filepicker.SearchResultsItem.get_custom_thumbnails_for_folder_async">
<em class="property">
<span class="pre">
async
<span class="w">
<span class="sig-name descname">
<span class="pre">
get_custom_thumbnails_for_folder_async
<span class="sig-paren">
(
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
Dict
<dd>
<p>
Returns the thumbnail dictionary for this (folder) item.
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
With children url’s as keys, and url’s to thumbnail files as values.
<dt class="field-even">
Return type
<dd class="field-even">
<p>
Dict
| 1,737 |
omni.kit.window.filepicker.SearchResultsModel.md | # SearchResultsModel
## Overview
The `SearchResultsModel` class is a part of the `omni.kit.window.filepicker` module. It extends the `FileBrowserModel` and provides functionalities related to search results in a file picker interface.
### Constructor
```python
class omni.kit.window.filepicker.SearchResultsModel:
def __init__(self, search_model: AbstractSearchModel, **kwargs)
```
### Methods
- **`__init__(self)`**
- Constructs an instance of `SearchResultsModel`.
- **`destroy()`**
- Destructor method to clean up resources.
- **`get_item_children(item)`**
- Returns a list of items that are nested under the given parent item.
### Attributes
- None specified in the provided HTML.
### omni.ui._ui.AbstractItemModel
Constructs AbstractItemModel.
> See below
### Keyword Arguments:
### omni.kit.window.filepicker.SearchResultsModel.destroy
Destructor.
### omni.kit.window.filepicker.SearchResultsModel.get_item_children
Return the list of items that are nested to the given parent item.
#### Parameters
- **item** (`FileBrowserItem`) – Parent item.
#### Returns
- list[`FileBrowserItem`] | 1,118 |
omni.kit.window.filepicker.TimestampWidget.md | # TimestampWidget
## Methods
- `__init__(**kwargs)`
- Timestamp Widget.
- `add_on_check_changed_fn(fn)`
- Add a function to be called when the check changes.
- `create_timestamp_widget()`
- Create and return a TimestampWidget.
- `delete_timestamp_widget(widget)`
- Delete a TimestampWidget.
- `destroy()`
- Destroy and clean up the widget.
- `get_timestamp_url()`
- (Description not provided in the HTML snippet)
### Methods
- `get_timestamp_url`
- Returns the URL to use for the timestamp.
- `on_list_checkpoint` (select)
- Called when user selects a checkpoint.
- `on_selection_changed` (widget, selected)
- Callback for when selection changes.
- `rebuild` (selected)
- Rebuild the frame.
- `set_checkpoint_widget` (widget)
- Set the checkpoint widget.
- `set_url` (url)
- Set the url.
### Attributes
- `check`
- Get check box status of timestamp widget.
### Methods
- `__init__` (**kwargs)
- Timestamp Widget.
- `add_on_check_changed_fn` (fn)
- Add a function to be called when the check changes. The function will be called with the following arguments:
- Parameters:
- `fn` (Callable) – The function to be.
- `create_timestamp_widget`
- Create and return a TimestampWidget.
- Returns:
- obj:’TimestampWidget’: A TimestampWidget instance.
- `delete_timestamp_widget` (widget)
- Delete the timestamp widget.
### TimestampWidget
**delete_timestamp_widget**
Delete a TimestampWidget.
**Parameters**
- **widget** (obj:’TimestampWidget’): The widget to be deleted. If None is passed no action is taken
### destroy
Destroy and clean up the widget.
### get_timestamp_url
Returns the URL to use for the timestamp.
**Parameters**
- **url** (str) – The url to use.
**Returns**
- The url with the timestamp appended to it if the timestamp checkbox is checked.
**Return type**
- str
### on_list_checkpoint
Called when user selects a checkpoint.
**Parameters**
- **select** (str) – selected item.
### on_selection_changed
Callback for when selection changes.
**Parameters**
- **(widget)** (obj:’TimestampWidget’): TimestampWidget that was toggled.
- **selected** (List[str]) – List of items that were selected. If None is selected no change is made.
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.filepicker.TimestampWidget.rebuild">
<span class="sig-name descname">
<span class="pre">
rebuild
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
selected
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
List
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
]
<span class="sig-paren">
)
<dd>
<p>
Rebuild the frame. This is called when the user clicks on the rebuild button.
:param selected: List of items that have been selected.
:type selected: List[str]
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.filepicker.TimestampWidget.set_checkpoint_widget">
<span class="sig-name descname">
<span class="pre">
set_checkpoint_widget
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
widget
<span class="sig-paren">
)
<dd>
<p>
Set the checkpoint widget. This is used to provide feedback to the user when they want to check out the state of the experiment
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<p>
<strong>
widget
(
<em>
obj
) – The widget to be
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.window.filepicker.TimestampWidget.set_url">
<span class="sig-name descname">
<span class="pre">
set_url
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
url
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
<span class="sig-paren">
)
<dd>
<p>
Set the url.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<p>
<strong>
url
(
<em>
str
) – The URL to set.
<dl class="py property">
<dt class="sig sig-object py" id="omni.kit.window.filepicker.TimestampWidget.check">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
check
<em class="property">
<span class="p">
<span class="pre">
:
<span class="w">
<span class="pre">
bool
<dd>
<p>
Get check box status of timestamp widget.
:returns: True if the timestamp is valid False otherwise.
:rtype: bool
| 5,107 |
omni.kit.window.filepicker.ToolBar.md | # ToolBar
## ToolBar
```python
class omni.kit.window.filepicker.ToolBar(**kwargs)
```
Bases: `object`
### Methods
- **`__init__(**kwargs)`**
- **`destroy()`**
- Destroy the widget.
- **`set_bookmarked(true_false)`**
- Set whether or not the bookmark image should be shown.
- **`set_config_value(name, value)`**
- Set a value for a config button.
- **`set_path(path)`**
- Sets the path to search for.
- **`set_search_delegate(delegate)`**
- Set the delegate for handling search operations.
| Attribute | Description |
|-----------|-------------|
| `SAVED_SETTINGS_OPTIONS_MENU` | Build a ToolBar for file picker widget. |
| `bookmarked` | Whether or not the current path is bookmarked. |
| `config_values` | Returns the values of the configuration button. |
| `path` | Path to the currently displayed file. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `SAVED_SETTINGS_OPTIONS_MENU` | Build a ToolBar for file picker widget. |
| `bookmarked` | Whether or not the current path is bookmarked. |
| `config_values` | Returns the values of the configuration button. |
| `path` | Path to the currently displayed file. |
### Methods
#### `__init__(**kwargs)`
#### `destroy()`
Destroy the widget.
#### `set_bookmarked(true_false: bool)`
Set whether or not the bookmark image should be shown.
- **Parameters**
- **true_false** (bool) – True if the bookmark image should be shown else False.
#### `set_config_value(name: str, value: bool)`
Set a value for a config button.
- **Parameters**
- **name** (str) – The name of the value to set.
- **value** (bool) – The value to set for the name.
#### `set_path(path: str)`
### set_path
Sets the path to search for.
#### Parameters
- **path** (str) – The path to search
### set_search_delegate
Sets a custom search delegate for the tool bar.
#### Parameters
- **delegate** (SearchDelegate) – Object that creates the search widget.
### SAVED_SETTINGS_OPTIONS_MENU
Build a ToolBar for file picker widget.
#### Keyword Arguments
- **current_directory_provider** (Optional[Callable]) – A provider for the current directory.
- **branching_options_handler** (Optional[Callable]) – A handler for branching options.
- **apply_path_handler** (Optional[Callable]) – A handler for applying a path.
- **toggle_bookmark_handler** (Optional[Callable]) – A handler for toggling bookmarks.
- **config_values_changed_handler** (Optional[Callable]) – A handler for handling changes in configuration values.
- **begin_edit_handler** (Optional[Callable]) – A handler for starting an edit operation.
- **prefix_separator** (Optional[str]) – A separator for prefixes.
- **enable_soft_delete** (bool) – A flag indicating whether soft delete is enabled (default: False).
- **search_delegate** (Optional[SearchDelegate]) – A delegate for search functionality.
- **modal** (bool) – A flag indicating whether the toolbar is modal (default: False).
### bookmarked
### Omni.Kit.Window.FilePicker.ToolBar.Bookmarked
- **Description**: Whether or not the current path is bookmarked.
- **Returns**: True if the current path is bookmarked else False.
- **Return type**: bool
### Omni.Kit.Window.FilePicker.ToolBar.Config_Values
- **Description**: Returns the values of the configuration button.
- **Returns**: A dictionary of the configuration button values
- **Return type**: Dict[str, bool]
### Omni.Kit.Window.FilePicker.ToolBar.Path
- **Description**: Path to the currently displayed file.
- **Returns**: Path to the currently displayed file or None if there is no browser bar.
- **Return type**: str | 3,573 |
omni.kit.window.filepicker.UdimContextMenu.md | # UdimContextMenu
## UdimContextMenu
Creates popup menu for the hovered FileBrowserItem that are Udim nodes.
### Methods
- `__init__(**kwargs)`
- Initialize the BaseContextMenu.
### Attributes
### `__init__(**kwargs)`
Initialize the BaseContextMenu.
#### Keyword Arguments
- `title` (Optional [str]) – The title of the context menu default `None`. | 358 |
omni.kit.window.file_exporter.Classes.md | # omni.kit.window.file_exporter Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| [FileExporterExtension](omni.kit.window.file_exporter/omni.kit.window.file_exporter.FileExporterExtension.html) | A Standardized file export dialog. | | 272 |
omni.kit.window.file_exporter.FileExporterExtension.md | # FileExporterExtension
## Class omni.kit.window.file_exporter.FileExporterExtension
- **Bases:** `IExt`
- **Description:** A Standardized file export dialog.
### Methods
- **`__init__(self)`**
- **`add_export_options_frame(name, delegate)`**
- Adds a set of export options to the dialog.
- **`click_apply([filename_url, postfix, extension])`**
- Helper function to programmatically execute the apply callback.
- **`click_cancel([cancel_handler])`**
- Helper function to programmatically execute the cancel callback.
- **`destroy_dialog()`**
- **`detach_from_main_window()`**
<p>
Detach the current file importer dialog from main window.
<p>
hide_window()
<p>
Hides and destroys the dialog window.
<p>
on_shutdown()
<p>
on_startup(ext_id)
<p>
select_items_async(url[, filenames])
<p>
Helper function to programmatically select multiple items in filepicker.
<p>
show_window([title, width, height, ...])
<p>
Displays the export dialog with the specified settings.
<p>
is_ui_ready
<p>
is_window_visible
<p>
__init__(self: omni.ext._extensions.IExt) -> None
<p>
add_export_options_frame(name: str, delegate: DetailFrameController)
<p>
Adds a set of export options to the dialog. Should be called after show_window.
<p>
Parameters:
- name (str) – Title of the options box.
- delegate (ExportOptionsDelegate) – Subclasses specified delegate and overrides the _build_ui_impl method to provide a custom widget for getting user input.
<p>
click_apply(filename_url: Optional[str])
### Function Definitions
#### click_apply
```python
click_apply(
prefix: Optional[str] = None,
postfix: Optional[str] = None,
extension: Optional[str] = None
)
```
Helper function to programmatically execute the apply callback. Useful in unittests
#### click_cancel
```python
click_cancel(
cancel_handler: Optional[Callable[[str, str], None]] = None
)
```
Helper function to programmatically execute the cancel callback. Useful in unittests
#### detach_from_main_window
```python
detach_from_main_window()
```
Detach the current file importer dialog from main window.
#### hide_window
```python
hide_window()
```
Hides and destroys the dialog window.
#### select_items_async
```python
async select_items_async(
url: str,
filenames: List[str]
)
```
### select_items_async
Helper function to programmatically select multiple items in filepicker. Useful in unittests.
### show_window
```python
show_window(
title: Optional[str] = None,
width: int = 1080,
height: int = 450,
show_only_collections: Optional[List[str]] = None,
show_only_folders: bool = False,
file_postfix_options: Optional[List[str]] = None,
file_extension_types: Optional[List[Tuple[str]]] = None
)
```
str , str ] ] ]
= None
export_button_label : str = 'Export'
export_handler : Optional[Callable[[str, str, str, List[str]], None]] = None
filename_url : Optional[str] = None
file_postfix : Optional[str] = None
file_extension : Optional[str] = None
should_validate : bool = False
enable_filename_input : bool = True
focus_filename_input : bool = True
click_cancel_handler : Optional[Callable[[str, str], None]] = None
)
Displays the export dialog with the specified settings.
**Keyword Arguments**
* **title** (str) – The name of the dialog
* **width** (int) – Width of the window (Default=1250)
* **height** (int) – Height of the window (Default=450)
* **show_only_collections** (List[str]) – Which of these collections, [“bookmarks”, “omniverse”, “my-computer”] to display.
* **show_only_folders** (bool) – Show only folders in the list view.
* **file_postfix_options** (List[str]) – A list of filename postfix options. Nvidia defaults.
* **file_extension_types** (List[Tuple[str, str]]) – A list of filename extension options. Each list element is a (extension name, description) pair, e.g. (“.usdc”, “Binary format”). Nvidia defaults.
* **export_button_label** (str) – Label for the export button (Default=”Export”)
* **export_handler** (Callable) – The callback to handle the export, filename is the name of the file, and dirname being the containing directory path with an ending slash. Function signature is export_handler(filename: str, dirname: str, extension: str, selections: List[str]) -> None
* **filename_url** (str) – Url of the target file, excluding filename extension.
* **file_postfix** (str) – Sets selected postfix to this value if specified.
* **file_extension** (str) – Sets selected extension to this value if specified.
- **should_validate** (**bool**) – Whether filename validation should be performed.
- **enable_filename_input** (**bool**) – Whether filename field input is enabled, default to True.
- **click_cancel_handler** (**Callable[[str, str], None]**) – The callback to handle click of the cancel button. | 4,778 |
omni.kit.window.file_exporter.Functions.md | # omni.kit.window.file_exporter Functions
## Functions Summary
- **get_file_exporter**
- Description: Returns the singleton file_exporter extension instance | 160 |
omni.kit.window.file_exporter.get_file_exporter.md | # get_file_exporter
Returns the singleton file_exporter extension instance
## Description
```python
omni.kit.window.file_exporter.get_file_exporter()
```
- **Returns**:
- `FileExporterExtension`
``` | 204 |
omni.kit.window.file_exporter.md | # omni.kit.window.file_exporter
## Classes Summary
- **FileExporterExtension**: A Standardized file export dialog.
## Functions Summary
- **get_file_exporter**: Returns the singleton file_exporter extension instance | 217 |
omni.kit.window.file_importer.FileImporterExtension.md | # FileImporterExtension
## Overview
A Standardized file import dialog.
### Methods
- `__init__(self)`
- `add_import_options_frame(name, delegate)`
- Adds a set of import options to the dialog.
- `click_apply([filename_url, postfix, extension])`
- Helper function to programmatically execute the apply callback.
- `click_cancel([cancel_handler])`
- Helper function to programmatically execute the cancel callback.
- `destroy_dialog()`
- `detach_from_main_window()`
Detach the current file importer dialog from main window.
```python
hide_window()
```
Hides and destroys the dialog window.
```python
on_shutdown()
```
```python
on_startup(ext_id)
```
```python
select_items_async(url[, filenames])
```
Helper function to programmatically select multiple items in filepicker.
```python
show_window([title, width, height, ...])
```
Displays the import dialog with the specified settings.
### Attributes
```python
is_ui_ready
```
```python
is_window_visible
```
```python
__init__(self: omni.ext._extensions.IExt) -> None
```
```python
add_import_options_frame(name: str, delegate: DetailFrameController)
```
Adds a set of import options to the dialog. Should be called after show_window.
Parameters:
- **name** (str) – Title of the options box.
- **delegate** (ImportOptionsDelegate) – Subclasses specified delegate and overrides the _build_ui_impl method to provide a custom widget for getting user input.
```python
click_apply(filename_url: Optional[str])
```
Helper function to progammatically execute the apply callback. Useful in unittests
Helper function to progammatically execute the cancel callback. Useful in unittests
Detach the current file importer dialog from main window.
Hides and destroys the dialog window.
### FileImporterExtension.select_items_async
Helper function to programmatically select multiple items in filepicker. Useful in unittests.
### FileImporterExtension.show_window
- `title`: Optional[str] = None
- `width`: int = 1080
- `height`: int = 450
- `show_only_collections`: Optional[List[str]] = None
- `show_only_folders`: bool = False
- `file_postfix_options`: Optional[List[str]] = None
- `file_extension_types`: Optional[List[Tuple[str]]] = None
str
,
str
]
]
]
=
None
,
file_filter_handler: Optional[Callable[[str, str, str], bool]] = None
,
import_button_label: str = 'Import'
,
import_handler: Optional[Callable[[str, str, List[str]], None]] = None
,
filename_url: Optional[str] = None
,
file_postfix: Optional[str] = None
None,
**file_extension** : Optional[str] = None,
**hide_window_on_import** : bool = True,
**should_validate** : bool = False,
**focus_filename_input** : bool = True,
**allow_multi_files_selection** : bool = False
)
Displays the import dialog with the specified settings.
**Keyword Arguments**
* **title** (str) – The name of the dialog
* **width** (int) – Width of the window (Default=1250)
* **height** (int) – Height of the window (Default=450)
* **show_only_collections** (List[str]) – Which of these collections, [“bookmarks”, “omniverse”, “my-computer”] to display.
* **show_only_folders** (bool) – Show only folders in the list view.
* **file_postfix_options** (List[str]) – A list of filename postfix options. Nvidia defaults.
* **file_extension_types** (List[Tuple[str, str]]) – A list of filename extension options. Each list element is a (extension name, description) pair, e.g. (“.usd”, “USD format”). Nvidia defaults.
* **file_filter_handler** (Callable) – The filter handler that is called to decide whether or not to display a file. Function signature is filter_handler(filename: str, filter_postfix: str, filter_ext: str) -> bool
* **import_button_label** (str) – Label for the import button (Default=”Import”)
* **import_handler** (str) – Label for the import button (Default=”Import”)
- **Callable** – The callback to handle the import, filename is the name of the file, and dirname being the containing directory path with a ending slash. Function signature is `import_handler(filename: str, dirname: str, selections: List[str]) -> None`
- **filename_url** (str) – Url of the file to import, if any.
- **file_postfix** (str) – Sets selected postfix to this value if specified.
- **file_extension** (str) – Sets selected extension to this value if specified.
- **hide_window_on_import** (bool) – Whether the dialog hides on apply; if False, it means that whether to hide the dialog should be decided by import handler.
- **should_validate** (bool) – Whether filename validation should be performed. | 4,502 |
omni.kit.window.file_importer.md | # omni.kit.window.file_importer
## Classes
Summary:
| Class | Description |
|-------|-------------|
| [FileImporterExtension](omni.kit.window.file_importer/omni.kit.window.file_importer.FileImporterExtension.html) | A Standardized file import dialog. |
## Functions
Summary:
| Function | Description |
|----------|-------------|
| [get_file_importer](omni.kit.window.file_importer/omni.kit.window.file_importer.get_file_importer.html) | Returns the singleton file_importer extension instance | | 497 |
omni.kit.window.inspector.demo_window.Classes.md | # omni.kit.window.inspector.demo_window Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| [InspectorDemoWindow](omni.kit.window.inspector.demo_window/omni.kit.window.inspector.demo_window.InspectorDemoWindow.html) | The demo window for the inspector | | 291 |
omni.kit.window.inspector.demo_window.InspectorDemoWindow.md | # InspectorDemoWindow
## InspectorDemoWindow
```python
class omni.kit.window.inspector.demo_window.InspectorDemoWindow:
"""
Bases: object
The demo window for the inspector
"""
def __init__(self):
pass
def destroy(self):
pass
window = None
```
``` | 296 |
omni.kit.window.inspector.extension.Classes.md | # omni.kit.window.inspector.extension Classes
## Classes Summary
- **InspectorExtension**
- The entry point for Inspector Window
- **InspectorWindow**
- The inspector window
- **MenuHelperExtension**
- Simple helper class for adding/removing “Window” menu to your extension. ui.Window creation/show/hide is still down to user to provide functionally. | 360 |
omni.kit.window.inspector.extension.InspectorExtension.md | # InspectorExtension
## Methods
- `on_shutdown()`
- `on_startup()`
- `show_window(value)`
## Attributes
- `MENU_GROUP`
- `MENU_NAME`
### `__init__(self)`
omni.ext._extensions.IExt() → None | 193 |
omni.kit.window.inspector.extension.InspectorWindow.md | # InspectorWindow
## InspectorWindow
```python
class omni.kit.window.inspector.extension.InspectorWindow
```
The inspector window
### Methods
| Method | Description |
|--------|-------------|
| `__init__()` | |
| `destroy()` | Called by extension before destroying this object. |
| `set_visibility_changed_fn(func)` | |
#### `__init__()`
#### `destroy()`
Called by extension before destroying this object. It doesn’t happen automatically. Without this hot reloading doesn’t work.
``` | 490 |
omni.kit.window.inspector.extension.MenuHelperExtension.md | # MenuHelperExtension
## MenuHelperExtension
```python
class omni.kit.window.inspector.extension.MenuHelperExtension
```
Simple helper class for adding/removing “Window” menu to your extension. ui.Window creation/show/hide is still down to user to provide functionally.
### Methods
| Method | Description |
|-----------------------|-------------|
| `__init__()` | |
| `menu_refresh()` | |
| `menu_shutdown()` | |
| `menu_startup(window_name, menu_desc, menu_group)` | |
```python
def __init__():
```
``` | 577 |
omni.kit.window.inspector.InspectorExtension.md | # InspectorExtension
## Overview
The entry point for Inspector Window.
### Methods
- `on_shutdown()`:
- `on_startup()`:
- `show_window(value)`:
### Attributes
- `MENU_GROUP`:
- `MENU_NAME`:
### Initialization
- `__init__(self: omni.ext._extensions.IExt)`:
None | 270 |
omni.kit.window.inspector.inspector_preview.InspectorPreview.md | # InspectorPreview
## InspectorPreview
```python
class omni.kit.window.inspector.inspector_preview.InspectorPreview(window: Window, **kwargs)
```
Bases: `object`
The Stage widget
### Methods
- `__init__(window, **kwargs)`
- `destroy()`
- `on_selection_changed(event)`
- `set_main_widget(widget)`
- `set_widget(widget)`
- `toggle_visibility()` | 348 |
omni.kit.window.inspector.inspector_style.md | # omni.kit.window.inspector.inspector_style
## Module Overview
This module provides the styling for the inspector window in Omniverse Kit.
### Detailed Description
The `omni.kit.window.inspector.inspector_style` module is responsible for defining the visual appearance and layout of the inspector window within the Omniverse Kit environment. It includes styles for various UI elements such as buttons, text fields, and dropdown menus, ensuring a consistent and intuitive user interface.
#### Key Features
- **Consistent UI**: Ensures that the inspector window adheres to the overall design guidelines of the Omniverse Kit.
- **Customizable**: Allows developers to modify or extend the styles to fit specific project requirements.
- **Integration**: Seamlessly integrates with other components of the Omniverse Kit, maintaining a unified look and feel across different modules.
#### Usage
To use this module, simply import it into your Python scripts where the inspector window is utilized. The styles will automatically apply to the corresponding UI elements.
```python
import omni.kit.window.inspector.inspector_style
```
#### Example
Here is a simple example demonstrating how to apply the styles provided by this module:
```python
# Example code demonstrating the use of inspector_style
from omni.kit.window.inspector import InspectorWindow
# Create an instance of InspectorWindow
inspector = InspectorWindow()
# Apply the styles
inspector.apply_styles()
# Now the inspector window will display with the defined styles
inspector.show()
```
This example illustrates the basic usage of the `inspector_style` module, showcasing how it can be integrated into an application to enhance the visual presentation of the inspector window.
### Conclusion
The `omni.kit.window.inspector.inspector_style` module is a crucial component for maintaining a consistent and visually appealing inspector window in the Omniverse Kit. Its flexibility and ease of integration make it an essential tool for developers working with the Omniverse platform. | 2,052 |
omni.kit.window.inspector.inspector_tests.Functions.md | # omni.kit.window.inspector.inspector_tests Functions
## Functions Summary
- **test_change_query**
- **test_menu_activation**
- **test_select_frame**
- **test_widget_tool_button**
### test_change_query
### test_menu_activation
### test_select_frame
### test_widget_tool_button | 279 |
omni.kit.window.inspector.inspector_widget.InspectorWidget.md | # InspectorWidget
## Methods
- `__init__(window, **kwargs)`
- `destroy()`
- `update_window(window)`
<span class="sig-paren">
)
<dd>
<footer>
<hr/>
| 165 |
omni.kit.window.inspector.inspector_widget.md | # omni.kit.window.inspector.inspector_widget
## Classes Summary
- [InspectorWidget](omni.kit.window.inspector.inspector_widget/omni.kit.window.inspector.inspector_widget.InspectorWidget.html) | 193 |
omni.kit.window.inspector.inspector_window.Classes.md | # omni.kit.window.inspector.inspector_window Classes
## Classes Summary:
| Class | Description |
|-------|-------------|
| [InspectorWindow](omni.kit.window.inspector.inspector_window/omni.kit.window.inspector.inspector_window.InspectorWindow.html) | The inspector window | | 275 |
Subsets and Splits