file_path
stringlengths 5
148
| content
stringlengths 0
526k
|
---|---|
omni.kit.data2ui.core.DDView.md | # DDView
## Overview
The `DDView` class is a part of the `omni.kit.data2ui.core` module. It is used to manage the display and interaction of data within a user interface.
### Class Definition
```python
class omni.kit.data2ui.core.DDView(model: omni.kit.data2ui.core.model.Model, delegate: omni.kit.data2ui.core.delegate.Delegate, **kwargs)
```
### Base Class
- `object`
### Methods
- `__init__(model, delegate, **kwargs)`
- `destroy()`
- `rebuild_all()`
```
delegate : omni.kit.data2ui.core.delegate.Delegate
**kwargs
) |
omni.kit.data2ui.core.Delegate.md | # Delegate
## Methods
- **get_widget(item)**
- Finds the widget class for a given item class, taking inheritance into account.
- **register_type(widget_type, item_type)**
- Registers a new widget type for a given item type.
## Attributes
- **widget_types_by_item_type**
## __init__()
## get_widget(item)
- Finds the widget class for a given item class, taking inheritance into account.
<dl>
<dd class="field-odd">
<p>
<strong>
item_type
</strong>
– The item class to find the associated widget class for.
</p>
</dd>
<dt class="field-even">
Returns
</dt>
<dd class="field-even">
<p>
The widget class associated with the item class, or None if not found.
</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.data2ui.core.Delegate.register_type">
<em class="property">
<span class="pre">
classmethod
</span>
<span class="w">
</span>
</em>
<span class="sig-name descname">
<span class="pre">
register_type
</span>
</span>
<span class="sig-paren">
(
</span>
<em class="sig-param">
<span class="n">
<span class="pre">
widget_type
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
item_type
</span>
</span>
</em>
<span class="sig-paren">
)
</span>
<a class="headerlink" href="#omni.kit.data2ui.core.Delegate.register_type" title="Permalink to this definition">
</a>
</dt>
<dd>
<p>
Registers a new widget type for a given item type.
</p>
<dl class="field-list simple">
<dt class="field-odd">
Parameters
</dt>
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
widget_type
</strong>
– The widget class to register.
</p>
</li>
<li>
<p>
<strong>
item_type
</strong>
– The item class to associate with the widget.
</p>
</li>
</ul>
</dd>
<dt class="field-even">
Returns
</dt>
<dd class="field-even">
<p>
A TypeRegistry instance that handles adding/removing the mapping.
</p>
</dd>
</dl>
</dd>
</dl>
</dl> |
omni.kit.data2ui.core.Frame.md | # Frame
## Class omni.kit.data2ui.core.Frame
**Bases:**
- [omni.kit.data2ui.core.model.Container](omni.kit.data2ui.core.Container.html#omni.kit.data2ui.core.Container)
### Methods
### Attributes
| Attribute | Description |
|-----------------|-------------|
| separate_window | |
### omni.kit.data2ui.core.Frame.__init__ |
omni.kit.data2ui.core.HStack.md | # HStack
## HStack
```python
class omni.kit.data2ui.core.HStack
```
Bases:
```python
omni.kit.data2ui.core.model.Stack
```
### Methods
### Attributes
```python
__init__()
```
``` |
omni.kit.data2ui.core.Image.md | # Image
## Image
### Class
```python
class omni.kit.data2ui.core.Image
```
**Bases:**
```python
omni.kit.data2ui.core.model.Widget
```
### Methods
### Attributes
| Attribute | Description |
|-----------|-------------|
| alignment | |
| fill_policy | |
| pixel_aligned | |
| source_url | |
### `__init__`
```python
__init__()
```
``` |
omni.kit.data2ui.core.Label.md | # Label
## Class omni.kit.data2ui.core.Label
Bases: [omni.kit.data2ui.core.model.Widget](omni.kit.data2ui.core.Widget.html#omni.kit.data2ui.core.Widget)
### Methods
### Attributes
| Attribute | Description |
|-----------|-------------|
| alignment | |
| elided_text | |
| text | |
| word_wrap | |
### omni.kit.data2ui.core.Label.__init__ |
omni.kit.data2ui.core.Line.md | # Line
## Line
### Class: omni.kit.data2ui.core.Line
**Bases:**
- [omni.kit.data2ui.core.model.Widget](omni.kit.data2ui.core.Widget.html#omni.kit.data2ui.core.Widget)
#### Methods
#### Attributes
| Name | Description |
|------------|-------------|
| alignment | |
#### `__init__()` |
omni.kit.data2ui.core.Model.md | # Model
## Class Definition
```python
class omni.kit.data2ui.core.Model(object)
```
## Methods
- `__init__()`
- `create_scene_view_model()`
- `create_subscription_to_push(callable, event, ...)`
- Callable will be called immediately on item changed
- `get_item_data(ItemType)`
- Finds the registered data using item type.
- `get_type_from_data(Data)`
- Finds the registered item type using data.
- `keep_item(item)`
- `register_type(ItemType, Data)`
- Register the custom model item.
## Attributes
```
| all_types |
| --- |
__init__()
create_subscription_to_push(callable, event, info)
- Callable will be called immediately on item changed
get_item_data(ItemType) → Any
- Finds the registered data using item type.
get_type_from_data(Data) → Any
- Finds the registered item type using data.
register_type(ItemType, Data)
- Register the custom model item.
- Registered item will go to the model namespace. |
omni.kit.data2ui.core.OmniUiDelegate.md | # OmniUiDelegate
## Class
```python
class omni.kit.data2ui.core.OmniUiDelegate
```
### Bases
```python
omni.kit.data2ui.core.delegate.Delegate
```
### Methods
### Attributes
```python
Button
Circle
CollapsableFrame
Frame
HStack
Image
Label
Line
Placer
```
| | |
| ------ | ------ |
| Rectangle | |
| ScrollingFrame | |
| Spacer | |
| Stack | |
| Triangle | |
| VStack | |
| ViewportButton | |
| ViewportCircle | |
| ZStack | |
__init__() |
omni.kit.data2ui.core.Placer.md | # Placer
## Class Overview
**Class:** `omni.kit.data2ui.core.Placer`
**Bases:** `omni.kit.data2ui.core.model.Container`
### Methods
- **__init__**
### Attributes
- **drag_axis**
- **draggable**
- **offset_x**
- **offset_y**
- **stable_size** |
omni.kit.data2ui.core.Rectangle.md | # Rectangle
## Rectangle
### omni.kit.data2ui.core.Rectangle
Bases: `omni.kit.data2ui.core.model.Widget`
### Methods
### Attributes
### omni.kit.data2ui.core.Rectangle.__init__ |
omni.kit.data2ui.core.ScrollingFrame.md | # ScrollingFrame
## ScrollingFrame
```python
class omni.kit.data2ui.core.ScrollingFrame
```
Bases:
```python
omni.kit.data2ui.core.model.Frame
```
### Methods
### Attributes
```python
horizontal_scrollbar_policy
scroll_x
scroll_x_max
scroll_y
scroll_y_max
vertical_scrollbar_policy
```
```python
__init__()
``` |
omni.kit.data2ui.core.Spacer.md | # Spacer
## Spacer
```
class omni.kit.data2ui.core.Spacer
```
Bases:
```
omni.kit.data2ui.core.model.Widget
```
### Methods
### Attributes
```
__init__
```
``` |
omni.kit.data2ui.core.Stack.md | # Stack
## Stack
Bases: [omni.kit.data2ui.core.model.Container](omni.kit.data2ui.core.Container.html#omni.kit.data2ui.core.Container)
### Methods
| Method | Description |
|--------|-------------|
### Attributes
| Attribute | Description |
|-----------|-------------|
| content_clipping | |
| direction | |
| send_mouse_events_to_back | |
| spacing | |
### __init__
``` |
omni.kit.data2ui.core.StyleContainer.md | # StyleContainer
## StyleContainer
```python
class omni.kit.data2ui.core.StyleContainer
```
This is the style primitive placeholder
### Methods
```python
__init__()
```
``` |
omni.kit.data2ui.core.Triangle.md | # Triangle
## Triangle
Bases: omni.kit.data2ui.core.model.Widget
### Methods
### Attributes
| Attribute | Description |
|-----------|-------------|
| alignment | |
## omni.kit.data2ui.core.Triangle.__init__ |
omni.kit.data2ui.core.ViewportButton.md | # ViewportButton
## Class
```python
class omni.kit.data2ui.core.ViewportButton
```
### Bases
```python
omni.kit.data2ui.core.model.Item
```
### Methods
### Attributes
- **checked**
- **clicked_fn**
- **enabled**
- **height**
- **image_url**
- **selected**
- **shape**
- **style**
- **target_path**
- **visible**
<p>
<code>
width
</code>
</p>
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.data2ui.core.ViewportButton.__init__">
<span class="sig-name descname">
<span class="pre">
__init__
</span>
</span>
<span class="sig-paren">
(
</span>
<span class="sig-paren">
)
</span>
</dt>
<dd>
</dd>
</dl> |
omni.kit.data2ui.core.ViewportCircle.md | # ViewportCircle
## Methods
## Attributes
- `checked`
- `clicked_fn`
- `enabled`
- `radius`
- `selected`
- `shape`
- `style`
- `target_path`
- `visible`
## __init__
(
) |
omni.kit.data2ui.core.VStack.md | # VStack
## VStack
### Class
```
class omni.kit.data2ui.core.VStack
```
Bases:
```
omni.kit.data2ui.core.model.Stack
```
### Methods
### Attributes
### __init__
```
( )
``` |
omni.kit.data2ui.core.Widget.md | # Widget
## Class
```python
class omni.kit.data2ui.core.Widget
```
Bases: `omni.kit.data2ui.core.model.Item`
### Attributes
- `checked`
- `computed_height`
- `computed_width`
- `enabled`
- `height`
- `identifier`
- `name`
- `screen_position_x`
- `screen_position_y`
- `selected`
```
| 属性名 | 描述 |
|-----------------------------|------|
| `skip_draw_when_clipped` | |
| `style` | |
| `style_type_name_override` | |
| `tooltip` | |
| `tooltip_offset_x` | |
| `tooltip_offset_y` | |
| `visible` | |
| `width` | |
### __init__ |
omni.kit.data2ui.core.ZStack.md | # ZStack
## ZStack
### omni.kit.data2ui.core.ZStack
Bases: [omni.kit.data2ui.core.model.Stack](omni.kit.data2ui.core.Stack.html#omni.kit.data2ui.core.Stack)
### Methods
### Attributes
### omni.kit.data2ui.core.ZStack.__init__ |
omni.kit.documentation.ui.style.Classes.md | # omni.kit.documentation.ui.style Classes
## Classes Summary:
- [UIStyleDocsExtension](./omni.kit.documentation.ui.style/omni.kit.documentation.ui.style.UIStyleDocsExtension.html) |
omni.kit.documentation.ui.style.md | # omni.kit.documentation.ui.style
## Submodules
Summary:
- **omni.kit.documentation.ui.style.ui_style_docs_extension**
- No submodule docstring provided
- **omni.kit.documentation.ui.style.ui_style_docs_window**
- No submodule docstring provided
## Classes
Summary:
- **UIStyleDocsExtension** |
omni.kit.documentation.ui.style.Submodules.md | # omni.kit.documentation.ui.style Submodules
## Submodules Summary
- **omni.kit.documentation.ui.style.ui_style_docs_extension**
- No submodule docstring provided
- **omni.kit.documentation.ui.style.ui_style_docs_window**
- No submodule docstring provided |
omni.kit.documentation.ui.style.UIStyleDocsExtension.md | # UIStyleDocsExtension
## UIStyleDocsExtension
```python
class omni.kit.documentation.ui.style.UIStyleDocsExtension
```
Bases: `IExt`
### Methods
| Method | Description |
|--------------|-------------|
| `on_shutdown()` | |
| `on_startup(ext_id)` | |
```python
def __init__(self: omni.ext._extensions.IExt) -> None:
```
``` |
omni.kit.documentation.ui.style.ui_style_docs_extension.Classes.md | # omni.kit.documentation.ui.style.ui_style_docs_extension Classes
## Classes Summary:
- **UIStyleDocsExtension** |
omni.kit.documentation.ui.style.ui_style_docs_extension.UIStyleDocsExtension.md | # UIStyleDocsExtension
## UIStyleDocsExtension
```
Bases: `IExt`
### Methods
| Method | Description |
|--------------|-------------|
| `on_shutdown()` | |
| `on_startup(ext_id)` | |
```python
__init__(self: omni.ext._extensions.IExt) -> None
``` |
omni.kit.documentation.ui.style.ui_style_docs_window.Classes.md | # omni.kit.documentation.ui.style.ui_style_docs_window Classes
## Classes Summary
- **UIStyleDocsWindow**
- The window with the documentation |
omni.kit.documentation.ui.style.ui_style_docs_window.md | # omni.kit.documentation.ui.style.ui_style_docs_window
## Classes Summary:
| Class | Description |
|-------|-------------|
| [UIStyleDocsWindow](omni.kit.documentation.ui.style.ui_style_docs_window/omni.kit.documentation.ui.style.ui_style_docs_window.UIStyleDocsWindow.html) | The window with the documentation | |
omni.kit.documentation.ui.style.ui_style_docs_window.UIStyleDocsWindow.md | # UIStyleDocsWindow
## Arguments
### `__init__` (title: str, **kwargs)
### Arguments
> - `title: str`
> - The title of the window.
> - `filenames: List[str]`
> - The list of .md files to process.
> - `show_catalog: bool`
> - Show catalog pane (default True) |
omni.kit.exec.core_api.md | # Kit Orchestration and Execution Framework API
## Directory hierarchy
### dir omni
- **omni/kit**
- **omni/kit/exec**
- **omni/kit/exec/core**
### dir
- **omni/kit/exec/core/unstable**
#### Files
- **omni/kit/exec/core/unstable/IClearCallback.gen.h**
- **omni/kit/exec/core/unstable/IClearCallback.h**
- **omni/kit/exec/core/unstable/IExecutionContext.gen.h**
- **omni/kit/exec/core/unstable/IExecutionContext.h**
- **omni/kit/exec/core/unstable/IExecutionController.gen.h**
- **omni/kit/exec/core/unstable/IExecutionController.h**
- **omni/kit/exec/core/unstable/IExecutionControllerFactory.gen.h**
- **omni/kit/exec/core/unstable/IExecutionControllerFactory.h**
- **omni/kit/exec/core/unstable/IExecutionGraphSettings.gen.h**
- **omni/kit/exec/core/unstable/IExecutionGraphSettings.h**
- **omni/kit/exec/core/unstable/ITbbSchedulerState.gen.h**
- **omni/kit/exec/core/unstable/ITbbSchedulerState.h**
- **omni/kit/exec/core/unstable/Module.h**
- **omni/kit/exec/core/unstable/ParallelScheduler.h**
- **omni/kit/exec/core/unstable/TbbSchedulerState.h**
### namespace
- **omni**
### namespace
- **omni::kit**
### namespace
- **omni::kit::exec**
### namespace
- **omni::kit::exec::core**
### namespace
- **omni::kit::exec::core::unstable**
### namespace
- **omni::kit::exec::core::unstable::detail**
### struct
- **omni::kit::exec::core::unstable::ExecutionContextTime**
### class
- **omni::kit::exec::core::unstable::IClearCallback**
### class
- **omni::kit::exec::core::unstable::IClearCallback_abi**
- omni::kit::exec::core::unstable::IExecutionContext
- omni::kit::exec::core::unstable::IExecutionContext_abi
- omni::kit::exec::core::unstable::IExecutionController
- omni::kit::exec::core::unstable::IExecutionControllerFactory
- omni::kit::exec::core::unstable::IExecutionControllerFactory_abi
- omni::kit::exec::core::unstable::IExecutionController_abi
- omni::kit::exec::core::unstable::IExecutionGraphSettings
- omni::kit::exec::core::unstable::IExecutionGraphSettings_abi
- omni::kit::exec::core::unstable::ITbbSchedulerState
- omni::kit::exec::core::unstable::ITbbSchedulerState_abi
- omni::kit::exec::core::unstable::ParallelSpawner
- omni::kit::exec::core::unstable::TbbSchedulerState
- omni::kit::StageUpdateSettings
- omni::usd
## API contents
- Classes
- Macros
- Directories
- Files
- Functions
- Groups
- Namespaces
- Structs
- Typedefs
这是一个段落,包含一个链接和一张图片。 |
omni.kit.gfn.Classes.md | # omni.kit.gfn Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| IGeForceNow | Interface class to GFN SDK | |
omni.kit.gfn.Functions.md | # omni.kit.gfn Functions
## Functions Summary:
- **get_geforcenow_interface**
- Returns cached IGeForceNow interface |
omni.kit.gfn.get_geforcenow_interface.md | # get_geforcenow_interface
## get_geforcenow_interface
```python
omni.kit.gfn.get_geforcenow_interface()
```
Returns cached IGeForceNow interface
``` |
omni.kit.gfn.IGeForceNow.md | # IGeForceNow
Interface class to GFN SDK
## Methods
| Method | Description |
| --- | --- |
| `__init__(*args, **kwargs)` | |
| `get_partner_secure_data(self)` | Get partner secure data from GFN SDK |
| `shutdown(self)` | Shutdown the GFN SDK |
| `startup(self[, sdk_library_path])` | Initialize the GFN SDK |
## Methods
### get_partner_secure_data
```python
omni.kit.gfn._kit_gfn.IGeForceNow.get_partner_secure_data(self: omni.kit.gfn._kit_gfn.IGeForceNow) -> str
```
Get partner secure data from GFN SDK
### shutdown
```python
omni.kit.gfn._kit_gfn.IGeForceNow.shutdown(self: omni.kit.gfn._kit_gfn.IGeForceNow) -> None
```
Shutdown the GFN SDK
### startup
```python
omni.kit.gfn._kit_gfn.IGeForceNow.startup(self: omni.kit.gfn._kit_gfn.IGeForceNow, sdk_library_path: str = '') -> None
```
Initialize the GFN SDK |
omni.kit.gfn.md | # omni.kit.gfn
## Classes Summary
| Class | Description |
|-------|-------------|
| [IGeForceNow](./omni.kit.gfn.Classes.html) | Interface class to GFN SDK |
## Functions Summary
| Function | Description |
|----------|-------------|
| [get_geforcenow_interface](./omni.kit.gfn.Functions.html) | Returns cached IGeForceNow interface | |
omni.kit.hotkeys.core.Classes.md | # omni.kit.hotkeys.core Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| [Hotkey](omni.kit.hotkeys.core/omni.kit.hotkeys.core.Hotkey.html) | Hotkey object class. |
| [HotkeyFilter](omni.kit.hotkeys.core/omni.kit.hotkeys.core.HotkeyFilter.html) | Hotkey filter class. |
| [HotkeyRegistry](omni.kit.hotkeys.core/omni.kit.hotkeys.core.HotkeyRegistry.html) | Registry of hotkeys. |
| [HotkeysExtension](omni.kit.hotkeys.core/omni.kit.hotkeys.core.HotkeysExtension.html) | Hotkeys extension. |
| [KeyCombination](omni.kit.hotkeys.core/omni.kit.hotkeys.core.KeyCombination.html) | Key binding class. | |
omni.kit.hotkeys.core.Functions.md | # omni.kit.hotkeys.core Functions
## Functions Summary:
| Function | Description |
|----------|-------------|
| `get_hotkey_context` | Get the hotkey context. |
| `get_hotkey_registry` | Get the hotkey registry. | |
omni.kit.hotkeys.core.get_hotkey_context.md | # get_hotkey_context
## get_hotkey_context
```python
omni.kit.hotkeys.core.get_hotkey_context() -> HotkeyContext
```
Get the hotkey context.
**Returns:**
HotkeyContext object which implements the hotkey context interface.
``` |
omni.kit.hotkeys.core.get_hotkey_registry.md | # get_hotkey_registry
## get_hotkey_registry
```python
omni.kit.hotkeys.core.get_hotkey_registry()
```
- **Returns**: HotkeyRegistry object which implements the hotkey registry interface.
Get the hotkey registry.
``` |
omni.kit.hotkeys.core.Hotkey.md | # Hotkey
## Hotkey
```
class omni.kit.hotkeys.core.Hotkey
(
hotkey_ext_id: str,
key: Union[str, KeyCombination],
action_ext_id: str,
action_id: str,
filter: Optional[HotkeyFilter] = None
)
```
Bases: `object`
Hotkey object class.
### Methods
```
```
| Method | Description |
| --- | --- |
| `__init__(hotkey_ext_id, key, action_ext_id, ...)` | Define a hotkey object. |
| `execute()` | Execute action assigned to the hotkey |
### Attributes
| Attribute | Description |
| --- | --- |
| `action` | Action object assigned to this hotkey. |
| `action_text` | String of action object assigned to this hotkey. |
| `filter_text` | String of filter object assigned to this hotkey. |
| `id` | Identifier string of this hotkey. |
| `key_text` | String of key bindings assigned to this hotkey. |
### `__init__(hotkey_ext_id: str, key: Union[str, KeyCombination], action_ext_id: str, action_id: str, filter: Optional[HotkeyFilter] = None)`
Define a hotkey object.
Parameters:
- `hotkey_ext_id`: str
- `key`: Union[str, KeyCombination]
- `action_ext_id`: str
- `action_id`: str
- `filter`: Optional[HotkeyFilter] = None
- **hotkey_ext_id** (`str`) – Extension id which owns the hotkey.
- **key** (`Union[str, KeyCombination]`) – Key combination.
- **action_ext_id** (`str`) – Extension id which owns the action assigned to the hotkey.
- **action_id** (`str`) – Action id assigned to the hotkey.
**Keyword Arguments**
- **filter** (`Optional[HotkeyFilter]`) – Hotkey filter. Default None
**Returns**
- The hotkey object that was created.
**execute** () → None
- Execute action assigned to the hotkey
**property action** : Action
- Action object assigned to this hotkey.
**property action_text** : str
- String of action object assigned to this hotkey.
**property filter_text** : str
- String of filter object assigned to this hotkey.
**property id** : str
- Identifier string of this hotkey.
**property key_text** : str
- String of key bindings assigned to this hotkey. |
omni.kit.hotkeys.core.HotkeyFilter.md | # HotkeyFilter
## HotkeyFilter
```
Bases: `object`
Hotkey filter class.
### Methods
| Method | Description |
| --- | --- |
| `__init__(context=None, windows=None)` | Define a hotkey filter object. |
### Attributes
| Attribute | Description |
| --- | --- |
| `windows_text` | |
```
| | |
|---|---|
| | String of windows defined in this filter. |
### omni.kit.hotkeys.core.HotkeyFilter.__init__
__init__(context: Optional[str] = None, windows: Optional[List[str]] = None)
- Define a hotkey filter object.
- **Keyword Arguments**
- **context** (Optional[str]) – Name of context to filter. Default None.
- **windows** (Optional[List[str]]) – List of window names to filter. Default None
- **Returns**
- The hotkey filter object that was created.
### omni.kit.hotkeys.core.HotkeyFilter.windows_text
property windows_text
- String of windows defined in this filter. |
omni.kit.hotkeys.core.HotkeyRegistry.md | # HotkeyRegistry
## Methods
- `__init__()`
- Define hotkey registry object.
- `clear_storage()`
- Clear user defined hotkeys.
- `deregister_all_hotkeys_for_extension(...)`
- Deregister hotkeys registered from a special extension.
- `deregister_all_hotkeys_for_filter(filter)`
- Deregister hotkeys registered with special filter.
- `deregister_hotkey(*args, **kwargs)`
- Deregister hotkey by hotkey object or arguments.
- `deregister_hotkeys(hotkey_ext_id, key)`
- [Description missing]
Deregister hotkeys registered from a special extension with special key combination.
disable_hotkey (hotkey)
Disable a system hotkey.
edit_hotkey (hotkey, key, filter)
Change key combination of hotkey object.
export_storage (url)
Export user defined hotkeys to file.
get_all_hotkeys ()
Discover all registered hotkeys.
get_all_hotkeys_for_extension (hotkey_ext_id)
Discover hotkeys registered from a special extension.
get_all_hotkeys_for_filter (filter)
Discover hotkeys registered with special filter.
get_all_hotkeys_for_key (key)
Discover hotkeys registered from a special key.
get_hotkey (hotkey_ext_id, key[, filter])
Discover a registered hotkey.
get_hotkey_default (hotkey)
Discover hotkey default key binding and filter.
get_hotkey_for_filter (key, filter)
Discover hotkey registered with special key combination and filter.
get_hotkey_for_trigger (key[, context, window])
Discover hotkey for trigger from key combination and filter.
get_hotkeys (hotkey_ext_id, key)
Discover hotkeys registered from a special extension with special key combination.
has_duplicated_hotkey (hotkey)
Check if already have hotkey registered.
import_storage (url)
Import user defined hotkeys from file.
<p>
is_user_hotkey (hotkey)
</p>
<p>
If a user defined hotkey.
</p>
<p>
register_hotkey (*args, **kwargs)
</p>
<p>
Register hotkey by hotkey object or arguments.
</p>
<p>
restore_defaults ()
</p>
<p>
Clean user defined hotkeys and restore system hotkey to default
</p>
<p>
switch_layout (layout_name)
</p>
<p>
Change keyboard layout.
</p>
<p>
verify_hotkey (hotkey[, key_combination, ...])
</p>
<p>
Verify hotkey.
</p>
<p class="rubric">
Attributes
</p>
<p>
keyboard_layout
</p>
<p>
Current keyboard layout object in using.
</p>
<p>
last_error
</p>
<p>
Error code for last hotkey command.
</p>
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.hotkeys.core.HotkeyRegistry.__init__">
<span class="sig-name descname">
<span class="pre">
__init__
</span>
</span>
<span class="sig-paren">
()</span>
<a class="headerlink" href="#omni.kit.hotkeys.core.HotkeyRegistry.__init__" title="Permalink to this definition"></a>
</dt>
<dd>
<p>
Define hotkey registry object.
</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.hotkeys.core.HotkeyRegistry.clear_storage">
<span class="sig-name descname">
<span class="pre">
clear_storage
</span>
</span>
<span class="sig-paren">
()</span>
<span class="sig-return">
<span class="sig-return-icon">→</span>
<span class="sig-return-typehint">
<span class="pre">
None
</span>
</span>
</span>
<a class="headerlink" href="#omni.kit.hotkeys.core.HotkeyRegistry.clear_storage" title="Permalink to this definition"></a>
</dt>
<dd>
<p>
Clear user defined hotkeys.
</p>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.hotkeys.core.HotkeyRegistry.deregister_all_hotkeys_for_extension">
<span class="sig-name descname">
<span class="pre">
deregister_all_hotkeys_for_extension
</span>
</span>
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
hotkey_ext_id
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
</em>
)</span>
<span class="sig-return">
<span class="sig-return-icon">→</span>
<span class="sig-return-typehint">
<span class="pre">
None
</span>
</span>
</span>
<a class="headerlink" href="#omni.kit.hotkeys.core.HotkeyRegistry.deregister_all_hotkeys_for_extension" title="Permalink to this definition"></a>
</dt>
<dd>
<p>
Deregister hotkeys registered from a special extension.
</p>
<dl class="field-list simple">
<dt class="field-odd">
Parameters
</dt>
<dd class="field-odd">
<p>
<strong>
hotkey_ext_id
</strong>
(
<em>
Optional
</em>
<em>
[
</em>
<em>
str
</em>
<em>
]
</em>
) – Extension id that hotkeys belongs to. If None, discover all global hotkeys
</p>
</dd>
</dl>
</dd>
</dl>
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.hotkeys.core.HotkeyRegistry.deregister_all_hotkeys_for_filter">
<span class="sig-name descname">
<span class="pre">
deregister_all_hotkeys_for_filter
</span>
</span>
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
filter
</span>
</span>
</em>
)
</span>
<span class="sig-return">
<span class="sig-return-icon">→</span>
<span class="sig-return-typehint">
<span class="pre">
None
</span>
</span>
</span>
<a class="headerlink" href="#omni.kit.hotkeys.core.HotkeyRegistry.deregister_all_hotkeys_for_filter" title="Permalink to this definition"></a>
</dt>
<dd>
<p>
Deregister hotkeys registered from a special filter.
</p>
<dl class="field-list simple">
<dt class="field-odd">
Parameters
</dt>
<dd class="field-odd">
<p>
<strong>
filter
</strong>
(
<em>
Optional
</em>
<em>
[
</em>
<em>
str
</em>
<em>
]
</em>
) – Filter id that hotkeys belongs to. If None, discover all global hotkeys
</p>
</dd>
</dl>
</dd>
</dl>
### deregister_all_hotkeys_for_filter(filter: HotkeyFilter) -> None
- **Description**: Deregister hotkeys registered with special filter.
- **Parameters**:
- **filter** (HotkeyFilter) – Hotkey HotkeyFilter.
### deregister_hotkey(*args, **kwargs) -> bool
- **Description**: Deregister hotkey by hotkey object or arguments.
- **Usage**:
```python
deregister_hotkey(hotkey: Hotkey)
```
or
```python
deregister_hotkey(
hotkey_ext_id: str,
key: Union[str, KeyCombination],
filter: Optional[HotkeyFilter] = None
)
```
- **Returns**: True if hotkey found. Otherwise return False.
### deregister_hotkeys(hotkey_ext_id: str, key: Union[str, KeyCombination]) -> None
- **Description**: Deregister hotkeys registered from a special extension with special key combination.
- **Parameters**:
- **hotkey_ext_id** (str) – Extension id that hotkeys belongs to.
- **key** (Union[str, KeyCombination]) – Key combination.
### Disable_hotkey
Disable a system hotkey.
Disable means:
- Deregister the hotkey immediately
- If the hotkey is a system hotkey, do not make it work even register again until preset reset
**Parameters**
- **[Hotkey]** (`hotkey`) – Hotkey object
**Returns**
- True if hotkey found. Otherwise return False.
### Edit_hotkey
Change key combination of hotkey object.
**Parameters**
- **hotkey** (`Hotkey`) – Hotkey object to change.
- **key** (`Union[str, KeyCombination]`) – New key combination.
- **filter** (`Optional[HotkeyFilter]`) – New filter.
**Returns**
- Result code.
### Export_storage
Export storage to a specified URL.
**Parameters**
- **url** (`str`) – The URL to export the storage to.
**Returns**
- None
### Export user defined hotkeys to file.
**Parameters**
- **url** (str) – File path to export user defined hotkeys.
### Discover all registered hotkeys.
**Returns**
- List of all registered hotkeys.
### Discover hotkeys registered from a special extension.
**Parameters**
- **hotkey_ext_id** (Optional[str]) – Extension id that hotkeys belongs to. If None, discover all global hotkeys
**Returns**
- List of discovered hotkeys.
### Discover hotkeys registered with special filter.
**Parameters**
- **filter** (HotkeyFilter) – Hotkey HotkeyFilter.
**Returns**
- List of discovered hotkeys.
### Discover hotkeys registered with a specific key.
**Parameters**
- **key** (str) – The key to search for hotkeys.
**Returns**
- List of discovered hotkeys.
**get_all_hotkeys_for_key**
(Union[str, KeyCombination]) → List[Hotkey]
Discover hotkeys registered from a special key.
**Parameters**
- **key** (Union[str, KeyCombination]) – Key combination.
**Returns**
List of discovered hotkeys.
**get_hotkey**
(str, Union[str, KeyCombination], Optional[HotkeyFilter] = None) → Optional[Hotkey]
Discover a registered hotkey.
**Parameters**
- **hotkey_ext_id** (str) – Extension id which owns the hotkey.
- **key** (Union[str, KeyCombination]) – Key combination.
**Keyword Arguments**
- **filter** (Optional[HotkeyFilter] = None)
### HotkeyFilter
] ) – Hotkey filter. Default None
### Returns
Hotkey object if discovered. Otherwise None.
### get_hotkey_default
( hotkey : Hotkey ) → Tuple[ str , HotkeyFilter ]
Discover hotkey default key binding and filter.
#### Parameters
- **hotkey** ( Hotkey ) – Hotkey object.
#### Returns
Tuple of key binding string and hotkey filter object.
### get_hotkey_for_filter
( key : Union[ str , KeyCombination ] , filter : HotkeyFilter ) → Optional[ Hotkey ]
Discover hotkey registered with special key combination and filter
#### Parameters
- **key** ( Union[ str , KeyCombination ] ) – Key combination.
- **filter** ( HotkeyFilter ) – Hotkey filter.
#### Returns
First discovered hotkey. None if nothing found.
## get_hotkey_for_trigger
**Parameters**
- **key** (`Union[str, KeyCombination]`) – Key combination.
- **context** (`Optional[str]` = `None`) – Context assigned to Hotkey
- **window** (`Optional[str]` = `None`) – Window assigned to Hotkey
**Returns**
- `Optional[Hotkey]` – Hotkey object if discovered. Otherwise None.
**Description**
Discover hotkey for trigger from key combination and filter.
## get_hotkeys
**Parameters**
- **hotkey_ext_id** (`str`)
- **key** (`Union[str, KeyCombination]`)
**Returns**
- `List[Hotkey]`
### Discover hotkeys registered from a special extension with special key combination.
#### Parameters
- **hotkey_ext_id** (`str`) – Extension id that hotkeys belongs to.
- **key** (`Union[str, KeyCombination]`) – Key combination.
#### Returns
List of discovered hotkeys.
### Check if already have hotkey registered.
#### Parameters
- **hotkey** (`Hotkey`) – Hotkey object to check.
#### Returns
Result code.
### Import user defined hotkeys from file.
#### Parameters
- **url** (`str`) – File path to import user defined hotkeys.
### If a user defined hotkey.
#### Parameters
- **hotkey** (`Hotkey`) – Hotkey object.
#### Returns
True if user defined. Otherwise False.
### register_hotkey
```python
register_hotkey(hotkey: Hotkey)
```
or
```python
register_hotkey(
hotkey_ext_id: str,
key: Union[str, KeyCombination],
action_ext_id: str,
action_id: str,
filter: Optional[HotkeyFilter] = None
)
```
**Returns**
- Created hotkey object if register succeeded. Otherwise return None.
### restore_defaults
- Clean user defined hotkeys and restore system hotkey to default
### switch_layout
```python
switch_layout(layout_name: str)
```
**Parameters**
- **layout_name** (str) – Name of keyboard layout to use.
### verify_hotkey
```python
verify_hotkey(hotkey: Hotkey, key_combination: Optional[KeyCombination] = None, hotkey_filter: Optional[HotkeyFilter] = None)
```
<dl class="py method">
<dt class="sig sig-object py" id="omni.kit.hotkeys.core.HotkeyRegistry.verify_hotkey">
<em class="property">
<span class="pre">
def
</span>
<span class="w">
</span>
<span class="sig-name descname">
<span class="pre">
verify_hotkey
</span>
</span>
<span class="p">
<span class="pre">
(
</span>
</span>
<span class="sig-param">
<span class="sig-paren">
<span class="pre">
self
</span>
</span>
</span>
<span class="p">
<span class="pre">
,
</span>
</span>
<span class="sig-param">
<span class="sig-paren">
<span class="pre">
hotkey
</span>
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
Hotkey
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>
<span class="sig-paren">
)
</span>
<span class="sig-return">
<span class="sig-return-icon">
→
</span>
<span class="sig-return-typehint">
<span class="pre">
Result
</span>
</span>
</span>
</dt>
<dd>
<p>
Verify hotkey.
</p>
</dd>
</dl>
<dl class="py property">
<dt class="sig sig-object py" id="omni.kit.hotkeys.core.HotkeyRegistry.keyboard_layout">
<em class="property">
<span class="pre">
property
</span>
<span class="w">
</span>
</em>
<span class="sig-name descname">
<span class="pre">
keyboard_layout
</span>
</span>
<em class="property">
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
KeyboardLayoutDelegate
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</em>
</dt>
<dd>
<p>
Current keyboard layout object in using.
</p>
</dd>
</dl>
<dl class="py property">
<dt class="sig sig-object py" id="omni.kit.hotkeys.core.HotkeyRegistry.last_error">
<em class="property">
<span class="pre">
property
</span>
<span class="w">
</span>
</em>
<span class="sig-name descname">
<span class="pre">
last_error
</span>
</span>
<em class="property">
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="pre">
Result
</span>
</em>
</dt>
<dd>
<p>
Error code for last hotkey command.
</p>
</dd>
</dl>
</dd>
</dl> |
omni.kit.hotkeys.core.HotkeysExtension.md | # HotkeysExtension
## HotkeysExtension
```python
class omni.kit.hotkeys.core.HotkeysExtension(IExt):
```
Hotkeys extension.
### Methods
| Method | Description |
|-----------------------|----------------------|
| `on_shutdown()` | |
| `on_startup(ext_id)` | Extension startup entrypoint. |
```python
def __init__(self: omni.ext._extensions.IExt) -> None:
```
```python
def on_startup(ext_id):
```
Extension startup entrypoint. |
omni.kit.hotkeys.core.KeyCombination.md | # KeyCombination
## KeyCombination
```python
class omni.kit.hotkeys.core.KeyCombination:
def __init__(key: Union[str, KeyboardInput], modifiers: int = 0, trigger_press: bool = True):
"""
Bases: object
Key binding class.
Methods:
- __init__(key[, modifiers, trigger_press]): Create a key binding object.
- from_string(key_string):
"""
```
```
## Key Binding Information
### Key Combination Functions
- **is_valid_key_string(key)**
If key string valid.
- **as_string**
Get string to describe key combination
- **id**
Identifier string of this key binding object.
- **is_valid**
If a valid key binding object.
### Attributes
- **as_string**
Get string to describe key combination
- **id**
Identifier string of this key binding object.
- **is_valid**
If a valid key binding object.
### KeyCombination Initialization
**__init__(key: Union[str, KeyboardInput], modifiers: int = 0, trigger_press: bool = True)**
Create a key binding object.
**Parameters:**
- **key** (Union[str, carb.input.KeyboardInput]) – could be string or carb.input.KeyboardInput. If string, use “+” to join carb.input.KeyboardInput and modifiers, for example: “CTRL+D” or “CTRL+SHIFT+D”
**Keyword Arguments:**
- **modifiers** (int) – Represent combination of keyboard modifier flags, which could be:
- carb.input.KEYBOARD_MODIFIER_FLAG_CONTROL
- carb.input.KEYBOARD_MODIFIER_FLAG_SHIFT
- carb.input.KEYBOARD_MODIFIER_FLAG_ALT
- carb.input.KEYBOARD_MODIFIER_FLAG_SUPER
- **trigger_press** (bool) – Trigger when key pressed if True. Otherwise trigger when key released. Default True.
### Static Method
**from_string(key_string: str)**
<span class="pre">
KeyboardInput
</span>
<span class="pre">
int
</span>
<span class="pre">
bool
</span>
<p>
Get key binding information from a string.
</p>
<dl class="field-list simple">
<dt class="field-odd">
Parameters
</dt>
<dd class="field-odd">
<p>
<strong>
key_string
</strong>
(
<em>
str
</em>
) – String represent a key binding.
</p>
</dd>
<dt class="field-even">
Returns
</dt>
<dd class="field-even">
<p>
Tuple of carb.input.KeyboardInput, modifiers and flag for press/release.
</p>
</dd>
</dl>
<p>
If key string valid.
</p>
<dl class="field-list simple">
<dt class="field-odd">
Parameters
</dt>
<dd class="field-odd">
<p>
<strong>
key
</strong>
(
<em>
str
</em>
) – Key string to check.
</p>
</dd>
<dt class="field-even">
Returns
</dt>
<dd class="field-even">
<p>
True if key string is valid. Otherwise False.
</p>
</dd>
</dl>
<p>
Get string to describe key combination
</p>
<p>
Identifier string of this key binding object.
</p>
<p>
If a valid key binding object.
</p> |
omni.kit.hotkeys.core.md | # omni.kit.hotkeys.core
## Classes Summary
- **Hotkey**
- Hotkey object class.
- **HotkeyFilter**
- Hotkey filter class.
- **HotkeyRegistry**
- Registry of hotkeys.
- **HotkeysExtension**
- Hotkeys extension.
- **KeyCombination**
- Key binding class.
## Functions Summary
- **get_hotkey_context**
- Get the hotkey context.
- **get_hotkey_registry**
- Get the hotkey registry. |
omni.kit.hotkeys.window.Classes.md | # omni.kit.hotkeys.window Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| HotkeysExtension | Simple helper class for adding/removing “Window” menu to your extension. ui.Window creation/show/hide is still down to user to provide functionally. | |
omni.kit.hotkeys.window.column_delegate.action_column_delegate.Classes.md | # omni.kit.hotkeys.window.column_delegate.action_column_delegate Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| ActionColumnDelegate | A simple delegate to display/add action in column. | |
omni.kit.hotkeys.window.column_delegate.hotkey_column_delegate.Classes.md | # omni.kit.hotkeys.window.column_delegate.hotkey_column_delegate Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| [HotkeyColumnDelegate](omni.kit.hotkeys.window.column_delegate.hotkey_column_delegate/omni.kit.hotkeys.window.column_delegate.hotkey_column_delegate.HotkeyColumnDelegate.html) | A simple delegate to display a editable hotkey in column. |
| [KeyResetHelper](omni.kit.hotkeys.window.column_delegate.hotkey_column_delegate/omni.kit.hotkeys.window.column_delegate.hotkey_column_delegate.KeyResetHelper.html) | | |
omni.kit.hotkeys.window.column_delegate.key_editor.Classes.md | # omni.kit.hotkeys.window.column_delegate.key_editor Classes
## Classes Summary:
| Class | Description |
| --- | --- |
| [KeyEditor](#) | |
| [TriggerPressOption](#) | |
| [TriggerPressWindow](#) | The Window class represents a window in the underlying windowing system. | |
omni.kit.hotkeys.window.column_delegate.md | # omni.kit.hotkeys.window.column_delegate
## Submodules Summary:
- **omni.kit.hotkeys.window.column_delegate.action_column_delegate**
- No submodule docstring provided
- **omni.kit.hotkeys.window.column_delegate.hotkey_column_delegate**
- No submodule docstring provided
- **omni.kit.hotkeys.window.column_delegate.key_editor**
- No submodule docstring provided
- **omni.kit.hotkeys.window.column_delegate.reset_button**
- No submodule docstring provided
- **omni.kit.hotkeys.window.column_delegate.window_column_delegate**
- No submodule docstring provided |
omni.kit.hotkeys.window.column_delegate.reset_button.Classes.md | # omni.kit.hotkeys.window.column_delegate.reset_button Classes
## Classes Summary:
| Class Name |
|------------------|
| [ResetButton](#) |
| [ResetHelper](#) | |
omni.kit.hotkeys.window.column_delegate.reset_button.md | # omni.kit.hotkeys.window.column_delegate.reset_button
## Classes Summary:
- **ResetButton**
- **ResetHelper** |
omni.kit.hotkeys.window.column_delegate.Submodules.md | # omni.kit.hotkeys.window.column_delegate Submodules
## Submodules Summary
| Submodule | Description |
|-----------|-------------|
| omni.kit.hotkeys.window.column_delegate.action_column_delegate | No submodule docstring provided |
| omni.kit.hotkeys.window.column_delegate.hotkey_column_delegate | No submodule docstring provided |
| omni.kit.hotkeys.window.column_delegate.key_editor | No submodule docstring provided |
| omni.kit.hotkeys.window.column_delegate.reset_button | No submodule docstring provided |
| omni.kit.hotkeys.window.column_delegate.window_column_delegate | No submodule docstring provided | |
omni.kit.hotkeys.window.column_delegate.window_column_delegate.Classes.md | # omni.kit.hotkeys.window.column_delegate.window_column_delegate Classes
## Classes Summary:
| Class | Description |
|-------|-------------|
| [WindowColumnDelegate](#windowcolumndelegate) | A simple delegate to display/add action in column. |
### WindowColumnDelegate
A simple delegate to display/add action in column. |
omni.kit.hotkeys.window.extension.HotkeysExtension.md | # HotkeysExtension
## Methods
- `on_shutdown()`
- `on_startup()`
- `show_window(visible)`
## Attributes
- `MENU_GROUP`
- `WINDOW_NAME`
### `__init__(self: omni.ext._extensions.IExt)`
None |
omni.kit.hotkeys.window.md | # omni.kit.hotkeys.window
## Submodules
Summary:
| Module | Description |
|--------|-------------|
| omni.kit.hotkeys.window.column_delegate | No submodule docstring provided |
| omni.kit.hotkeys.window.extension | No submodule docstring provided |
| omni.kit.hotkeys.window.model | No submodule docstring provided |
| omni.kit.hotkeys.window.style | No submodule docstring provided |
| omni.kit.hotkeys.window.view | No submodule docstring provided |
| omni.kit.hotkeys.window.window | No submodule docstring provided |
## Classes
Summary:
| Class | Description |
|-------|-------------|
| HotkeysExtension | Simple helper class for adding/removing “Window” menu to your extension. ui.Window creation/show/hide is still down to user to provide functionally. | |
omni.kit.hotkeys.window.model.hotkeys_model.Classes.md | # omni.kit.hotkeys.window.model.hotkeys_model Classes
## Classes Summary
- **HotkeysModel**
- General data model for actions. |
omni.kit.hotkeys.window.model.hotkeys_model.md | # omni.kit.hotkeys.window.model.hotkeys_model
## Classes Summary:
| Class | Description |
|-------|-------------|
| [HotkeysModel](omni.kit.hotkeys.window.model.hotkeys_model/omni.kit.hotkeys.window.model.hotkeys_model.HotkeysModel.html) | General data model for actions. | |
omni.kit.hotkeys.window.model.hotkey_item.Classes.md | # omni.kit.hotkeys.window.model.hotkey_item Classes
## Classes Summary
- **AbstractFilterItem**
- Represent extension actions belongs to.
- **AddWindowItem**
- Represent extension actions belongs to.
- **EmptyFilterWindowItem**
- Represent extension actions belongs to.
- **EmptyHotkey**
- Hotkey object class.
- **EmptyHotkeyItem**
- General action item.
- **FilterContextItem**
- Represent extension actions belongs to.
- **FilterWindowItem**
- Represent extension actions belongs to.
- **GlobalFilterItem**
- Represent extension actions belongs to.
- **HotkeyDetailItem**
- (No description provided)
# General action item. |
omni.kit.hotkeys.window.model.md | # omni.kit.hotkeys.window.model
## Submodules Summary:
| Module | Description |
|--------|-------------|
| [omni.kit.hotkeys.window.model.hotkey_item](omni.kit.hotkeys.window.model.hotkey_item.html) | No submodule docstring provided |
| [omni.kit.hotkeys.window.model.hotkeys_model](omni.kit.hotkeys.window.model.hotkeys_model.html) | No submodule docstring provided |
| [omni.kit.hotkeys.window.model.search_filter_flag](omni.kit.hotkeys.window.model.search_filter_flag.html) | No submodule docstring provided |
| [omni.kit.hotkeys.window.model.windows_model](omni.kit.hotkeys.window.model.windows_model.html) | No submodule docstring provided | |
omni.kit.hotkeys.window.model.search_filter_flag.Classes.md | # omni.kit.hotkeys.window.model.search_filter_flag Classes
## Classes Summary
- **SearchFilterFlag**
- Filter flag for searching. |
omni.kit.hotkeys.window.model.Submodules.md | # omni.kit.hotkeys.window.model Submodules
## Submodules Summary
- **omni.kit.hotkeys.window.model.hotkey_item**
- No submodule docstring provided
- **omni.kit.hotkeys.window.model.hotkeys_model**
- No submodule docstring provided
- **omni.kit.hotkeys.window.model.search_filter_flag**
- No submodule docstring provided
- **omni.kit.hotkeys.window.model.windows_model**
- No submodule docstring provided |
omni.kit.hotkeys.window.model.windows_model.Classes.md | # omni.kit.hotkeys.window.model.windows_model Classes
## Classes Summary
- **WindowItem**
- The object that is associated with the data entity of the AbstractItemModel.
- **WindowsModel**
- Model to represent all ui Windows and current selected in Hotkey. |
omni.kit.hotkeys.window.style.md | # omni.kit.hotkeys.window.style
## omni.kit.hotkeys.window.style
### omni.kit.hotkeys.window.style
#### omni.kit.hotkeys.window.style
##### omni.kit.hotkeys.window.style
###### omni.kit.hotkeys.window.style |
omni.kit.hotkeys.window.Submodules.md | # omni.kit.hotkeys.window Submodules
## Submodules Summary:
| Submodule | Docstring |
|-----------|-----------|
| omni.kit.hotkeys.window.column_delegate | No submodule docstring provided |
| omni.kit.hotkeys.window.extension | No submodule docstring provided |
| omni.kit.hotkeys.window.model | No submodule docstring provided |
| omni.kit.hotkeys.window.style | No submodule docstring provided |
| omni.kit.hotkeys.window.view | No submodule docstring provided |
| omni.kit.hotkeys.window.window | No submodule docstring provided | |
omni.kit.hotkeys.window.view.hotkeys_delegate.Classes.md | # omni.kit.hotkeys.window.view.hotkeys_delegate Classes
## Classes Summary
- **HotkeysDelegate**
- General action delegate to show action item in treeview. |
omni.kit.hotkeys.window.view.hotkeys_delegate.md | # omni.kit.hotkeys.window.view.hotkeys_delegate
## Classes Summary:
| Class | Description |
|-------|-------------|
| [HotkeysDelegate](omni.kit.hotkeys.window.view.hotkeys_delegate/omni.kit.hotkeys.window.view.hotkeys_delegate.HotkeysDelegate.html) | General action delegate to show action item in treeview. | |
omni.kit.hotkeys.window.view.hotkeys_view.Classes.md | # omni.kit.hotkeys.window.view.hotkeys_view Classes
## Classes Summary
- **HotkeysView**
- TreeView is a widget that presents a hierarchical view of information. Each item can have a number of subitems. An indentation often visualizes this in a list. An item can be expanded to reveal subitems, if any exist, and collapsed to hide subitems. |
omni.kit.hotkeys.window.view.md | # omni.kit.hotkeys.window.view
## Submodules Summary:
| Submodule | Description |
|-----------|-------------|
| [omni.kit.hotkeys.window.view.hotkeys_delegate](omni.kit.hotkeys.window.view.hotkeys_delegate.html) | No submodule docstring provided |
| [omni.kit.hotkeys.window.view.hotkeys_view](omni.kit.hotkeys.window.view.hotkeys_view.html) | No submodule docstring provided | |
omni.kit.hotkeys.window.window.hotkeys_window.Classes.md | # omni.kit.hotkeys.window.window.hotkeys_window Classes
## Classes Summary:
| Class | Description |
|-------|-------------|
| [HotkeysWindow](omni.kit.hotkeys.window.window.hotkeys_window/omni.kit.hotkeys.window.window.hotkeys_window.HotkeysWindow.html) | The Window class represents a window in the underlying windowing system. | |
omni.kit.hotkeys.window.window.hotkeys_window.md | # omni.kit.hotkeys.window.window.hotkeys_window
## Classes Summary:
- **HotkeysWindow**
- The Window class represents a window in the underlying windowing system. |
omni.kit.hotkeys.window.window.md | # omni.kit.hotkeys.window.window
## Submodules Summary:
| Module | Description |
|--------|-------------|
| omni.kit.hotkeys.window.window.hotkeys_window | No submodule docstring provided |
| omni.kit.hotkeys.window.window.options_menu | No submodule docstring provided |
| omni.kit.hotkeys.window.window.search_bar | No submodule docstring provided |
| omni.kit.hotkeys.window.window.warning_window | No submodule docstring provided |
| omni.kit.hotkeys.window.window.windows_picker | No submodule docstring provided | |
omni.kit.hotkeys.window.window.options_menu.Classes.md | # omni.kit.hotkeys.window.window.options_menu Classes
## Classes Summary:
- **OptionsMenu** |
omni.kit.hotkeys.window.window.search_bar.Classes.md | # omni.kit.hotkeys.window.window.search_bar Classes
## Classes Summary:
- **SearchBar**
- Search bar, includes a search field and a filter button. |
omni.kit.hotkeys.window.window.search_bar.md | # omni.kit.hotkeys.window.window.search_bar
## Classes Summary:
| Class | Description |
| --- | --- |
| [SearchBar](omni.kit.hotkeys.window.window.search_bar/omni.kit.hotkeys.window.window.search_bar.SearchBar.html) | Search bar, includes a search field and a filter button. | |
omni.kit.hotkeys.window.window.Submodules.md | # omni.kit.hotkeys.window.window Submodules
## Submodules Summary
| Submodule | Description |
|-----------|-------------|
| omni.kit.hotkeys.window.window.hotkeys_window | No submodule docstring provided |
| omni.kit.hotkeys.window.window.options_menu | No submodule docstring provided |
| omni.kit.hotkeys.window.window.search_bar | No submodule docstring provided |
| omni.kit.hotkeys.window.window.warning_window | No submodule docstring provided |
| omni.kit.hotkeys.window.window.windows_picker | No submodule docstring provided | |
omni.kit.hotkeys.window.window.warning_window.Classes.md | # omni.kit.hotkeys.window.window.warning_window Classes
## Classes Summary
- **WarningMessage**
- WarningMessage(message: str, highlight: bool = False)
- **WarningWindow**
- Window Show warning message. |
omni.kit.hotkeys.window.window.windows_picker.Classes.md | # omni.kit.hotkeys.window.window.windows_picker Classes
## Classes Summary:
| Class | Description |
|-------|-------------|
| [WindowsPicker](omni.kit.hotkeys.window.window.windows_picker/omni.kit.hotkeys.window.window.windows_picker.WindowsPicker.html) | The Window class represents a window in the underlying windowing system. | |
omni.kit.hotkeys.window.window.windows_picker.md | # omni.kit.hotkeys.window.window.windows_picker
## Classes Summary:
- **WindowsPicker**
- The Window class represents a window in the underlying windowing system. |
omni.kit.hydra_texture.Classes.md | # omni.kit.hydra_texture Classes
## Classes Summary:
- **IHydraTexture**
- **IHydraTextureFactory** |
omni.kit.hydra_texture.IHydraTexture.md | # IHydraTexture
## Methods
- `__init__(*args, **kwargs)`
- `cancel_all_picking(self)`
- Cancel any picking or query requests that are in flight or queued.
- `get_aov_info(self[, result_handle, ...])`
- Get AOV data during EVENT_TYPE_DRAWABLE_CHANGED as a list of dictionaries.
- `get_async(self)`
- Returns whether rendering is performed on a separate thread.
- `get_camera_path(self)`
- Returns the path to the pxr.UsdGeom.Camera that will be used by the HydraEngine (Deprecated, use the "camera_path" property).
- `get_drawable_ldr_resource(self, result_handle)`
- Description not provided.
Get the drawable resource for the low-dynamic-range color buffer.
get_drawable_resource(self, result_handle, ...)
Deprecated function, DO NOT USE
get_event_stream(self)
Returns the event stream where events like drawable change are pumped.
get_frame_info(self[, result_handle, ...])
Get additional data durring EVENT_TYPE_DRAWABLE_CHANGED in dictionary form.
get_height(self)
Returns the texture height (Deprecated, use the "height" property).
get_hydra_engine(self)
Returns HydraEngine that is used currently to render to the associated texture (Deprecated, use the "hydra_engine" property).
get_imgui_reference(self[, result_handle, ...])
Deprecated function, DO NOT USE
get_name(self)
Returns name of the HydraTexture.
get_render_product_path(self)
Returns the prim path for the render product
get_settings_path(self)
Returns path to the settings section where this HydraTexture tracks its state.
get_updates_enabled(self)
Returns whether the HydraTexture is active and requesting renderers to be delivered.
get_usd_context_name(self)
Returns name of the omni.usd.UsdContext this HydraTexture is attached too.
get_width(self)
Returns the texture width (Deprecated, use the "width" property).
pick(self, x_left, y_top, x_right, y_bottom, ...)
Pick a pixel in the HydraTexture.
query(self, x, y[, callback, add_outline, ...])
Query a pixel in the HydraTexture.
| Method | Description |
|--------|-------------|
| `request_pick(self, p0, p1, mode, pick_name, ...)` | Pick a pixel in the HydraTexture. |
| `request_query(*args, **kwargs)` | Overloaded function. |
| `set_async(self, is_async)` | Sets whether it is desirable to perform rendering on another thread. |
| `set_camera_path(self[, usd_camera_path])` | Sets the USD camera prim path that will be used by the HydraEngine (Deprecated, use the "camera_path" property). |
| `set_height(self, height)` | Sets the texture height (Deprecated, use the "height" property). |
| `set_hydra_engine(self[, hydra_engine_name])` | Sets the desired HydraEngine that should render to the associated texture (Deprecated, use the "hydra_engine" property). |
| `set_render_product_path(self, prim_path[, ...])` | Sets the prim path for the render product. |
| `set_updates_enabled(self[, updates_enabled])` | Allows to pause/resume rendering updates. |
| `set_width(self, width)` | Sets the HydraTexture width (Deprecated, use the "width" property). |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `camera_path` | Gets/sets the USD camera prim path that will be used by the HydraEngine. |
| `height` | Gets/sets the texture height. |
| `hydra_engine` | Gets/sets the desired HydraEngine that should render to the associated texture. |
| `is_async` | Gets/sets whether it is desirable to perform rendering on another thread. |
| `updates_enabled` | Gets/sets viewport updates state. |
<p>
Gets/sets the texture width.
</p>
<p>
<code>width</code>
</p>
<dl>
<dt>
<code>__init__(*args, **kwargs)</code>
</dt>
<dd>
</dd>
</dl>
<dl>
<dt>
<code>cancel_all_picking(self)</code>
</dt>
<dd>
<p>
Cancel any picking or query requests that are in flight or queued.
</p>
</dd>
</dl>
<dl>
<dt>
<code>get_aov_info(self, result_handle: int = 0, aov_name: str = None, include_texture: bool = False)</code>
</dt>
<dd>
<p>
Get AOV data during EVENT_TYPE_DRAWABLE_CHANGED as a list of dictionaries.
</p>
<dl>
<dt>Parameters</dt>
<dd>
<p>
<strong>include_texture</strong> – (bool) Whether to include a dictionary for the AOVs texture, under the key ‘texture’ (defaults to False).
</p>
</dd>
<dt>Returns</dt>
<dd>
<p>
str, ‘texture’: dict}]
</p>
</dd>
<dt>Return type</dt>
<dd>
<p>
A list of dictionaries [{‘name’
</p>
</dd>
</dl>
</dd>
</dl>
### omni.kit.hydra_texture.IHydraTexture.get_async
- **Description**: Returns whether rendering is performed on a separate thread.
- **Returns**: Whether rendering is performed on a separate thread as a bool.
### omni.kit.hydra_texture.IHydraTexture.get_camera_path
- **Description**: Returns the path to the pxr.UsdGeom.Camera that will be used by the HydraEngine (Deprecated, use the “camera_path” property).
- :returns: The path to the pxr.UsdGeom.Camera this HydraTexture is rendering as a string.
### omni.kit.hydra_texture.IHydraTexture.get_drawable_ldr_resource
- **Description**: Get the drawable resource for the low-dynamic-range color buffer.
### omni.kit.hydra_texture.IHydraTexture.get_drawable_resource
- **Description**: Deprecated function, DO NOT USE
### get_event_stream
```python
get_event_stream(self: omni.hydratexture._hydra_texture.IHydraTexture) -> carb.events._events.IEventStream
```
Returns the event stream where events like drawable change are pumped.
**Returns:** The event stream where events like drawable change are pumped.
---
### get_frame_info
```python
get_frame_info(self: omni.hydratexture._hydra_texture.IHydraTexture, result_handle: int = 0, include_aov_list: bool = False) -> dict
```
Get additional data during EVENT_TYPE_DRAWABLE_CHANGED in dictionary form.
**Parameters:**
- **result_handle** – The result_handle passed as a key in the carb.event.IEvent payload for the EVENT_TYPE_DRAWABLE_CHANGED callback.
- **include_aov_list** (bool) – Whether to include an ‘aovs’ entry in the dict for the aovs available from the render (defaults to False).
**Returns:**
A dictionary.
```json
{
'view': [float] * 16,
'projection': [float] * 16,
'fps': float,
'resolution': (uint, uint),
'progression': uint,
'frame_number': number,
'subframe_count': uint,
'progression': uint,
'aovs': list
}
```
---
### get_height
```python
get_height(self: omni.hydratexture._hydra_texture.IHydraTexture) -> int
```
Returns the texture height (Deprecated, use the “height” property).
**Returns:** The height of the HydraTexture as an int.
---
### get_hydra_engine
```python
get_hydra_engine(self: omni.hydratexture._hydra_texture.IHydraTexture) -> ???
```
???
```
### get_hydra_engine
Returns HydraEngine that is used currently to render to the associated texture (Deprecated, use the “hydra_engine” property).
#### Returns
The HydraEngine this HydraTexture is rendering with as a string.
### get_imgui_reference
Deprecated function, DO NOT USE
### get_name
Returns name of the HydraTexture.
#### Returns
The name of the HydraTexture as a str.
### get_render_product_path
Returns the prim path for the render product
### get_settings_path
### get_settings_path
Returns path to the settings section where this HydraTexture tracks its state.
**Returns**: The path to the settings section where this HydraTexture tracks its state as a string.
### get_updates_enabled
Returns whether the HydraTexture is active and requesting renderers to be delivered. (Deprecated, use the “updates_enabled” property).
**Returns**: Whether the HydraTexture is active and requesting renderers to be delivered as a bool.
### get_usd_context_name
Returns name of the omni.usd.UsdContext this HydraTexture is attached too.
**Returns**: The name of the omni.usd.UsdContext as a str.
### get_width
Returns the texture width (Deprecated, use the “width” property).
**Returns**: The width of the HydraTexture as an int.
### pick
(self: omni.hydratexture._hydra_texture.IHydraTexture, x_left: int, y_top: int, x_right: int = 0, y_bottom: int = 0, mode: omni.usd._usd.PickingMode = <PickingMode.TRACK: 5>, pick_name: str = "")
### IHydraTexture.pick
Pick a pixel in the HydraTexture.
#### Parameters
- **x_left** (uint) – The left-most x coordinate to pick.
- **y_top** (uint) – The top-most y coordinate to pick.
- **x_right** (uint) – The right-most x coordinate to pick.
- **y_bottom** (uint) – The bottom-most y coordinate to pick.
- **mode** (omni.usd.PickingMode) – The mode to use when the pick completes (defaults to omni.usd.PickingMode.TRACK)
- **pick_name** (str) – A unique name for the pick to use to update/reschedule before a previous pick has completed.
- **y_down** (bool) – Whether to treat the pixel coordinate as y-down (defaults to False).
### IHydraTexture.query
```python
query(self: omni.hydratexture._hydra_texture.IHydraTexture, x: int, y: int, callback: Callable[[str, carb._carb.Double3, carb._carb.Uint2], None] = None, add_outline: bool = False, query_name: str = None)
```
### IHydraTexture.query
```python
query(self: omni.hydratexture._hydra_texture.IHydraTexture, x: int, y: int, y_down: bool = True) -> None
```
Query a pixel in the HydraTexture.
### IHydraTexture.request_pick
```python
request_pick(self: omni.hydratexture._hydra_texture.IHydraTexture, p0: carb._carb.Uint2, p1: carb._carb.Uint2, mode: omni.usd.PickingMode = <PickingMode.TRACK: 5>, pick_name: str = '', y_down: bool = True) -> bool
```
Pick a pixel in the HydraTexture.
**Parameters**
- **p0** – (Sequence[uint, uint]): The top left pixel coordinate.
- **p1** – (Sequence[uint, uint]): The bottom-right pixel coordinate.
- **mode** – (omni.usd.PickingMode) The mode to use when the pick completes (defaults to omni.usd.PickingMode.TRACK)
- **pick_name** – (str) A unique name for the pick to use to update/reschedule before a previous pick has completed.
### IHydraTexture.request_query
```python
request_query(self: omni.hydratexture._hydra_texture.IHydraTexture, *args, **kwargs)
```
Overloaded function.
1. request_query(self: omni.hydratexture._hydra_texture.IHydraTexture, pixel: carb._carb.Uint2, callback: Callable[[str, carb._carb.Double3, carb._carb.Uint2], None] = None, query_name: str = '', add_outline: bool = False, y_down: bool = True) -> bool
Query a pixel in the HydraTexture.
**Parameters**
- **pixel** – (Sequence[uint, uint]) – The pixel coordinate for the query.
- **callback** – (Callable) – The object to invoke when the query has completed.
- **query_name** – (str) – A unique name for the query to use to update/reschedule before a previous query has completed.
- **add_outline** – (bool) – Whether to add an outline to any objects the query finds (defaults to False).
- **y_down** (`bool`) – Whether to treat the pixel coordinate as y-down (defaults to False).
2.
```python
request_query(self: omni.hydratexture._hydra_texture.IHydraTexture, pixel: carb._carb.Uint2, callback: Callable[[str, carb._carb.Double3, carb._carb.Uint2], None] = None, query_name: str = '', view: handle = None, projection: handle = None, add_outline: bool = False, y_down: bool = True) -> bool
```
Query a pixel in the HydraTexture.
**Parameters**
- **pixel** (`Sequence[uint, uint]`) – The pixel coordinate for the query.
- **callback** (`Callable`) – The object to invoke when the query has completed.
- **query_name** (`str`) – A unique name for the query to use to update/reschedule before a previous query has completed.
- **view** (`[float] * 16`) – The view matrix to use for the query.
- **projection** (`[float] * 16`) – The projection matrix to use for the query.
- **add_outline** (`bool`) – Whether to add an outline to any objects the query finds (defaults to False).
- **y_down** (`bool`) – Whether to treat the pixel coordinate as y-down (defaults to False).
```python
set_async(self: omni.hydratexture._hydra_texture.IHydraTexture, is_async: bool) -> None
```
Sets whether it is desirable to perform rendering on another thread.
```python
set_camera_path(self: omni.hydratexture._hydra_texture.IHydraTexture, usd_camera_path: str = '/OmniverseKit_Persp') -> None
```
Sets the USD camera prim path that will be used by the HydraEngine (Deprecated, use the “camera_path” property).
**Parameters**
- **usd_camera_path** (`str`) – The full path to the pxr.UsdGeom.Camera to render with.
```
### set_height
```python
set_height(self: omni.hydratexture._hydra_texture.IHydraTexture, height: int) -> None
```
Sets the texture height (Deprecated, use the “height” property).
**Parameters**
- **height** (uint) – The height to render at.
### set_hydra_engine
```python
set_hydra_engine(self: omni.hydratexture._hydra_texture.IHydraTexture, hydra_engine_name: str = 'rtx') -> None
```
Sets the desired HydraEngine that should render to the associated texture (Deprecated, use the “hydra_engine” property).
**Parameters**
- **hydra_engine_name** (str) – The name of the render-engine to render with.
### set_render_product_path
```python
set_render_product_path(self: omni.hydratexture._hydra_texture.IHydraTexture, prim_path: str, keep_camera: bool = False, keep_resolution: bool = False) -> bool
```
Sets the prim path for the render product.
### Parameters
- **prim_path** (`str`) – The prim path to a valid UsdRenderProduct.
- **keep_camera** (`bool`) – Keep the viewport’s current camera.
- **keep_resolution** (`bool`) – Keep the viewport’s current resolution.
### set_updates_enabled
- **Parameters**
- **updates_enabled** – (`bool`) Whether to enable or disable rendering for this HydraTexture.
### set_width
- **Parameters**
- **width** (`int`) – The width to render at.
### camera_path
- Gets/sets the USD camera prim path that will be used by the HydraEngine.
### height
- Gets/sets the texture height.
### hydra_engine
- Gets/sets the desired HydraEngine that should render to the associated texture.
### is_async
Gets/sets whether it is desirable to perform rendering on another thread.
### updates_enabled
Gets/sets viewport updates state. Allows to pause/resume viewport updates. When paused, calls to associated HydraEngine are not made.
### width
Gets/sets the texture width. |
omni.kit.hydra_texture.IHydraTextureFactory.md | # IHydraTextureFactory
## Methods
- `__init__(*args, **kwargs)`
- `create_hydra_texture(self, name, width, height)`
- Create a HydraTexture instance to receive rendering output.
- `get_hydra_texture_from_handle(self, handle)`
- `shutdown(self)`
- `startup(self)`
### create_hydra_texture
```python
def create_hydra_texture(
self: omni.hydratexture._hydra_texture.IHydraTextureFactory,
name: str,
width: int,
height: int,
usd_context_name: str = '',
usd_camera_path: str = '/OmniverseKit_Persp',
hydra_engine_name: str = 'rtx',
is_async: bool = True,
is_async_low_latency: bool = False,
hydra_tick_rate: int = 0,
engine_creation_flags: int = 0,
device_mask: int = 0
) -> None:
pass
```
### omni.kit.hydra_texture.IHydraTextureFactory.create_hydra_texture
**Parameters**
- **name** (string) – A unique name for the HydraTexture being created.
- **width** (uint) – The width of the returned HydraTexture should start rendering at.
- **height** (uint) – The height of the HydraTexture should start rendering at.
- **usd_context_name** (str) – The name of the omni.usd.UsdContext the returned HydraTexture should attached.
- **usd_camera_path** (str) – The full-path to the pxr.UsdGeom.Camera the returned HydraTexture should render from.
- **hydra_engine_name** (str) – The name of the render-engine the returned HydraTexture should render from.
- **is_async** (bool) – Whether the returned HydraTexture will be requesting renders asynchronously.
- **is_async_low_latency** (bool) – Private/Internal.
- **hydra_tick_rate** (int) – Optionally provide a rate at which to run the rendering engine.
- **engine_creation_flags** (int) – Private/Internal.
- **device_mask** (int) – Private/Internal
**Returns**
- A HydraTexture instance.
### omni.kit.hydra_texture.IHydraTextureFactory.get_hydra_texture_from_handle
**Parameters**
- **self** (omni.hydratexture._hydra_texture.IHydraTextureFactory)
- **handle** (int)
**Returns**
- omni.hydratexture._hydra_texture.IHydraTexture
shutdown(self: omni.hydratexture._hydra_texture.IHydraTextureFactory) -> bool
startup(self: omni.hydratexture._hydra_texture.IHydraTextureFactory) -> bool
|
omni.kit.language.core.Classes.md | # omni.kit.language.core Classes
## Classes Summary:
| Class | Description |
|-------|-------------|
| LanguageExtension | Font & Language support class | |
omni.kit.language.core.Functions.md | # omni.kit.language.core Functions
## Functions Summary:
| Function Name | Description |
|---------------|-------------|
| get_default_locale_id | Get the locale name that kit used when started. EG. “en_US” |
| get_language_info | Get registered information about language. |
| get_locale_id | Get current locale name. EG. “en_US” |
| get_locales | Get list of registered locale names. |
| has_font_changed | Compares default_locale_id with locale_id and returns True/False. |
| register_language | Registers a new language. |
| unregister_language | Unregisters a new language. | |
omni.kit.language.core.get_default_locale_id.md | # get_default_locale_id
## get_default_locale_id
```python
omni.kit.language.core.get_default_locale_id() -> str
```
Get the locale name that kit used when started. EG. “en_US”
**Returns:**
- locale name (str)
``` |
omni.kit.language.core.get_language_info.md | # get_language_info
## get_language_info
```python
omni.kit.language.core.get_language_info(locale_id) -> dict
```
Get registered information about language.
**Parameters:**
- **locale_id** (str) – EG. “en_US”
**Returns:**
- locale info dictionary (dict)
``` |
omni.kit.language.core.get_locales.md | # get_locales
## get_locales
```python
omni.kit.language.core.get_locales() -> list[str]
```
Get list of registered locale names.
### Returns
- list of known locales (list[str]) |
omni.kit.language.core.get_locale_id.md | # get_locale_id
## get_locale_id
```python
omni.kit.language.core.get_locale_id() -> str
```
Get current locale name. EG. “en_US”
**Returns:**
- locale name (str)
``` |
omni.kit.language.core.has_font_changed.md | # has_font_changed
## has_font_changed
```python
omni.kit.language.core.has_font_changed(locale_id: str) -> bool
```
Compares default_locale_id with locale_id and returns True/False.
### Parameters
- **locale_id** (str) – EG. “en_US”
### Returns
- True if locale info is different to current locale info (bool) |
omni.kit.language.core.LanguageExtension.md | # LanguageExtension
## Class omni.kit.language.core.LanguageExtension
- **Bases:** `omni.ext._extensions.IExt`
- **Description:** Font & Language support class
### Methods
- `__init__(self)`
- `get_language_info(locale_id)`
- Get registered information about language.
- `get_locale_id()`
- `get_locales()`
- Get list of registered locale names.
- `has_font_changed(locale_id)`
- Compares default_locale_id with locale_id and returns True/False.
- `on_shutdown()`
- `on_startup(ext_id)`
| Method | Description |
| --- | --- |
| `register_language(locale_info, font_path, ...)` | Registers a new language. |
| `switch_language()` | |
| `unregister_language(locale_id)` | Unregisters a new language. |
### __init__(self: omni.ext._extensions.IExt) -> None
### get_language_info(locale_id: str) -> dict
Get registered information about language.
**Parameters:**
- **locale_id** (str) – EG. “en_US”
**Returns:**
- locale info dictionary (dict)
### get_locales() -> list[str]
Get list of registered locale names.
**Returns:**
- list of known locales (list[str])
### has_font_changed(locale_id: str) -> bool
Compares default_locale_id with locale_id and returns True/False.
**Parameters:**
- **locale_id** (str) – EG. “en_US”
**Returns:**
- True is locale info is different to current locale info (bool)
### register_language(locale_info: tuple, font_path: ...) -> ...
### Register Language
```python
register_language(
locale_info: tuple,
font_path: str,
font_scale: float,
regions: list[str],
pangram: str
) -> bool
```
Registers a new language. (Currently on has font support)
This function added a new language to the pool of known languages and then attempts to switch to the new language if current locale_id matches given locale_id.
**Parameters:**
- **locale_info** (tuple) – contains locale_id, language name and localized language name.
- **font_path** (str) – path to a font file that will be used instead of default font.
- **font_scale** (float) – additional scaling to font.
- **regions** (list[str]) – list of region files that contain the characters to be used. See kit/source/extensions/omni.kit.renderer.imgui/data/regions/ for an example.
- **pangram** (str) – string containing all the letters in the alphabet. EG. “The quick brown fox jumps over the lazy dog”.
**Returns:**
- True on success or False in error.
### Unregister Language
```python
unregister_language(locale_id: str) -> bool
```
Unregisters a new language.
This function removed a language to the pool of known languages.
**Parameters:**
- **locale_id** (str) – EG. “en_US”
**Returns:**
- True on success or False on failure. |
omni.kit.language.core.md | # omni.kit.language.core
## Submodules Summary:
- [omni.kit.language.core.scripts](omni.kit.language.core.scripts.html)
- Font & language support class
## Classes Summary:
- [LanguageExtension](omni.kit.language.core/omni.kit.language.core.LanguageExtension.html)
- Font & Language support class
## Functions Summary:
- [get_default_locale_id](omni.kit.language.core/omni.kit.language.core.get_default_locale_id.html)
- Get the locale name that kit used when started. EG. “en_US”
- [get_language_info](omni.kit.language.core/omni.kit.language.core.get_language_info.html)
- Get registered information about language.
- [get_locale_id](omni.kit.language.core/omni.kit.language.core.get_locale_id.html)
- Get current locale name. EG. “en_US”
- [get_locales](omni.kit.language.core/omni.kit.language.core.get_locales.html)
- Get list of registered locale names.
- [has_font_changed](omni.kit.language.core/omni.kit.language.core.has_font_changed.html)
- Compares default_locale_id with locale_id and returns True/False.
- [register_language](omni.kit.language.core/omni.kit.language.core.register_language.html)
- Registers a new language.
- [unregister_language](omni.kit.language.core/omni.kit.language.core.unregister_language.html)
- Unregisters a new language. |
omni.kit.language.core.register_language.md | # register_language
## register_language
```python
omni.kit.language.core.register_language(
locale_info: tuple,
font_path: str,
font_scale: float,
regions: list[str],
pangram: str
) -> bool
```
### Description
Registers a new language.
This function adds a new language to the pool of known languages and then attempts to switch to the new language if the current locale_id matches the given locale_id.
### Parameters
- **locale_info** (tuple) – contains locale_id, language name, and localized language name.
- **font_path** (str) – path to a font file that will be used instead of the default font.
- **font_scale** (float) – additional scaling to the font.
- **regions** (list[str]) – list of regions.
- **pangram** (str) – a short sentence using all letters of the alphabet.
- **regions** (list) – list of region files that contain the characters to be used. See kit/source/extensions/omni.kit.renderer.imgui/data/regions/ for an example.
- **pangram** (str) – string containing all the letters in the alphabet. EG. “The quick brown fox jumps over the lazy dog”.
**Returns**
- True on success or False in error. |
omni.kit.language.core.scripts.Classes.md | # omni.kit.language.core.scripts Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| LanguageExtension | Font & Language support class | |
omni.kit.language.core.scripts.get_locales.md | # get_locales
## get_locales
→ list[str]
### Returns
- list of known locales (list[str]) |
omni.kit.language.core.scripts.has_font_changed.md | # has_font_changed
## omni.kit.language.core.scripts.has_font_changed
```python
def has_font_changed(locale_id: str) -> bool:
```
Compares default_locale_id with locale_id and returns True/False.
**Parameters**
- **locale_id** (str) – EG. “en_US”
**Returns**
- True is locale info is different to current locale info (bool) |
omni.kit.language.core.scripts.language.Classes.md | # omni.kit.language.core.scripts.language Classes
## Classes Summary:
| Class | Description |
|-------|-------------|
| [LanguageExtension](omni.kit.language.core.scripts.language/omni.kit.language.core.scripts.language.LanguageExtension.html) | Font & Language support class | |
omni.kit.language.core.scripts.language.md | # omni.kit.language.core.scripts.language
## Classes Summary
- **LanguageExtension**
- Font & Language support class
## Functions Summary
- **get_default_locale_id**
- Get the locale name that kit used when started. EG. “en_US”
- **get_language_info**
- Get registered information about language.
- **get_locale_id**
- Get current locale name. EG. “en_US”
- **get_locales**
- Get list of registered locale names.
- **has_font_changed**
- Compares default_locale_id with locale_id and returns True/False.
- **register_language**
- Registers a new language.
- **unregister_language**
- Unregisters a new language.
```javascript
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
```
``` |
omni.kit.language.core.scripts.LanguageExtension.md | # LanguageExtension
## Classes
### LanguageExtension
- **Bases:** `omni.ext._extensions.IExt`
- **Description:** Font & Language support class
#### Methods
- `__init__(self)`
- `get_language_info(locale_id)` - Get registered information about language.
- `get_locale_id()`
- `get_locales()` - Get list of registered locale names.
- `has_font_changed(locale_id)` - Compares default_locale_id with locale_id and returns True/False.
- `on_shutdown()`
| Method | Description |
|--------|-------------|
| `on_startup` (ext_id) | |
| `register_language` (locale_info, font_path, ...) | Registers a new language. |
| `switch_language` () | |
| `unregister_language` (locale_id) | Unregisters a new language. |
### `__init__`(self: omni.ext._extensions.IExt) -> None
### `get_language_info`(locale_id) -> dict
Get registered information about language.
**Parameters**
- **locale_id** (str) – EG. “en_US”
**Returns**
- locale info dictionary (dict)
### `get_locales`() -> list[str]
Get list of registered locale names.
**Returns**
- list of known locales (list[str])
### `has_font_changed`(locale_id: str) -> bool
Compares default_locale_id with locale_id and returns True/False.
**Parameters**
- **locale_id** (str) – EG. “en_US”
**Returns**
- True is locale info is different to current locale info (bool)
### `register_language`(locale_info, font_path, ...) -> None
Registers a new language.
<em>
<span class="n">
<span class="pre">
locale_info
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
tuple
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
font_path
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
str
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
font_scale
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
float
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
regions
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
list
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
pangram
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
str
</span>
</span>
</em>
)
→
bool
<dt>
<dd>
<p>
Registers a new language. (Currently on has font support)
</p>
<p>
This function added a new language to the pool of known languages and then
attempts to switch to the new language if current locale_id matches given locale_id.
</p>
<dl class="field-list simple">
<dt class="field-odd">
Parameters
</dt>
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
locale_info
</strong>
(
<em>
tuple
</em>
) – contains locale_id, language name and localized language name.
</p>
</li>
<li>
<p>
<strong>
font_path
</strong>
(
<em>
str
</em>
) – path to a font file that will be used instead of default font.
</p>
</li>
<li>
<p>
<strong>
font_scale
</strong>
(
<em>
float
</em>
) – additional scaling to font.
</p>
</li>
<li>
<p>
<strong>
regions
</strong>
(
<em>
list
</em>
<em>
[
</em>
<em>
str
</em>
<em>
]
</em>
) – list of region files that contain the characters to be used. See kit/source/extensions/omni.kit.renderer.imgui/data/regions/ for an example.
</p>
</li>
<li>
<p>
<strong>
pangram
</strong>
(
<em>
str
</em>
) – string containing all the letters in the alphabet. EG. “The quick brown fox jumps over the lazy dog”.
</p>
</li>
</ul>
</dd>
<dt class="field-even">
Returns
</dt>
<dd class="field-even">
<p>
True on success or False in error.
</p>
</dd>
</dl>
</dd>
</dt>
<dt>
<dd>
<p>
Unregisters a new language.
</p>
<p>
This function removed a language to the pool of known languages.
</p>
<dl class="field-list simple">
<dt class="field-odd">
Parameters
</dt>
<dd class="field-odd">
<p>
<strong>
locale_id
</strong>
(
<em>
str
</em>
) – EG. “en_US”
</p>
</dd>
<dt class="field-even">
Returns
</dt>
<dd class="field-even">
<p>
True on success or False on failure.
</p>
</dd>
</dl>
</dd>
</dt> |
omni.kit.language.core.scripts.md | # omni.kit.language.core.scripts
## Submodules
Summary:
| Module | Description |
| --- | --- |
| [omni.kit.language.core.scripts.language](./omni.kit.language.core.scripts.Submodules.html) | Font & Language support class |
## Classes
Summary:
| Class | Description |
| --- | --- |
| [LanguageExtension](omni.kit.language.core.scripts/omni.kit.language.core.scripts.LanguageExtension.html) | Font & Language support class |
## Functions
Summary:
| Function | Description |
| --- | --- |
| [get_default_locale_id](omni.kit.language.core.scripts/omni.kit.language.core.scripts.get_default_locale_id.html) | Get the locale name that kit used when started. EG. “en_US” |
| [get_language_info](omni.kit.language.core.scripts/omni.kit.language.core.scripts.get_language_info.html) | Get registered information about language. |
| [get_locale_id](omni.kit.language.core.scripts/omni.kit.language.core.scripts.get_locale_id.html) | Get current locale name. EG. “en_US” |
| [get_locales](omni.kit.language.core.scripts/omni.kit.language.core.scripts.get_locales.html) | Get list of registered locale names. |
| [has_font_changed](omni.kit.language.core.scripts/omni.kit.language.core.scripts.has_font_changed.html) | Compares default_locale_id with locale_id and returns True/False. |
| [register_language](omni.kit.language.core.scripts/omni.kit.language.core.scripts.register_language.html) | Registers a new language. |
| [unregister_language](omni.kit.language.core.scripts/omni.kit.language.core.scripts.unregister_language.html) | Unregisters a new language. |
# 标题1
## 标题2
### 标题3
这是一个段落。
```
```html
这是代码块。
```
- 列表项1
- 列表项2
> 引用内容
**加粗文本**
*斜体文本*
---
这是另一个段落。 |
Subsets and Splits