file_path
stringlengths 5
148
| content
stringlengths 150
498k
| size
int64 150
498k
|
---|---|---|
omni.example.cpp.usdrt.IExampleUsdrtInterface.md | # IExampleUsdrtInterface
## IExampleUsdrtInterface
```
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | |
| `apply_random_rotation(self, stageId, primPath)` | |
| `deform_mesh(self, stageId, primPath, time)` | |
| `get_attributes_for_prim(self, stageId, primPath)` | |
```python
# __init__(*args, **kwargs)
```
```python
# apply_random_rotation(self, stageId, primPath)
```
```python
# deform_mesh(self, stageId, primPath, time)
```
```python
# get_attributes_for_prim(self, stageId, primPath)
```
## apply_random_rotation
```
```markdown
## deform_mesh
```
```markdown
## get_attributes_for_prim
```
```markdown
# Omni.Example.Cpp.Usdrt.IExampleUsdrtInterface.get_attributes_for_prim
## 说明
### 属性
#### 获取Prim的属性
```
``` | 780 |
omni.example.cpp.usdrt.md | # omni.example.cpp.usdrt
## Classes Summary
- **IExampleUsdrtInterface**
## Functions Summary
- **acquire_example_usdrt_interface**
- acquire_example_usdrt_interface(plugin_name: str = None, library_path: str = None) -> omni.example.cpp.usdrt._example_usdrt_bindings.IExampleUsdrtInterface
- **release_example_usdrt_interface**
- release_example_usdrt_interface(arg0: omni.example.cpp.usdrt._example_usdrt_bindings.IExampleUsdrtInterface) -> None | 455 |
omni.example.cpp.usdrt_api.md | # Kit Extension Template C++ API
## Class Hierarchy
- namespace omni
- namespace example
- namespace cpp
- namespace usdruntime
- class IExampleUsdrtInterface
## File Hierarchy
- Directory omni
- Directory example
- Directory cpp
- Directory usdrt
- File IExampleUsdrtInterface.h
## Namespaces
- omni
- omni::example
- omni::example::cpp
- omni::example::cpp::usdruntime
## 接口说明
- **omni::example::cpp::usdruntime::IExampleUsdrtInterface**: 接口用于从Python与示例C++ USDRT插件交互。 | 516 |
omni.example.cpp.usd_api.md | # Kit Extension Template C++ API
## Class Hierarchy
- namespace [omni](namespace_omni.html#namespace-omni)
- namespace [example](namespace_omni__example.html#namespace-omni-example)
- namespace [cpp](namespace_omni__example__cpp.html#namespace-omni-example-cpp)
- namespace [usd](namespace_omni__example__cpp__usd.html#namespace-omni-example-cpp-usd)
- class [IExampleUsdInterface](classomni_1_1example_1_1cpp_1_1usd_1_1_i_example_usd_interface.html#exhale-class-classomni-1-1example-1-1cpp-1-1usd-1-1-i-example-usd-interface)
## File Hierarchy
- Directory [omni](dir_omni.html#dir-omni)
- Directory [example](dir_omni_example.html#dir-omni-example)
- Directory [cpp](dir_omni_example_cpp.html#dir-omni-example-cpp)
- Directory [usd](dir_omni_example_cpp_usd.html#dir-omni-example-cpp-usd)
- File [IExampleUsdInterface.h](file_omni_example_cpp_usd_IExampleUsdInterface.h.html#file-omni-example-cpp-usd-IExampleUsdInterface.h)
## Namespaces
- [omni](namespace_omni.html#namespace-omni)
- [omni::example](namespace_omni__example.html#namespace-omni-example)
- [omni::example::cpp](namespace_omni__example__cpp.html#namespace-omni-example-cpp)
- [omni::example::cpp::usd](namespace_omni__example__cpp__usd.html#namespace-omni-example-cpp-usd)
## Classes and Structs
- omni::example::cpp::usd::IExampleUsdInterface: Interface used to interact with the example C++ USD plugin from Python. | 1,430 |
omni.example.cpp.usd_physics.md | # omni.example.cpp.usd_physics
## Navigation
- [API (python)](API.html)
- [Modules](Modules.html)
## Breadcrumbs
- [Home](https://docs.omniverse.nvidia.com/kit/docs) »
- [API (python)](API.html) »
- [Modules](Modules.html) »
- omni.example.cpp.usd_physics | 259 |
omni.example.python.hello_world.ExamplePythonHelloWorldExtension.md | # ExamplePythonHelloWorldExtension
## ExamplePythonHelloWorldExtension
Bases: `omni.ext._extensions.IExt`
### Methods
| Method | Description |
|--------|-------------|
| `on_shutdown()` | |
| `on_startup(ext_id)` | |
### `__init__(self: omni.ext._extensions.IExt) -> None` | 277 |
omni.example.python.hello_world.hello_world_extension.ExamplePythonHelloWorldExtension.md | # ExamplePythonHelloWorldExtension
## ExamplePythonHelloWorldExtension
```
class omni.example.python.hello_world.hello_world_extension.ExamplePythonHelloWorldExtension
```
**Bases:**
```
omni.ext._extensions.IExt
```
**Methods**
| Method | Description |
|--------------|-------------|
| on_shutdown | |
| on_startup(ext_id) | |
**__init__**
```
__init__(self: omni.ext._extensions.IExt) -> None
```
``` | 435 |
omni.example.python.hello_world.hello_world_extension.md | # omni.example.python.hello_world.hello_world_extension
## Classes Summary
- ExamplePythonHelloWorldExtension
## Functions Summary
- hello_from
- hello_squared | 161 |
omni.example.python.hello_world.md | # omni.example.python.hello_world
## Submodules
Summary:
| Module | Description |
|--------|-------------|
| [omni.example.python.hello_world.hello_world_extension](omni.example.python.hello_world.hello_world_extension.html) | No submodule docstring provided |
## Classes
Summary:
| Class | Description |
|-------|-------------|
| [ExamplePythonHelloWorldExtension](omni.example.python.hello_world/omni.example.python.hello_world.ExamplePythonHelloWorldExtension.html) | |
## Functions
Summary:
| Function | Description |
|----------|-------------|
| [hello_from](omni.example.python.hello_world/omni.example.python.hello_world.hello_from.html) | |
| [hello_squared](omni.example.python.hello_world/omni.example.python.hello_world.hello_squared.html) | | | 765 |
omni.example.python.hello_world.Submodules.md | # omni.example.python.hello_world Submodules
## Submodules Summary
- **omni.example.python.hello_world.hello_world_extension**
- No submodule docstring provided | 164 |
omni.example.python.ui.Classes.md | # omni.example.python.ui Classes
## Classes Summary:
| Class | Description |
|-------|-------------|
| [CppWidget](omni.example.python.ui/omni.example.python.ui.CppWidget.html) | A simple C++ omni.ui widget that draws a rectangle. |
| [ExamplePythonUIExtension](omni.example.python.ui/omni.example.python.ui.ExamplePythonUIExtension.html) | | | 345 |
omni.example.python.ui.ExamplePythonUIExtension.md | # ExamplePythonUIExtension
## ExamplePythonUIExtension
```
class omni.example.python.ui.ExamplePythonUIExtension
```
Bases:
```
omni.ext._extensions.IExt
```
### Methods
| Method | Description |
|--------|-------------|
| `on_shutdown()` | |
| `on_startup(ext_id)` | |
### `__init__(self: omni.ext._extensions.IExt) -> None`
```
``` | 340 |
omni.example.python.ui.md | # omni.example.python.ui
## Classes Summary
- **CppWidget**
- A simple C++ omni.ui widget that draws a rectangle.
- **ExamplePythonUIExtension**
- (No description provided) | 178 |
omni.example.python.usdrt.alignment.md | # alignment
## alignment
### alignment(C type)
- Returns: integer
### alignment(C instance)
- Returns: integer
#### Description
Return the alignment requirements of a C instance | 183 |
omni.example.python.usdrt.apply_random_rotation.md | # apply_random_rotation
## apply_random_rotation
```python
omni.example.python.usdrt.apply_random_rotation(stage_id, path)
```
Apply a random world space rotation to a prim in Fabric
``` | 189 |
omni.example.python.usdrt.condensed_vtarray_str.md | # condensed_vtarray_str
## condensed_vtarray_str
```python
omni.example.python.usdrt.condensed_vtarray_str(data)
```
Return a string representing VtArray data
Include at most 6 values, and the total items
in the array
``` | 224 |
omni.example.python.usdrt.deform_mesh_with_warp.md | # deform_mesh_with_warp
## deform_mesh_with_warp
```python
omni.example.python.usdrt.deform_mesh_with_warp(stage_id, path, time)
```
Use Warp to deform a Mesh prim
``` | 169 |
omni.example.python.usdrt.example_python_usdrt_extension.alignment.md | # alignment
## alignment
```
- **omni.example.python.usdrt.example_python_usdrt_extension.alignment**
- **Parameters:**
- `C type`
- **Returns:**
- `integer`
- **Description:**
- Return the alignment requirements of a C instance
- **omni.example.python.usdrt.example_python_usdrt_extension.alignment**
- **Parameters:**
- `C instance`
- **Returns:**
- `integer`
- **Description:**
- Return the alignment requirements of a C instance | 471 |
omni.example.python.usdrt.example_python_usdrt_extension.condensed_vtarray_str.md | # condensed_vtarray_str
## condensed_vtarray_str
```python
def condensed_vtarray_str(data):
"""
Return a string representing VtArray data
Include at most 6 values, and the total items
in the array
"""
```
``` | 231 |
omni.example.python.usdrt.example_python_usdrt_extension.Functions.md | # omni.example.python.usdrt.example_python_usdrt_extension Functions
## Functions Summary
| Function Name | Description |
|---------------|-------------|
| apply_random_rotation | Apply a random world space rotation to a prim in Fabric |
| condensed_vtarray_str | Return a string representing VtArray data |
| deform_mesh_with_warp | Use Warp to deform a Mesh prim |
| get_fabric_data_for_prim | Get the Fabric data for a path as a string |
| get_selected_prim_path | Return the path of the first selected prim |
| get_stage_id | Return the stage Id of the current stage |
| is_vtarray | Check if this is a VtArray type |
| alignment | alignment(C type) -> integer |
``` | 672 |
omni.example.python.usdrt.example_python_usdrt_extension.get_fabric_data_for_prim.md | # get_fabric_data_for_prim
## get_fabric_data_for_prim
```
```python
omni.example.python.usdrt.example_python_usdrt_extension.get_fabric_data_for_prim(stage_id, path)
```
Get the Fabric data for a path as a string
``` | 224 |
omni.example.python.usdrt.example_python_usdrt_extension.get_selected_prim_path.md | # get_selected_prim_path
## get_selected_prim_path
### omni.example.python.usdrt.example_python_usdrt_extension.get_selected_prim_path
#### Return the path of the first selected prim | 191 |
omni.example.python.usdrt.example_python_usdrt_extension.is_vtarray.md | # is_vtarray
## is_vtarray
```python
omni.example.python.usdrt.example_python_usdrt_extension.is_vtarray(obj)
```
Check if this is a VtArray type
In Python, each data type gets its own VtArray class i.e. Vt.Float3Array etc. so this helper identifies any of them.
``` | 270 |
omni.example.python.usdrt.example_python_usdrt_extension.md | # omni.example.python.usdrt.example_python_usdrt_extension
## Classes Summary:
- [UsdrtExamplePythonExtension](omni.example.python.usdrt.example_python_usdrt_extension/omni.example.python.usdrt.example_python_usdrt_extension.UsdrtExamplePythonExtension.html)
## Functions Summary:
- [apply_random_rotation](omni.example.python.usdrt.example_python_usdrt_extension/omni.example.python.usdrt.example_python_usdrt_extension.apply_random_rotation.html) - Apply a random world space rotation to a prim in Fabric
- [condensed_vtarray_str](omni.example.python.usdrt.example_python_usdrt_extension/omni.example.python.usdrt.example_python_usdrt_extension.condensed_vtarray_str.html) - Return a string representing VtArray data
- [deform_mesh_with_warp](omni.example.python.usdrt.example_python_usdrt_extension/omni.example.python.usdrt.example_python_usdrt_extension.deform_mesh_with_warp.html) - Use Warp to deform a Mesh prim
- [get_fabric_data_for_prim](omni.example.python.usdrt.example_python_usdrt_extension/omni.example.python.usdrt.example_python_usdrt_extension.get_fabric_data_for_prim.html) - Get the Fabric data for a path as a string
- [get_selected_prim_path](omni.example.python.usdrt.example_python_usdrt_extension/omni.example.python.usdrt.example_python_usdrt_extension.get_selected_prim_path.html) - Return the path of the first selected prim
- [get_stage_id](omni.example.python.usdrt.example_python_usdrt_extension/omni.example.python.usdrt.example_python_usdrt_extension.get_stage_id.html) - Return the stage Id of the current stage
- [is_vtarray](omni.example.python.usdrt.example_python_usdrt_extension/omni.example.python.usdrt.example_python_usdrt_extension.is_vtarray.html) - Check if this is a VtArray type
# alignment
alignment(C type) -> integer | 1,770 |
omni.example.python.usdrt.example_python_usdrt_extension.UsdrtExamplePythonExtension.md | # UsdrtExamplePythonExtension
## UsdrtExamplePythonExtension
- **Bases:** `omni.ext._extensions.IExt`
### Methods
| Method | Description |
|--------------|-------------|
| `on_shutdown()` | |
| `on_startup(ext_id)` | |
### `__init__(self: omni.ext._extensions.IExt) -> None` | 306 |
omni.example.python.usdrt.is_vtarray.md | # is_vtarray
## is_vtarray
Check if this is a VtArray type
In Python, each data type gets its own VtArray class i.e. Vt.Float3Array etc. so this helper identifies any of them. | 177 |
omni.example.python.usdrt.md | # omni.example.python.usdrt
## Submodules
Summary:
| Module | Description |
|--------|-------------|
| [omni.example.python.usdrt.example_python_usdrt_extension](omni.example.python.usdrt.example_python_usdrt_extension.html) | No submodule docstring provided |
## Classes
Summary:
| Class | Description |
|-------|-------------|
| [UsdrtExamplePythonExtension](omni.example.python.usdrt/omni.example.python.usdrt.UsdrtExamplePythonExtension.html) | |
## Functions
Summary:
| Function | Description |
|----------|-------------|
| [apply_random_rotation](omni.example.python.usdrt/omni.example.python.usdrt.apply_random_rotation.html) | Apply a random world space rotation to a prim in Fabric |
| [condensed_vtarray_str](omni.example.python.usdrt/omni.example.python.usdrt.condensed_vtarray_str.html) | Return a string representing VtArray data |
| [deform_mesh_with_warp](omni.example.python.usdrt/omni.example.python.usdrt.deform_mesh_with_warp.html) | Use Warp to deform a Mesh prim |
| [get_fabric_data_for_prim](omni.example.python.usdrt/omni.example.python.usdrt.get_fabric_data_for_prim.html) | Get the Fabric data for a path as a string |
| [get_selected_prim_path](omni.example.python.usdrt/omni.example.python.usdrt.get_selected_prim_path.html) | Return the path of the first selected prim |
| [get_stage_id](omni.example.python.usdrt/omni.example.python.usdrt.get_stage_id.html) | Return the stage Id of the current stage |
| [is_vtarray](omni.example.python.usdrt/omni.example.python.usdrt.is_vtarray.html) | Check if this is a VtArray type |
| [alignment](omni.example.python.usdrt/omni.example.python.usdrt.alignment.html) | alignment(C type) -> integer | | 1,674 |
omni.example.python.usdrt.Submodules.md | # omni.example.python.usdrt Submodules
## Submodules Summary
| Module | Description |
|--------|-------------|
| [omni.example.python.usdrt.example_python_usdrt_extension](omni.example.python.usdrt.example_python_usdrt_extension.html) | No submodule docstring provided | | 272 |
omni.example.python.usdrt.UsdrtExamplePythonExtension.md | # UsdrtExamplePythonExtension
## UsdrtExamplePythonExtension
```python
class omni.example.python.usdrt.UsdrtExamplePythonExtension
```
Bases:
```python
omni.ext._extensions.IExt
```
### Methods
| Method | Description |
|--------|-------------|
| `on_shutdown()` | |
| `on_startup(ext_id)` | |
```python
def __init__(self: omni.ext._extensions.IExt) -> None:
```
``` | 373 |
omni.ext.acquire_extensions_interface.md | # acquire_extensions_interface
## acquire_extensions_interface
```python
omni.ext.acquire_extensions_interface(plugin_name: str = None, library_path: str = None) -> omni.ext._extensions.IExtensions
```
- **plugin_name**: str, optional, default is None
- **library_path**: str, optional, default is None
- **Returns**: [omni.ext._extensions.IExtensions](omni.ext.IExtensions.html#omni.ext.IExtensions)
``` | 406 |
omni.ext.Classes.md | # omni.ext Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| DownloadState | Index/Extension Download States. |
| ExtensionManager | |
| ExtensionPathType | Index Refresh States. |
| ExtensionStateChangeType | Members: |
| ICppExt | |
| IExt | |
| IExtensionManagerHooks | |
| IExtensions | |
| IHookHolder | Hook holder. |
| IRegistryProvider | | | 393 |
omni.ext.create_link.md | # create_link
## create_link
Creates a symbolic link from ‘link_path’ to ‘target_path’
### Parameters
- **link_path** – Absolute or relative path to link to create
- **target_path** – Absolute or relative path to target; if relative then it is relative to ‘link_path’
- **target_is_dir** – This boolean is only used on Windows to specify if the target is a directory or file. | 381 |
omni.ext.DownloadState.md | # DownloadState
## DownloadState
```
Bases: `pybind11_object`
Index/Extension Download States.
Members:
- DOWNLOADING
- DOWNLOAD_SUCCESS
- DOWNLOAD_FAILURE
### Methods
| Method | Description |
|--------|-------------|
| `__init__(self, value)` | |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `DOWNLOADING` | |
| `DOWNLOAD_FAILURE` | |
| `DOWNLOAD_SUCCESS` | |
| `name` | |
| `value` | |
*omni.ext._extensions.DownloadState(value: int)*
→ None
*property name* | 502 |
omni.ext.ExtensionManager.md | # ExtensionManager
## Class omni.ext.ExtensionManager
Bases: `pybind11_object`
### Methods
- **`__init__(*args, **kwargs)`**
- **`add_path(self, path, type)`**
- **`add_path_protocol_provider(self, scheme, ...)`**
- Add new path protocol provider, scheme must be unique `false` returned otherwise.
- **`add_registry_provider(self, name, provider)`**
- Add registry provider to be used for remote extension registry.
- **`fetch_all_extension_packages(self)`**
- **`fetch_extension_packages(self, arg0)`**
- **`fetch_extension_summaries(self)`**
- `fetch_extension_summaries(self)`
- `fetch_extension_versions(self, arg0)`
- `get_change_event_stream(self)`
- `get_enabled_extension_id(self, ext_name)`
- `get_enabled_extension_module_names()`
- Get all python modules of enabled extensions
- `get_extension_dict(self, ext_id)`
- `get_extension_id_by_module(module)`
- Get enabled extension id that contains this python module.
- `get_extension_packages(self)`
- `get_extension_path(self, ext_id)`
- `get_extension_path_by_module(module)`
- Get enabled extension path that contains this python module.
- `get_extensions(self)`
- `get_folders(self)`
- Get folders monitored for python extensions.
- `get_hooks(self)`
- `get_registry_extension_dict(self, ext_id)`
- `get_registry_extension_packages(self)`
- `get_registry_extensions(self)`
- `get_registry_providers(self)`
- `is_extension_enabled(self, ext_name)`
- `pack_extension(ext_id, output_folder)`
- Pack extension into archive.
- `process_and_apply_all_changes(self)`
- `publish_extension(self, ext_id[, ...])`
- `pull_extension(self, ext_id)`
- `pull_extension_async(self, ext_id)`
- `refresh_registry(self)`
- `remove_path(self, path)`
- `remove_path_protocol_provider(self, scheme)`
- `remove_registry_provider(self, name)`
- Remove registry provider.
- `set_extension_enabled(self, extension_id, ...)`
- Toggle extension enable/disable.
- `set_extension_enabled_immediate(self, ...)`
- Toggle extension enable/disable immediately.
- `set_extensions_excluded(self, exts)`
- Set extensions to exclude on following solver/startup routines.
- `solve_extensions(self, exts[, add_enabled, ...])`
- Run extension dependencies solver on the input.
- `subscribe_to_extension_enable(self)`
| Method | Description |
| --- | --- |
| `subscribe_to_extension_enable` (self, ...) | Call callback if extension is enabled and hook in extension system to wait for extension to be enabled again (after reload for instance) and disabled. |
| `sync_registry` (self) | |
| `uninstall_extension` (self, ext_id) | |
| `unpublish_extension` (self, ext_id[, ...]) | |
### `__init__`(*args, **kwargs)
### `add_path`(self: omni.ext._extensions.ExtensionManager, path: str, type: omni.ext._extensions.ExtensionPathType = <ExtensionPathType.COLLECTION: 0>) -> None
### `add_path_protocol_provider`(self: omni.ext._extensions.ExtensionManager, scheme: str, on_add_path_fn: Callable[[str], str], on_remove_path_fn: Callable[[str], None])
### add_path_protocol_provider
Add new path protocol provider, scheme must be unique `false` returned otherwise.
#### Parameters
- **scheme** (`str`) – Scheme name.
- **fn** (`Callable[[str], str]`) – The callback to be called when new search path is added for this scheme.
### add_registry_provider
Add registry provider to be used for remote extension registry.
#### Parameters
- **name** (`str`) – Provider unique name.
- **provider** (`IRegistryProvider`) – Provider.
### fetch_all_extension_packages
(No description provided)
### fetch_extension_packages
(No description provided)
### fetch_extension_summaries
(No description provided)
### fetch_extension_summaries
- **Parameters**:
- `self` : omni.ext._extensions.ExtensionManager
- **Returns**: tuple
### fetch_extension_versions
- **Parameters**:
- `self` : omni.ext._extensions.ExtensionManager
- `arg0` : str
- **Returns**: tuple
### get_change_event_stream
- **Parameters**:
- `self` : omni.ext._extensions.ExtensionManager
- **Returns**: carb::events::IEventStream
### get_enabled_extension_id
- **Parameters**:
- `self` : omni.ext._extensions.ExtensionManager
- `ext_name` : str
- **Returns**: str
### get_enabled_extension_module_names
- **Returns**:
- **Description**: Get all python modules of enabled extensions
### get_extension_dict
- **Parameters**:
- `self` : omni.ext._extensions.ExtensionManager
- `ext_id` : str
- **Returns**: carb::dictionary::Item
### get_extension_id_by_module
- **Parameters**:
- `self` : omni.ext._extensions.ExtensionManager
- **Returns**:
### omni.ext.ExtensionManager.get_extension_id_by_module
- **Description**: Get enabled extension id that contains this python module.
### omni.ext.ExtensionManager.get_extension_packages
- **Description**:
### omni.ext.ExtensionManager.get_extension_path
- **Description**:
### omni.ext.ExtensionManager.get_extension_path_by_module
- **Description**: Get enabled extension path that contains this python module.
### omni.ext.ExtensionManager.get_extensions
- **Description**:
### omni.ext.ExtensionManager.get_folders
- **Description**: Get folders monitored for python extensions.
- **Returns**: (List[Dict])
List of folders. Each folder is dict with “path” and “builtin” key.
```python
get_hooks(self: omni.ext._extensions.ExtensionManager) -> omni::ext::IExtensionManagerHooks
```
```python
get_registry_extension_dict(self: omni.ext._extensions.ExtensionManager, ext_id: str) -> carb::dictionary::Item
```
```python
get_registry_extension_packages(self: omni.ext._extensions.ExtensionManager) -> tuple
```
```python
get_registry_extensions(self: omni.ext._extensions.ExtensionManager) -> tuple
```
```python
get_registry_providers(self: omni.ext._extensions.ExtensionManager) -> tuple
```
```python
is_extension_enabled(self: omni.ext._extensions.ExtensionManager) -> bool
```
### omni.ext.ExtensionManager.is_extension_enabled
- **Method**: `is_extension_enabled(ext_name: str)`
- **Returns**: `bool`
### omni.ext.ExtensionManager.pack_extension
- **Method**: `pack_extension(ext_id: str, output_folder: str)`
- **Returns**: `str`
- **Description**:
- Pack extension into archive.
- Supports both single file extensions (kit files) and folders.
- **Parameters**:
- `ext_id (str)`: Local extension id.
- `output_folder`: Folder to output archive into.
- **Return type**: `str`
### omni.ext.ExtensionManager.process_and_apply_all_changes
- **Method**: `process_and_apply_all_changes(self: omni.ext._extensions.ExtensionManager)`
- **Returns**: `None`
### omni.ext.ExtensionManager.publish_extension
- **Method**: `publish_extension(self: omni.ext._extensions.ExtensionManager, ext_id: str, provider_name: str = '', allow_overwrite: bool = False)`
- **Returns**: `bool`
pull_extension(self: omni.ext._extensions.ExtensionManager, ext_id: str) -> bool
pull_extension_async(self: omni.ext._extensions.ExtensionManager, ext_id: str) -> None
refresh_registry(self: omni.ext._extensions.ExtensionManager) -> None
remove_path(self: omni.ext._extensions.ExtensionManager, path: str) -> None
remove_path_protocol_provider(self: omni.ext._extensions.ExtensionManager, scheme: str) -> None
### remove_registry_provider
```python
remove_registry_provider(self: omni.ext._extensions.ExtensionManager, name: str) -> None
```
Remove registry provider.
**Parameters:**
- **name** (str) – Provider unique name.
### set_extension_enabled
```python
set_extension_enabled(self: omni.ext._extensions.ExtensionManager, extension_id: str, enabled: bool) -> None
```
Toggle extension enable/disable.
**Parameters:**
- **extension_id** (str) – Extension id. Full python module name, returned by `get_extensions`.
- **enabled** (bool) – Enable/disable toggle.
### set_extension_enabled_immediate
```python
set_extension_enabled_immediate(self: omni.ext._extensions.ExtensionManager, extension_id: str, enabled: bool) -> bool
```
Toggle extension enable/disable immediately.
**Parameters:**
- **extension_id** (str) – Extension id. Full python module name, returned by `get_extensions`.
- **enabled** (bool) – Enable/disable toggle.
- **enabled** (**bool**) – Enable/disable toggle.
Returns (bool):
- Failure or success.
- **set_extensions_excluded** (self: omni.ext._extensions.ExtensionManager, exts: List[str]) -> None
- Set extensions to exclude on following solver/startup routines. They persist until next call to this function.
- **Parameters**
- **extensions** (**List[str]**) – List Extension id with or without versions.
- **solve_extensions** (self: omni.ext._extensions.ExtensionManager, exts: List[str], add_enabled: bool = False, return_only_disabled: bool = False) -> tuple
- Run extension dependencies solver on the input.
- Input is a list of extension, they can be names, full id, partial versions like `ommi.foo-2`.
- **Parameters**
- **exts** (**List[str]**) – List of extensions.
- **add_enabled** (**bool**) – Automatically add already enabled extension to the input (to take into account)
- **return_only_disabled** (**bool**) – If true exclude from the result extensions that are currently already enabled
Returns(Tuple[bool, List[str], str]):
<dd>
<p>
Tuple of result, list of extensions (solution) and error message.
<dl class="py method">
<dt class="sig sig-object py" id="omni.ext.ExtensionManager.subscribe_to_extension_enable">
<span class="sig-name descname">
<span class="pre">
subscribe_to_extension_enable
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.ext._extensions.ExtensionManager
,
<em class="sig-param">
<span class="n">
<span class="pre">
on_enable_fn
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
Callable
<span class="p">
<span class="pre">
[
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
]
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
None
<span class="p">
<span class="pre">
]
,
<em class="sig-param">
<span class="n">
<span class="pre">
on_disable_fn
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
Callable
<span class="p">
<span class="pre">
[
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
]
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
None
<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">
ext_name
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
''
,
<em class="sig-param">
<span class="n">
<span class="pre">
hook_name
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
<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">
Tuple[omni::ext::IHookHolder,
<span class="pre">
omni::ext::IHookHolder]
<dd>
<p>
Call callback if extension is enabled and hook in extension system to wait for extension to be enabled again (after reload for instance) and disabled.
<p>
Example:
<div class="highlight-c++ notranslate">
<div class="highlight">
<pre><span>
<span class="w">
<span class="n">def
<span class="w">
<span class="n">manager
<span class="n">self
<span class="cp"># Notice that we stored subscription holder somewhere (in self for instance) to hold it.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
- **on_enable_fn** (`Callable[[str]]`) – The callback to be called when extension is enabled. It accepts extension id.
- **on_disable_fn** (`Callable[[str], optional]`) – The callback to be called when extension is disabled. It accepts extension id.
- **ext_name** (`str, optional`) – Extension name to look for. Hook is only called for extensions with matching name. Can be empty.
- **hook_name** (`str`) – Hook name for debugging and logging.
**Returns**
Pair of hook holders.
- **sync_registry** (`omni.ext._extensions.ExtensionManager`) → `bool`
- **uninstall_extension** (`omni.ext._extensions.ExtensionManager`, `str`) → `bool`
- **unpublish_extension** (`omni.ext._extensions.ExtensionManager`, `str`, `str = ''`) → `bool` | 13,786 |
omni.ext.ExtensionPathType.md | # ExtensionPathType
## Class omni.ext.ExtensionPathType
Bases: `pybind11_object`
Index Refresh States.
Members:
- COLLECTION
- COLLECTION_USER
- COLLECTION_CACHE
- DIRECT_PATH
- EXT_1_FOLDER
### Methods
- `__init__(self, value)`
### Attributes
- `COLLECTION`
- `COLLECTION_CACHE`
- `COLLECTION_USER`
- `DIRECT_PATH`
- `EXT_1_FOLDER`
- `name`
| value |
|-------|
__init__(self: omni.ext._extensions.ExtensionPathType, value: int) -> None
property name | 460 |
omni.ext.ExtensionStateChangeType.md | # ExtensionStateChangeType
## ExtensionStateChangeType
```python
class omni.ext.ExtensionStateChangeType
```
Bases: `pybind11_object`
Members:
- BEFORE_EXTENSION_ENABLE
- AFTER_EXTENSION_ENABLE
- BEFORE_EXTENSION_DISABLE
- AFTER_EXTENSION_DISABLE
- COUNT
### Methods
```python
__init__(self, value)
```
### Attributes
- AFTER_EXTENSION_DISABLE
- AFTER_EXTENSION_ENABLE
- BEFORE_EXTENSION_DISABLE
- BEFORE_EXTENSION_ENABLE
- COUNT
- name
- value
```
<table>
<tbody>
<tr>
<td>
<p>
<dl class="py method">
<dt class="sig sig-object py" id="omni.ext.ExtensionStateChangeType.__init__">
<span class="sig-name descname">
<span class="pre">
__init__
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.ext._extensions.ExtensionStateChangeType
,
<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">
int
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
None
<dd>
<dl class="py property">
<dt class="sig sig-object py" id="omni.ext.ExtensionStateChangeType.name">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
name
<dd>
<footer>
<hr/>
| 1,966 |
omni.ext.Functions.md | # omni.ext Functions
## Functions Summary
- **create_link**
- Creates a symbolic link from ‘link_path’ to ‘target_path’
- **destroy_link**
- Destroys an existing file system link
- **get_all_sys_paths**
- Get all `sys.path`, both handled by the fast importer and regular left in `sys.path`.
- **get_dangling_references**
- Returns a string containing debugging information about dangling references on an object.
- **get_extension_name**
- Convert ‘omni.foo-tag-1.2.3’ to ‘omni.foo-tag’
- **get_extensions_interface**
- Returns cached :class:`omni.ext.IExtensions` interface
- **get_fast_importer_sys_paths**
- Get all sys.path handled by the fast importer.
- **is_link**
- (No description provided)
- **pack_extension**
- Pack extension into archive.
- **unpack_extension**
- Unpack extenson making it ready to use if output folder is in extension search paths.
- **acquire_ext_interface**
- acquire_ext_interface(plugin_name: str = None, library_path: str = None) -> omni.ext._extensions.ICppExt
- **acquire_extensions_interface**
- (No description provided)
| | |
|--------------|-------------------------------------------------------------------------------------|
| acquire_extensions_interface | acquire_extensions_interface(plugin_name: str = None, library_path: str = None) -> omni.ext._extensions.IExtensions |
| release_ext_interface | release_ext_interface(arg0: omni.ext._extensions.ICppExt) -> None | | 1,537 |
omni.ext.get_all_sys_paths.md | # get_all_sys_paths
## get_all_sys_paths
```python
omni.ext.get_all_sys_paths() -> Iterator[str]
```
Get all `sys.path`, both handled by the fast importer and regular left in `sys.path`.
Use that function instead of `sys.path` if fast importer is enabled (it is enabled by default).
Note, that this function is a generator and doesn’t return a ready list.
``` | 363 |
omni.ext.get_dangling_references.md | # get_dangling_references
## get_dangling_references
```python
omni.ext.get_dangling_references(who, frame_depth_to_ignore: int = 0, full_details: bool = False) -> str
```
Returns a string containing debugging information about dangling references on an object.
Different levels of detail will be provided based on the environment variable “GC_DEBUG”, provided by the two methods _get_dangling_references_shallow() and _get_dangling_references_deep().
This is a tool that is useful for tracking down Python object leaks when an extension is unloaded and reloaded, to ensure you are properly cleaning up when the extension shuts down. You can insert calls to this in various locations of your code where you suspect objects are left dangling.
That code is open for improvement to figure out more info on who holds an object. For instance It can go recursively up the tree to get more info on who holds what.
### Parameters
- **who** – Object to check for referrers in the garbage collector
- **frame_depth_to_ignore** – Number of frames above this one deemed irrelevant to the leak detector e.g. the caller, a wrapper function invoking the caller, etc.
- **full_details** – If True then add the very verbose _builtins, _globals, and _locals information
### Returns
String containing a multi-line description of the references that remain on the object | 1,357 |
omni.ext.get_extensions_interface.md | # get_extensions_interface
## get_extensions_interface
```python
omni.ext.get_extensions_interface()
```
Returns cached `omni.ext.IExtensions` interface. | 154 |
omni.ext.get_extension_name.md | # get_extension_name
## get_extension_name
Convert ‘omni.foo-tag-1.2.3’ to ‘omni.foo-tag’
### Definition
`omni.ext.get_extension_name(ext_id: str) -> str`
- **ext_id**: str
- **Returns**: str | 194 |
omni.ext.get_fast_importer_sys_paths.md | # get_fast_importer_sys_paths
## get_fast_importer_sys_paths
Get all sys.path handled by the fast importer.
If fast importer is enabled it takes a lot of paths from sys.path. This function returns all of them.
If you need all sys.path as if fast importer is disabled, use `get_all_sys_paths()`. | 297 |
omni.ext.ICppExt.md | # ICppExt
## ICppExt
```python
class omni.ext.ICppExt
```
Bases:
```python
pybind11_object
```
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | |
| `shutdown(self)` | |
| `startup(self, arg0)` | |
#### __init__(*args, **kwargs)
#### shutdown(self)
#### startup(self, arg0)
## omni.ext.ICppExt.shutdown
## omni.ext.ICppExt.startup | 384 |
omni.ext.IExt.md | # IExt
## IExt
```
class omni.ext.IExt
```
Bases:
```
ICppExt
```
### Methods
```
__init__ (self)
```
```
__init__ (self: omni.ext._extensions.IExt) -> None
``` | 166 |
omni.ext.IExtensionManagerHooks.md | # IExtensionManagerHooks
## IExtensionManagerHooks
```python
class omni.ext.IExtensionManagerHooks
```
Bases:
```python
pybind11_object
```
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | |
| `create_extension_state_change_hook(self, fn, ...)` | Create extension state change hook. |
```python
__init__(*args, **kwargs)
```
```python
create_extension_state_change_hook(self, fn, ...)
```
Create extension state change hook.
Create extension state change hook.
Hook is valid while returned hook holder object is alive.
Parameters:
- **fn** (Callable[[str, omni.ext._extensions.ExtensionStateChangeType], None]) – The callback to be called on extension state change event. It accepts extension id and type of hook event.
- **type** (omni.ext._extensions.ExtensionStateChangeType) – Extension state change moment to hook into.
- **ext_name** (str, optional) – Extension name to look for. Hook is only called for extensions with matching name. Can be empty.
- **ext_dict_path** (str, optional) – Extension dictionary path to look for. Hook is only called if it is present.
- **order** (int, optional) – Hook call order (if there are multiple).
Returns:
- omni.ext._extensions.IHookHolder
## Description
- **hook_name** (`str`) – Hook name for debugging and logging.
## Returns
The hook holder. | 1,345 |
omni.ext.IExtensions.md | # IExtensions
## IExtensions
```python
class omni.ext.IExtensions(pybind11_object)
```
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | |
| `create_extension_manager(self, arg0)` | |
#### `__init__(*args, **kwargs)`
#### `create_extension_manager(self, arg0)`
这是一个段落,包含一个链接和一张图片。
```
这是一段代码。
``` | 348 |
omni.ext.IHookHolder.md | # IHookHolder
## IHookHolder
### Class
```python
class omni.ext.IHookHolder
```
### Description
Hook holder.
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | |
### `__init__(*args, **kwargs)`
```python
def __init__(*args, **kwargs)
```
``` | 291 |
omni.ext.IRegistryProvider.md | # IRegistryProvider
## IRegistryProvider
```
class omni.ext.IRegistryProvider
```
Bases:
```
pybind11_object
```
### Methods
| Method | Description |
|--------|-------------|
| `__init__(self)` | |
```
__init__(self: omni.ext._extensions.IRegistryProvider) -> None
```
``` | 279 |
omni.ext.md | # omni.ext
## Classes
Summary:
| Class | Description |
|-------|-------------|
| [DownloadState](#) | Index/Extension Download States. |
| [ExtensionManager](#) | |
| [ExtensionPathType](#) | Index Refresh States. |
| [ExtensionStateChangeType](#) | Members: |
| [ICppExt](#) | |
| [IExt](#) | |
| [IExtensionManagerHooks](#) | |
| [IExtensions](#) | |
| [IHookHolder](#) | Hook holder. |
| [IRegistryProvider](#) | |
## Functions
Summary:
| Function | Description |
|----------|-------------|
| [create_link](#) | Creates a symbolic link from ‘link_path’ to ‘target_path’ |
| [destroy_link](#) | Destroys an existing file system link |
| [get_all_sys_paths](#) | Get all `sys.path`, both handled by the fast importer and regular left in `sys.path`. |
| 方法名 | 描述 |
| --- | --- |
| get_dangling_references | Returns a string containing debugging information about dangling references on an object. |
| get_extension_name | Convert ‘omni.foo-tag-1.2.3’ to ‘omni.foo-tag’ |
| get_extensions_interface | Returns cached :class:`omni.ext.IExtensions` interface |
| get_fast_importer_sys_paths | Get all sys.path handled by the fast importer. |
| is_link | |
| pack_extension | Pack extension into archive. |
| unpack_extension | Unpack extenson making it ready to use if output folder is in extension search paths. |
| acquire_ext_interface | acquire_ext_interface(plugin_name: str = None, library_path: str = None) -> omni.ext._extensions.ICppExt |
| acquire_extensions_interface | acquire_extensions_interface(plugin_name: str = None, library_path: str = None) -> omni.ext._extensions.IExtensions |
| release_ext_interface | release_ext_interface(arg0: omni.ext._extensions.ICppExt) -> None | | 1,699 |
omni.ext.pack_extension.md | # pack_extension
## pack_extension
```python
omni.ext.pack_extension(package_id: str, ext_path: str, output_folder: str) -> str
```
Pack extension into archive.
Supports both single file extensions (kit files) and folders.
### Parameters
- **package_id** (str) – Extension package id. Resulting archive will be [package_id].zip
- **ext_path** (str) – Path to extension folder or file.
- **output_folder** – Folder to output archive into.
### Returns
Path to archived extension.
### Return type
str
``` | 511 |
omni.ext.unpack_extension.md | # unpack_extension
## unpack_extension
```python
omni.ext.unpack_extension(archive_path: str, output_folder: str, ext_id: Optional[str] = None, archive_subdir: Optional[str] = None, skip_security_checks: bool = True)
```
Unpack extension making it ready to use if output folder is in extension search paths.
Supports both single file extensions (kit files) and folders.
**Parameters**
- **archive_path** (str) – Path to archive.
- **output_folder** – Folder to unpack extension into.
- **ext_id** (Optional[str]) – (default: None)
- **archive_subdir** (Optional[str]) – (default: None)
- **skip_security_checks** (bool) – (default: True)
```
## Parameters
- **extension_id** (str) – Extension id to use to build folder name. By default archive filename is used.
- **archive_subdir** (str) – Subdir in the archive to unpack, by default archive root is used.
- **skip_security_checks** (bool) – if registry of this extension is trusted we skip extra security checks. | 971 |
omni.fabric.commands.ChangeFabricAttributeCommand.md | # ChangeFabricAttributeCommand
## ChangeFabricAttributeCommand
```python
class omni.fabric.commands.ChangeFabricAttributeCommand:
def __init__(
self,
attr_path: str,
value: Any,
prev: Any,
timecode: Usd.TimeCode = Usd.TimeCode.Default(),
type_to_create_if_not_exist: Optional[ValueTypeNames] = None,
stage: Optional[Stage] = None,
is_custom: bool = False
):
pass
```
## omni.fabric.commands.ChangeFabricAttributeCommand
### Description
Change fabric prim attribute undoable **Command**.
#### Bases
- Command
#### Parameters
- **attr_path** (usdrt.Sdf.Path) – Prim attribute path.
- **value** (Any) – Value to change to.
- **prev** (Any) – Value to undo to.
- **timecode** (usdrt.Usd.TimeCode) – The timecode to set attribute value to.
- **type_to_create_if_not_exist** (usdrt.Sdf.ValueTypeName) – If not None AND attribute does not already exist, a new attribute will be created with given type and value.
- **stage** (usdrt.Usd.Stage) – The current Fabric stage.
- **is_custom** (bool) – If the attribute is created, specify if it is a ‘custom’ attribute (not part of the Schema).
### Methods
- **__init__(attr_path, value, prev[, timecode, ...])**
- Create a command to change prim attribute.
- **do()**
- Executes the command to change the specified Fabric attribute to a new value.
- **undo()**
- Undoes the attribute change, reverting the attribute value to its previous state.
### omni.fabric.commands.ChangeFabricAttributeCommand
#### `__init__(optional [Stage], is_custom: bool = False)`
Create a command to change prim attribute.
#### `do()`
Executes the command to change the specified Fabric attribute to a new value.
This method updates the attribute value and can create a new attribute if it does not exist and a type is specified.
#### `undo()`
Undoes the attribute change, reverting the attribute value to its previous state.
If the attribute was created during the execution of the `do` method, this method will remove the attribute. | 2,044 |
omni.fabric.commands.ChangeFabricPropertyCommand.md | # ChangeFabricPropertyCommand
## ChangeFabricPropertyCommand
Bases:
Command
```
Change prim property undoable **Command**.
**Parameters**
- **prop_path** (str) – Prim property path.
- **value** (Any) – Value to change to.
- **prev** (Any) – Value to undo to.
- **timecode** (usdrt.Usd.TimeCode) – The timecode to set property value to.
- **type_to_create_if_not_exist** (usdrt.Sdf.ValueTypeName) – If not None AND property does not already exist, a new property will be created with given type and value.
- **usd_context_name** (Union[str, Usd.Stage]) – Union that could be:
* Name of the usd context to work on. Leave to “” to use default USD context.
* Instance of UsdContext.
* Or stage instance.
- **is_custom** (bool) – If the property is created, specify if it is a ‘custom’ property (not part of the Schema).
**Methods**
- **__init__(prop_path, value, prev[, timecode, ...])**
- Create a command to change prim property.
- **do()**
- Executes the command to change the specified Fabric property to a new value.
- **undo()**
- Undoes the property change, reverting the property value to its previous state.
**__init__(prop_path: str, value: Any, prev: Any, timecode: Optional[Usd.TimeCode] = Usd.TimeCode.Default(), type_to_create_if_not_exist: Optional[usdrt.Sdf.ValueTypeName] = None, usd_context_name: Union[str, Usd.Stage] = "", is_custom: bool = False)**
```
Create a command to change prim property.
Executes the command to change the specified Fabric property to a new value.
This method updates the property value and can create a new property if it does not exist and a type is specified.
Undoes the property change, reverting the property value to its previous state.
If the property was created during the execution of the `do` method, this method will remove the property. | 1,811 |
omni.fabric.commands.Classes.md | # omni.fabric.commands Classes
## Classes Summary:
- **ChangeFabricAttributeCommand**
- Change fabric prim attribute undoable **Command**.
- **ChangeFabricPropertyCommand**
- Change prim property undoable **Command**.
- **CopyFabricPrimCommand**
- A command to copy a Fabric prim to a new location.
- **CopyFabricPrimsCommand**
- A command for copying and pasting Fabric prims within a stage.
- **CreateDefaultXformOnFabricPrimCommand**
- A command to create and apply a default transform to a Fabric prim at a specified path.
- **CreateFabricPrimCommand**
- A command to create a Fabric prim with a default transform.
- **CreateFabricPrimWithDefaultXformCommand**
- A command to create a Fabric prim with a default transform.
- **DeleteFabricPrimsCommand**
- A command for deleting prims from a Fabric stage.
- **FabricCommandsExtension**
- A class that represents an extension for fabric commands.
- **GroupFabricPrimsCommand**
- A command to group multiple Fabric prims under a new Xform prim.
<p>
MoveFabricPrimCommand
<p>
A command for moving a single prim from one path to another within the Fabric stage.
<p>
MoveFabricPrimsCommand
<p>
A command for moving multiple prims within a Fabric stage.
<p>
ToggleVisibilitySelectedFabricPrimsCommand
<p>
Toggles the visibility of the selected Fabric prims.
<p>
TransformFabricPrimCommand
<p>
A command to transform a Fabric prim.
<p>
UngroupFabricPrimsCommand
<p>
A command to ungroup Fabric prims from their common parent group.
| 1,519 |
omni.fabric.commands.CopyFabricPrimCommand.md | # CopyFabricPrimCommand
## CopyFabricPrimCommand
```
class omni.fabric.commands.CopyFabricPrimCommand(path_from: str, path_to: Optional[str] = None, exclusive_select: bool = True, usd_context_name: str = '')
```
Bases: `Command`
A command to copy a Fabric prim to a new location.
This command is used to duplicate a specified Fabric prim and place it under a new path within the same stage. It supports undo and redo operations.
### Parameters
- **path_from** – str
The source path of the Fabric prim to copy.
- **path_to** – Optional[str]
The destination path for the copied prim. If None, a new unique path is generated.
```
### Parameters
<dl>
<dt>
<strong>
exclusive_select
– bool
If True, the copied prim will be exclusively selected; otherwise, it won’t affect the selection.
<dt>
<strong>
usd_context_name
– str
The name of the USD context. Defaults to an empty string, which uses the default context.
### Methods
<table>
<tr>
<td>
<code>__init__(path_from[, path_to, ...])
<td>
Creates a CopyFabricPrimCommand to copy a Fabric prim to a new location.
<tr>
<td>
<code>do()
<td>
Executes the command to copy a Fabric prim to a new location.
<tr>
<td>
<code>undo()
<td>
Undoes the copy a Fabric prim to a new location, effectively deleting it from the stage.
<dl>
<dt>
<code>__init__(path_from: str, path_to: Optional[str] = None, exclusive_select: bool = True, usd_context_name: str = '')
<dd>
Creates a CopyFabricPrimCommand to copy a Fabric prim to a new location.
<dl>
<dt>
<code>do()
<dd>
Executes the command to copy a Fabric prim to a new location.
<dl>
<dt>
<code>undo()
<dd>
Undoes the copy a Fabric prim to a new location, effectively deleting it from the stage.
| 1,899 |
omni.fabric.commands.CopyFabricPrimsCommand.md | # CopyFabricPrimsCommand
## Overview
A command for copying and pasting Fabric prims within a stage.
This command duplicates one or more Fabric prims to new locations within the same Fabric stage, preserving their properties and relationships. It supports undo and redo capabilities.
### Parameters
- **paths_from** (list[str]) – The source paths of the prims to copy.
- **paths_to** (list[str], optional) – The destination paths for the copied prims. If `None` or length smaller than paths_from, then the next free path is generated for missing paths.
| __init__ (paths_from[, paths_to]) | Creates a command for copying multiple Fabric prims to new locations. |
|-----------------------------------|--------------------------------------------------------------------|
| do () | Executes the command to copy multiple Fabric prims to the specified new locations. |
| undo () | Undoes the copy operation, effectively removing the copied prims. |
### __init__
```python
__init__(paths_from: list[str], paths_to: Optional[list[str]] = None)
```
Creates a command for copying multiple Fabric prims to new locations.
### do
```python
do()
```
Executes the command to copy multiple Fabric prims to the specified new locations.
### undo
```python
undo()
```
Undoes the copy operation, effectively removing the copied prims. | 1,375 |
omni.fabric.commands.CreateDefaultXformOnFabricPrimCommand.md | # CreateDefaultXformOnFabricPrimCommand
## Overview
CreateDefaultXformOnFabricPrimCommand is a command to create and apply a default transform to a Fabric prim at a specified path.
### Parameters
- **prim_path** – str
- The Fabric path where the prim is located.
- **stage** – usdrt.Usd.Stage
- The stage where the prim resides.
### Methods
- **__init__(prim_path, stage)**
- Creates and applies a default transform to a Fabric prim.
- **do()**
- Executes the command to create and apply a default transform to a Fabric prim at a specified path.
- **undo()**
- Undoes the command to remove the applied default transform from the Fabric prim.
### omni.fabric.commands.CreateDefaultXformOnFabricPrimCommand.__init__
```python
__init__(prim_path: str, stage: Stage)
```
Creates and applies a default transform to a Fabric prim.
### omni.fabric.commands.CreateDefaultXformOnFabricPrimCommand.do
```python
do()
```
Executes the command to create and apply a default transform to a Fabric prim at a specified path.
### omni.fabric.commands.CreateDefaultXformOnFabricPrimCommand.undo
```python
undo()
```
Undoes the default transform to the Fabric prim. | 1,161 |
omni.fabric.commands.CreateFabricPrimCommand.md | # CreateFabricPrimCommand
## CreateFabricPrimCommand
```
由于HTML源码中包含大量样式和结构信息,如导航、链接、图片等,这些在Markdown中无法直接对应。因此,上述Markdown仅包含了标题部分,而未包含其他内容。为了完整转换,需要进一步处理HTML中的文本内容,同时移除所有链接和图片。以下是进一步处理后的Markdown内容:
```markdown
# CreateFabricPrimCommand
## CreateFabricPrimCommand
### Class: omni.fabric.commands.CreateFabricPrimCommand
- **Parameters**:
- `prim_type`: str
- `prim_path`: Optional[str] = None
- `select_new_prim`: bool = True
- `attributes`: Dict[str, Any] = {}
- `create_default_xform`: bool = True
- `stage`: Optional[str] = None
### omni.fabric.commands.CreateFabricPrimCommand
**Bases:**
- CreateFabricPrimWithDefaultXformCommand
**Description:**
A command to create a Fabric prim with a default transform.
This command creates a new prim of the specified type, at the given path, and applies a default transform to it. The newly created prim can be automatically selected.
**Parameters:**
- **prim_type** – str
The type of prim to create (e.g., 'Sphere', 'Cube').
- **prim_path** – Optional[str]
The path where the prim will be created. If None, it will be placed at the stage root or under default prim using the type name.
- **select_new_prim** – bool
Indicates whether to select the prim after creation.
- **attributes** – Optional[Dict[str, Any]]
Optional dictionary of attributes to set after creation.
- **create_default_xform** – bool
Determines whether to create default transform attributes for the prim.
- **stage** – Optional[usdrt.Usd.Stage]
The stage where the prim will be created. If not provided, the default stage is used.
- **context_name** – Optional[str]
The name of the context to use for the operation. If not provided, the default context is used.
**Methods:**
- **__init__(prim_type[, prim_path, ...])**
Initializes a command to create a Fabric prim with a default transform.
**Attributes:**
- (No attributes listed)
**Detailed Method Description:**
- **__init__(prim_type: str, prim_path: Optional[str] = None, select_new_prim: bool = True, attributes: Optional[Dict[str, Any]] = None)**
Initializes the command with the specified parameters.
<em class="sig-param">
<span class="n">
<span class="pre">
Dict
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
Any
<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">
{}
,
<em class="sig-param">
<span class="n">
<span class="pre">
create_default_xform
<span class="o">
<span class="pre">
=
<span class="default_value">
<span class="pre">
True
,
<em class="sig-param">
<span class="n">
<span class="pre">
stage
<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">
Stage
<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">
context_name
<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">
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">
None
)
<dd>
<p>
Initializes a command to create a Fabric prim with a default transform.
| 4,195 |
omni.fabric.commands.CreateFabricPrimWithDefaultXformCommand.md | # CreateFabricPrimWithDefaultXformCommand
## CreateFabricPrimWithDefaultXformCommand
Bases:
- `Command`
- `FabricStageHelper`
A command to create a Fabric prim with a default transform.
This command creates a new prim of the specified type, at the given path, and applies a default transform to it. The newly created prim can be automatically selected.
Parameters:
- **prim_type** – str
The type of prim to create (e.g., 'Sphere', 'Cube').
- **prim_path** – str
The path where the prim will be created. If None, it will be placed at the stage root or under default prim using the type name.
- **select_new_prim** – bool
Indicates whether to select the prim after creation.
- **attributes** – Dict[str, Any]
Optional dictionary of attributes to set after creation.
- **create_default_xform** – bool
Determines whether to create default transform attributes for the prim.
- **stage** – Optional[usdrt.Usd.Stage]
The stage where the prim will be created. If not provided, the default stage is used.
- **context_name** – Optional[str]
The name of the context to use for the operation. If not provided, the default context is used.
Methods:
- `__init__(prim_type[, prim_path, ...])`
A command to create a Fabric prim with a default transform.
- `do()`
Executes the command to create a new Fabric prim with default transform.
- `undo()`
Undoes the creation of the new Fabric prim, effectively deleting it from the stage.
Attributes:
- `attr_type_table`
- `default_size_attr_table`
### Parameters
- **prim_path** : `Optional[str] = None`
- **select_new_prim** : `bool = True`
- **attributes** : `Dict[str, Any] = {}`
- **create_default_xform** : `bool = True`
- **stage** : `Optional[Stage] = None`
- **context_name** : `Optional[str] = None`
### Description
A command to create a Fabric prim with a default transform.
### Methods
- **do()**
- Executes the command to create a new Fabric prim with default transform.
- If the prim already exists at the specified path, the command will fail and log an error.
- **undo()**
- Undoes the creation of the new Fabric prim, effectively deleting it from the stage. | 2,135 |
omni.fabric.commands.DeleteFabricPrimsCommand.md | # DeleteFabricPrimsCommand
## DeleteFabricPrimsCommand
Bases:
- `Command`
- `FabricStageHelper`
A command for deleting prims from a Fabric stage.
The command removes the specified prims and their descendants from the stage, if allowed by the current stage settings. It supports undo and redo operations.
Parameters:
- **paths** – List[Union[str, usdrt.Sdf.Path]]
The Fabric paths of the prims to be deleted.
- **delete_descendents** – bool
Whether to delete descendants of the specified prims.
- **stage** – Optional[usdrt.Usd.Stage]
The stage from which the prims will be deleted.
- **context_name** – Optional[str]
The name of the context to use for the operation.
Methods:
- `__init__(paths[, delete_descendents, stage, context_name])`
Creates a command to delete the specified Fabric prims.
- `do()`
Executes the deletion of the specified Fabric prims.
- `undo()`
Undoes the deletion of the specified Fabric prims, restoring them to the stage.
__init__(paths: list[Union[str, usdrt.Sdf._Sdf.Path]], delete_descendents: bool = True, stage: Optional[Stage] = None, context_name: Optional[str] = None)
## omni.fabric.commands.DeleteFabricPrimsCommand.__init__
Creates a command to delete the specified Fabric prims.
## omni.fabric.commands.DeleteFabricPrimsCommand.do
Executes the deletion of the specified Fabric prims.
## omni.fabric.commands.DeleteFabricPrimsCommand.undo
Undoes the deletion of the specified Fabric prims, restoring them to the stage. | 1,477 |
omni.fabric.commands.FabricCommandsExtension.md | # FabricCommandsExtension
A class that represents an extension for fabric commands.
This class inherits from omni.ext.IExt and provides the startup and shutdown methods which are called when the extension is started up and shut down, respectively.
## Methods
| Method | Description |
|-----------------------|--------------------------------------|
| `on_shutdown()` | Called when the extension is shut down. |
| `on_startup(ext_id)` | Called when the extension is started up. |
### on_shutdown()
Called when the extension is shut down.
### on_startup(ext_id)
Called when the extension is started up.
### on_startup(ext_id)
Called when the extension is started up.
#### Parameters
- **ext_id** (str) – The identifier for the extension. | 792 |
omni.fabric.commands.GroupFabricPrimsCommand.md | # GroupFabricPrimsCommand
## GroupFabricPrimsCommand
```python
class omni.fabric.commands.GroupFabricPrimsCommand(prim_paths: List[Union[str, Path]], stage: Optional[Stage] = None, context_name: Optional[str] = None)
```
Bases:
- `Command`
- `FabricStageHelper`
```
A command to group multiple Fabric prims under a new Xform prim.
This command creates a new ‘group’ Xform prim at the common parent path of the specified prims and moves the prims under this new parent. It is useful for organizing prims in the scene hierarchy. Supports undo and redo operations.
### Parameters
- **prim_paths** (`List[str]`) – Prim paths that will be grouped.
- **stage** (`usdrt.Usd.Stage`) – Stage to operate. Optional.
- **context_name** (`str`) – The usd context to operate. Optional.
### Methods
- `__init__(prim_paths[, stage, context_name])`
- Create a command to group multiple Fabric prims under a new Xform prim.
- `do()`
- Groups a set of prims under a new Xform prim.
- `undo()`
- Undoes the grouping operation, effectively ungrouping the prims.
#### `__init__(prim_paths: List[Union[str, Path]], stage: Optional[Stage] = None, context_name: Optional[str] = None)`
- Create a command to group multiple Fabric prims under a new Xform prim.
#### `do()`
- Groups a set of prims under a new Xform prim.
- **GroupFabricPrimsCommand**(*prim_paths: Union[str, Sdf.Path], stage: Optional[usdrt.Usd.Stage] = None, context_name: Optional[str] = None*)
- *prim_paths* (Union[str, Sdf.Path]) – Prim paths that will be grouped.
- *stage* (Optional[usdrt.Usd.Stage], optional) – Stage to operate. Defaults to None, which uses the default stage.
- *context_name* (Optional[str], optional) – The USD context to operate. Defaults to None, which uses the default context.
- **undo**()
- Undoes the grouping operation, effectively ungrouping the prims. | 1,851 |
omni.fabric.commands.md | # omni.fabric.commands
## Submodules
Summary:
| Module | Description |
|--------|-------------|
| [omni.fabric.commands.scripts](omni.fabric.commands.scripts.html) | No submodule docstring provided |
## Classes
Summary:
| Class | Description |
|-------|-------------|
| [ChangeFabricAttributeCommand](omni.fabric.commands/omni.fabric.commands.ChangeFabricAttributeCommand.html) | Change fabric prim attribute undoable **Command**. |
| [ChangeFabricPropertyCommand](omni.fabric.commands/omni.fabric.commands.ChangeFabricPropertyCommand.html) | Change prim property undoable **Command**. |
| [CopyFabricPrimCommand](omni.fabric.commands/omni.fabric.commands.CopyFabricPrimCommand.html) | A command to copy a Fabric prim to a new location. |
| [CopyFabricPrimsCommand](omni.fabric.commands/omni.fabric.commands.CopyFabricPrimsCommand.html) | A command for copying and pasting Fabric prims within a stage. |
| [CreateDefaultXformOnFabricPrimCommand](omni.fabric.commands/omni.fabric.commands.CreateDefaultXformOnFabricPrimCommand.html) | A command to create and apply a default transform to a Fabric prim at a specified path. |
| [CreateFabricPrimCommand](omni.fabric.commands/omni.fabric.commands.CreateFabricPrimCommand.html) | A command to create a Fabric prim with a default transform. |
| [CreateFabricPrimWithDefaultXformCommand](omni.fabric.commands/omni.fabric.commands.CreateFabricPrimWithDefaultXformCommand.html) | A command to create a Fabric prim with a default transform. |
| [DeleteFabricPrimsCommand](omni.fabric.commands/omni.fabric.commands.DeleteFabricPrimsCommand.html) | A command for deleting prims from a Fabric stage. |
| [FabricCommandsExtension](omni.fabric.commands/omni.fabric.commands.FabricCommandsExtension.html) | A class that represents an extension for fabric commands. |
| Command Name | Description |
|-------------------------------|-----------------------------------------------------------------------------|
| GroupFabricPrimsCommand | A command to group multiple Fabric prims under a new Xform prim. |
| MoveFabricPrimCommand | A command for moving a single prim from one path to another within the Fabric stage. |
| MoveFabricPrimsCommand | A command for moving multiple prims within a Fabric stage. |
| ToggleVisibilitySelectedFabricPrimsCommand | Toggles the visibility of the selected Fabric prims. |
| TransformFabricPrimCommand | A command to transform a Fabric prim. |
| UngroupFabricPrimsCommand | A command to ungroup Fabric prims from their common parent group. | | 2,719 |
omni.fabric.commands.MoveFabricPrimCommand.md | # MoveFabricPrimCommand
## MoveFabricPrimCommand
Bases:
Command
```
A command for moving a single prim from one path to another within the Fabric stage.
This command updates the scene graph to reflect the new location of the prim and maintains its world transform if specified. The command supports undo and redo operations.
**Parameters**
- **path_from** – Union[str, usdrt.Sdf.Path]
The source path from which the prim is to be moved.
- **path_to** – Union[str, usdrt.Sdf.Path]
The target path to which the prim is to be moved to.
- **time_code** – usdrt.Usd.TimeCode
The timecode at which the move operation is performed. Defaults to usdrt.Usd.TimeCode.Default().
- **keep_world_transform** – bool
Whether to maintain the world transform of the prim after moving. Defaults to True.
- **on_move_fn** – Callable
An optional callback function to be called after the move operation. Defaults to None
- **stage_or_context** – Union[str, usdrt.Usd.Stage, omni.usd.UsdContext]
The stage or context where the prim is moved. Can be a stage instance, context instance, or context name. Defaults to None
**Methods**
- **__init__(path_from, path_to[, time_code, ...])**
Creates a command to move a Fabric prim from one path to another.
- **do()**
Executes the command to move the specified Fabric prim to the new location.
- **undo()**
Undoes the move of the specified Fabric prims, restoring them to the previous location
```
__init__(path_from: Union[str, Path], path_to: Union[str, Path], ...)
```
Creates a command to move a Fabric prim from one path to another.
```
do()
```
Executes the command to move the specified Fabric prim to the new location.
```
undo()
```
Undoes the move of the specified Fabric prims, restoring them to the previous location
```
<dl class="py method">
<dt class="sig sig-object py" id="omni.fabric.commands.MoveFabricPrimCommand.__init__">
<span class="sig-name descname">
<span class="pre">
__init__
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
time_code
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
TimeCode
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
Usd.TimeCode.Default()
,
<em class="sig-param">
<span class="n">
<span class="pre">
keep_world_transform
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
True
,
<em class="sig-param">
<span class="n">
<span class="pre">
on_move_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="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">
stage_or_context
<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">
Union
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
Stage
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
UsdContext
<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
<span class="sig-paren">
)
<dd>
<p>
Creates a command to move a Fabric prim from one path to another.
<dl class="py method">
<dt class="sig sig-object py" id="omni.fabric.commands.MoveFabricPrimCommand.do">
<span class="sig-name descname">
<span class="pre">
do
<span class="sig-paren">
(
<span class="sig-paren">
)
<dd>
<p>
Executes the command to move the specified Fabric prim to the new location.
<dl class="py method">
<dt class="sig sig-object py" id="omni.fabric.commands.MoveFabricPrimCommand.undo">
<span class="sig-name descname">
<span class="pre">
undo
<span class="sig-paren">
(
<span class="sig-paren">
)
<dd>
<p>
Undoes the move of the specified Fabric prims, restoring them to the previous location
| 5,322 |
omni.fabric.commands.MoveFabricPrimsCommand.md | # MoveFabricPrimsCommand
## MoveFabricPrimsCommand
```python
class omni.fabric.commands.MoveFabricPrimsCommand:
def __init__(
self,
paths_to_move: Dict[str, str],
time_code: TimeCode = Usd.TimeCode.Default(),
keep_world_transform: bool = True,
on_move_fn: Optional[Callable] = None,
stage_or_context: Optional[Union[...]] = None
):
pass
```
## omni.fabric.commands.MoveFabricPrimsCommand
Bases: `Command`
A command for moving multiple prims within a Fabric stage.
This command allows multiple prims to be moved to new locations, updating the scene graph accordingly. Supports undo and redo.
### Parameters
- **paths_to_move** – (Dict[str, str])
A dictionary containing path mappings from source to destination.
- **time_code** – (usdrt.Usd.TimeCode, optional)
The timecode at which the move operation is performed. Defaults to usdrt.Usd.TimeCode.Default().
- **keep_world_transform** – (bool, optional)
If set to True, the world transform of the prims is maintained after moving. Defaults to True.
- **on_move_fn** – (Callable, optional)
An optional callback function to be called after the move operation. Defaults to None.
- **stage_or_context** – (Union[str, usdrt.Usd.Stage, omni.usd.UsdContext], optional)
The stage or context to which the changes are applied. It can be a stage instance, context instance, or context name. By default, it will apply the changes to the stage in the default context.
### Methods
- **__init__(paths_to_move[, time_code, ...])**
Creates a command for moving multiple Fabric prims to new locations.
- **do()**
Executes the move of multiple prims.
- **undo()**
Undoes the move of multiple prims.
### omni.fabric.commands.MoveFabricPrimsCommand
#### __init__(on_move_fn: Optional[Callable] = None, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)
Creates a command for moving multiple Fabric prims to new locations.
#### do()
Executes the move of multiple prims.
#### undo()
Undoes the move of multiple prims. | 2,049 |
omni.fabric.commands.scripts.commands.Classes.md | # omni.fabric.commands.scripts.commands Classes
## Classes Summary
| Class Name | Description |
|------------|-------------|
| ChangeFabricAttributeCommand | Change fabric prim attribute undoable **Command**. |
| ChangeFabricPropertyCommand | Change prim property undoable **Command**. |
| CopyFabricPrimCommand | A command to copy a Fabric prim to a new location. |
| CopyFabricPrimsCommand | A command for copying and pasting Fabric prims within a stage. |
| CreateDefaultXformOnFabricPrimCommand | A command to create and apply a default transform to a Fabric prim at a specified path. |
| CreateFabricPrimCommand | A command to create a Fabric prim with a default transform. |
| CreateFabricPrimWithDefaultXformCommand | A command to create a Fabric prim with a default transform. |
| DeleteFabricPrimsCommand | A command for deleting prims from a Fabric stage. |
```
| Command Name | Description |
|--------------|-------------|
| GroupFabricPrimsCommand | A command to group multiple Fabric prims under a new Xform prim. |
| MoveFabricPrimCommand | A command for moving a single prim from one path to another within the Fabric stage. |
| MoveFabricPrimsCommand | A command for moving multiple prims within a Fabric stage. |
| ToggleVisibilitySelectedFabricPrimsCommand | Toggles the visibility of the selected Fabric prims. |
| TransformFabricPrimCommand | A command to transform a Fabric prim. |
| UngroupFabricPrimsCommand | A command to ungroup Fabric prims from their common parent group. | | 1,502 |
omni.fabric.commands.scripts.CopyFabricPrimCommand.md | # CopyFabricPrimCommand
## Overview
A command to copy a Fabric prim to a new location.
This command is used to duplicate a specified Fabric prim and place it under a new path within the same stage. It supports undo and redo operations.
### Parameters
- **path_from**
- **path_to** (Optional[str] = None)
- **exclusive_select** (bool = True)
- **usd_context_name** (str = '')
## Parameters
- **path_from** – str
The source path of the Fabric prim to copy.
- **path_to** – Optional[str]
The destination path for the copied prim. If None, a new unique path is generated.
- **exclusive_select** – bool
If True, the copied prim will be exclusively selected; otherwise, it won’t affect the selection.
- **usd_context_name** – str
The name of the USD context. Defaults to an empty string, which uses the default context.
## Methods
- **__init__(path_from[, path_to, ...])**
Creates a CopyFabricPrimCommand to copy a Fabric prim to a new location.
- **do()**
Executes the command to copy a Fabric prim to a new location.
- **undo()**
Undoes the copy a Fabric prim to a new location, effectively deleting it from the stage.
### __init__(path_from: str, path_to: Optional[str] = None, exclusive_select: bool = True, usd_context_name: str = '')
Creates a CopyFabricPrimCommand to copy a Fabric prim to a new location.
### do()
Executes the command to copy a Fabric prim to a new location.
### undo()
Undoes the copy a Fabric prim to a new location, effectively deleting it from the stage. | 1,491 |
omni.fabric.commands.scripts.CopyFabricPrimsCommand.md | # CopyFabricPrimsCommand
## CopyFabricPrimsCommand
```
class omni.fabric.commands.scripts.CopyFabricPrimsCommand(paths_from: list[str], paths_to: Optional[list[str]] = None)
```
Bases: `Command`
A command for copying and pasting Fabric prims within a stage.
This command duplicates one or more Fabric prims to new locations within the same Fabric stage, preserving their properties and relationships. It supports undo and redo capabilities.
### Parameters
- **paths_from** (list[str]) – The source paths of the prims to copy.
- **paths_to** (list[str], optional) – The destination paths for the copied prims. If `None` or length smaller than paths_from, then the next free path is generated for missing paths.
## Methods
| Method | Description |
|--------|-------------|
| `__init__(paths_from[, paths_to])` | Creates a command for copying multiple Fabric prims to new locations. |
| `do()` | Executes the command to copy multiple Fabric prims to the specified new locations. |
| `undo()` | Undoes the copy operation, effectively removing the copied prims. |
### __init__(paths_from[, paths_to])
Creates a command for copying multiple Fabric prims to new locations.
### do()
Executes the command to copy multiple Fabric prims to the specified new locations.
### undo()
Undoes the copy operation, effectively removing the copied prims. | 1,344 |
omni.fabric.commands.scripts.CreateDefaultXformOnFabricPrimCommand.md | # CreateDefaultXformOnFabricPrimCommand
## Overview
A command to create and apply a default transform to a Fabric prim at a specified path.
### Parameters
- **prim_path** – str
The Fabric path where the prim is located.
- **stage** – usdrt.Usd.Stage
The stage where the prim resides.
### Methods
- **__init__(prim_path, stage)**
Creates and applies a default transform to a Fabric prim.
- **do()**
Executes the command to create and apply a default transform to a Fabric prim at a specified path.
- **undo()**
Undoes the command to remove the default transform from the Fabric prim.
| Method | Description |
| ------ | ----------- |
| `undo()` | Undoes the default transform to the Fabric prim. |
### __init__(prim_path: str, stage: Stage)
Creates and applies a default transform to a Fabric prim.
### do()
Executes the command to create and apply a default transform to a Fabric prim at a specified path.
### undo()
Undoes the default transform to the Fabric prim. | 991 |
omni.fabric.commands.scripts.CreateFabricPrimCommand.md | # CreateFabricPrimCommand
## Class Overview
The `CreateFabricPrimCommand` class is defined in `omni.fabric.commands.scripts` and is used to create a new primitive in the fabric.
### Parameters
- `prim_type` (str): The type of the primitive to create.
- `prim_path` (Optional[str] = None): The path where the primitive should be created. If not specified, the primitive will be created at the current selection's path.
- `select_new_prim` (bool = True): If True, the newly created primitive will be selected.
- `attributes` (Dict[str, Any] = {}): A dictionary of attributes to apply to the new primitive.
- `create_default_xform` (bool = True): If True, a default transform will be created for the new primitive.
Bases:
- `CreateFabricPrimWithDefaultXformCommand`
A command to create a Fabric prim with a default transform.
This command creates a new prim of the specified type, at the given path, and applies a default transform to it. The newly created prim can be automatically selected.
Parameters:
- **prim_type** – str
The type of prim to create (e.g., 'Sphere', 'Cube').
- **prim_path** – Optional[str]
The path where the prim will be created. If None, it will be placed at the stage root or under default prim using the type name.
- **select_new_prim** – bool
Indicates whether to select the prim after creation.
- **attributes** – Optional[Dict[str, Any]]
Optional dictionary of attributes to set after creation.
- **create_default_xform** – bool
Determines whether to create default transform attributes for the prim.
- **stage** – Optional[usdrt.Usd.Stage]
The stage where the prim will be created. If not provided, the default stage is used.
- **context_name** – Optional[str]
The name of the context to use for the operation. If not provided, the default context is used.
Methods:
- `__init__(prim_type[, prim_path, ...])`
Initializes a command to create a Fabric prim with a default transform.
Attributes:
<em class="sig-param">
<span class="n">
<span class="pre">
attributes
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
Dict
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
Any
<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">
{}
<em class="sig-param">
<span class="n">
<span class="pre">
create_default_xform
<span class="o">
<span class="pre">
=
<span class="default_value">
<span class="pre">
True
<em class="sig-param">
<span class="n">
<span class="pre">
stage
<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">
Stage
<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">
context_name
<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">
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">
None
<span class="sig-paren">
)
<dd>
<p>
Initializes a command to create a Fabric prim with a default transform.
<footer>
<hr/>
| 3,574 |
omni.fabric.commands.scripts.CreateFabricPrimWithDefaultXformCommand.md | # CreateFabricPrimWithDefaultXformCommand
## CreateFabricPrimWithDefaultXformCommand
```
```markdown
class omni.fabric.commands.scripts.CreateFabricPrimWithDefaultXformCommand
(
prim_type : str,
prim_path : Optional[str] = None,
select_new_prim : bool = True,
attributes : Dict[str, Any] = {}
)
```
True
,
stage : Optional[Stage] = None,
context_name : Optional[str] = None
)
Bases:
- Command
- FabricStageHelper
A command to create a Fabric prim with a default transform.
This command creates a new prim of the specified type, at the given path, and applies a default transform to it. The newly created prim can be automatically selected.
Parameters
----------
- **prim_type** – str
The type of prim to create (e.g., ‘Sphere’, ‘Cube’).
- **prim_path** – str
The path where the prim will be created. If None, it will be placed at the stage root or under default prim using the type name.
- **select_new_prim** – bool
Indicates whether to select the prim after creation.
- **attributes** – Dict[str, Any]
Optional dictionary of attributes to set after creation.
- **create_default_xform** – bool
Determines whether to create default transform attributes for the prim.
- **stage** – Optional[usdrt.Usd.Stage]
The stage where the prim will be created. If not provided, the default stage is used.
- **context_name** – Optional[str]
The name of the context to use for the operation. If not provided, the default context is used.
Methods
-------
- **__init__(prim_type[, prim_path, ...])**
A command to create a Fabric prim with a default transform.
- **do()**
Executes the command to create a new Fabric prim with default transform.
- **undo()**
Undoes the creation of the new Fabric prim, effectively deleting it from the stage.
Attributes
----------
- **attr_type_table**
- **default_size_attr_table**
<dl class="py method">
<dt class="sig sig-object py" id="omni.fabric.commands.scripts.CreateFabricPrimWithDefaultXformCommand.__init__">
<span class="sig-name descname">
<span class="pre">
__init__
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
CreateFabricPrimWithDefaultXformCommand
,
<em class="sig-param">
<span class="n">
<span class="pre">
prim_name
<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">
prim_path
<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">
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">
None
,
<em class="sig-param">
<span class="n">
<span class="pre">
select_new_prim
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
True
,
<em class="sig-param">
<span class="n">
<span class="pre">
attributes
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
Dict
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
Any
<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">
{}
,
<em class="sig-param">
<span class="n">
<span class="pre">
create_default_xform
<span class="o">
<span class="pre">
=
<span class="default_value">
<span class="pre">
True
,
<em class="sig-param">
<span class="n">
<span class="pre">
stage
<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">
Stage
<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">
context_name
<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">
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">
None
<span class="sig-paren">
)
<dd>
<p>
A command to create a Fabric prim with a default transform.
<dl class="py method">
<dt class="sig sig-object py" id="omni.fabric.commands.scripts.CreateFabricPrimWithDefaultXformCommand.do">
<span class="sig-name descname">
<span class="pre">
do
<span class="sig-paren">
(
<span class="sig-paren">
)
<dd>
<p>
Executes the command to create a new Fabric prim with default transform.
<p>
If the prim already exists at the specified path, the command will fail and log an error.
<dl class="py method">
<dt class="sig sig-object py" id="omni.fabric.commands.scripts.CreateFabricPrimWithDefaultXformCommand.undo">
<span class="sig-name descname">
<span class="pre">
undo
<span class="sig-paren">
(
<span class="sig-paren">
)
<dd>
<p>
Undoes the creation of the new Fabric prim, effectively deleting it from the stage.
| 6,751 |
omni.fabric.commands.scripts.fabric_stage_helper.Classes.md | # omni.fabric.commands.scripts.fabric_stage_helper Classes
## Classes Summary:
| Class | Description |
|-------|-------------|
| [FabricStageHelper](omni.fabric.commands.scripts.fabric_stage_helper/omni.fabric.commands.scripts.fabric_stage_helper.FabricStageHelper.html) | A helper class that manages Fabric and USD stages within a given context. | | 350 |
omni.fabric.commands.scripts.GroupFabricPrimsCommand.md | # GroupFabricPrimsCommand
## GroupFabricPrimsCommand
```python
FabricStageHelper
```
A command to group multiple Fabric prims under a new Xform prim.
This command creates a new ‘group’ Xform prim at the common parent path of the specified prims and moves the prims under this new parent. It is useful for organizing prims in the scene hierarchy. Supports undo and redo operations.
### Parameters
- **prim_paths** (`List[str]`) – Prim paths that will be grouped.
- **stage** (`usdrt.Usd.Stage`) – Stage to operate. Optional.
- **context_name** (`str`) – The usd context to operate. Optional.
### Methods
- `__init__(prim_paths[, stage, context_name])`
- Create a command to group multiple Fabric prims under a new Xform prim.
- `do()`
- Groups a set of prims under a new Xform prim.
- `undo()`
- Undoes the grouping operation, effectively ungrouping the prims.
#### `__init__(prim_paths, stage=None, context_name=None)`
- **prim_paths** (`List[Union[str, Path]]`)
- **stage** (`Optional[Stage]` = `None`)
- **context_name** (`Optional[str]` = `None`)
- Create a command to group multiple Fabric prims under a new Xform prim.
#### `do()`
- Groups a set of prims under a new Xform prim.
- **Parameters**
- No additional parameters.
- **prim_paths** (List[Union[str, Sdf.Path]]) – Prim paths that will be grouped.
- **stage** (Optional[usdrt.Usd.Stage], optional) – Stage to operate. Defaults to None, which uses the default stage.
- **context_name** (Optional[str], optional) – The USD context to operate. Defaults to None, which uses the default context.
### undo
- Undoes the grouping operation, effectively ungrouping the prims. | 1,652 |
omni.fabric.commands.scripts.md | # omni.fabric.commands.scripts
## Submodules Summary:
- [omni.fabric.commands.scripts.commands](omni.fabric.commands.scripts.commands.html)
- Provides a collection of commands for managing and manipulating prims within a Fabric stage.
- [omni.fabric.commands.scripts.extension](omni.fabric.commands.scripts.extension.html)
- Fabric commands extension
- [omni.fabric.commands.scripts.fabric_stage_helper](omni.fabric.commands.scripts.fabric_stage_helper.html)
- A helper class which helps to interact with Fabric stages.
- [omni.fabric.commands.scripts.utils](omni.fabric.commands.scripts.utils.html)
- An utility module which provides APIs to interact with Fabric stage and prim for fabric commands.
## Classes Summary:
- [ChangeFabricAttributeCommand](omni.fabric.commands.scripts/omni.fabric.commands.scripts.ChangeFabricAttributeCommand.html)
- Change fabric prim attribute undoable **Command**.
- [ChangeFabricPropertyCommand](omni.fabric.commands.scripts/omni.fabric.commands.scripts.ChangeFabricPropertyCommand.html)
- Change prim property undoable **Command**.
- [CopyFabricPrimCommand](omni.fabric.commands.scripts/omni.fabric.commands.scripts.CopyFabricPrimCommand.html)
- A command to copy a Fabric prim to a new location.
- [CopyFabricPrimsCommand](omni.fabric.commands.scripts/omni.fabric.commands.scripts.CopyFabricPrimsCommand.html)
- A command for copying and pasting Fabric prims within a stage.
- [CreateDefaultXformOnFabricPrimCommand](omni.fabric.commands.scripts/omni.fabric.commands.scripts.CreateDefaultXformOnFabricPrimCommand.html)
- A command to create and apply a default transform to a Fabric prim at a specified path.
| CreateFabricPrimCommand | A command to create a Fabric prim with a default transform. |
| --- | --- |
| CreateFabricPrimWithDefaultXformCommand | A command to create a Fabric prim with a default transform. |
| DeleteFabricPrimsCommand | A command for deleting prims from a Fabric stage. |
| FabricCommandsExtension | A class that represents an extension for fabric commands. |
| GroupFabricPrimsCommand | A command to group multiple Fabric prims under a new Xform prim. |
| MoveFabricPrimCommand | A command for moving a single prim from one path to another within the Fabric stage. |
| MoveFabricPrimsCommand | A command for moving multiple prims within a Fabric stage. |
| ToggleVisibilitySelectedFabricPrimsCommand | Toggles the visibility of the selected Fabric prims. |
| TransformFabricPrimCommand | A command to transform a Fabric prim. |
| UngroupFabricPrimsCommand | A command to ungroup Fabric prims from their common parent group. | | 2,620 |
omni.fabric.commands.scripts.MoveFabricPrimCommand.md | # MoveFabricPrimCommand
## MoveFabricPrimCommand
```python
class omni.fabric.commands.scripts.MoveFabricPrimCommand:
def __init__(
path_from: Union[str, Path],
path_to: Union[str, Path],
time_code: TimeCode = Usd.TimeCode.Default(),
keep_world_transform: bool = True,
on_move_fn: Optional[Callable] = None
):
```
### omni.fabric.commands.scripts.MoveFabricPrimCommand
**Bases:**
```
Command
```
**Description:**
A command for moving a single prim from one path to another within the Fabric stage. This command updates the scene graph to reflect the new location of the prim and maintains its world transform if specified. The command supports undo and redo operations.
**Parameters:**
- **path_from** – Union[str, usdrt.Sdf.Path]
The source path from which the prim is to be moved.
- **path_to** – Union[str, usdrt.Sdf.Path]
The target path to which the prim is to be moved to.
- **time_code** – usdrt.Usd.TimeCode
The timecode at which the move operation is performed. Defaults to usdrt.Usd.TimeCode.Default().
- **keep_world_transform** – bool
Whether to maintain the world transform of the prim after moving. Defaults to True.
- **on_move_fn** – Callable
An optional callback function to be called after the move operation. Defaults to None
- **stage_or_context** – Union[str, usdrt.Usd.Stage, omni.usd.UsdContext]
The stage or context where the prim is moved. Can be a stage instance, context instance, or context name. Defaults to None
**Methods:**
- **__init__(path_from, path_to[, time_code, ...])**
Creates a command to move a Fabric prim from one path to another.
- **do()**
Executes the command to move the specified Fabric prim to the new location.
- **undo()**
Undoes the move of the specified Fabric prims, restoring them to the previous location.
```
### omni.fabric.commands.scripts.MoveFabricPrimCommand
#### __init__(source_path: str, target_path: str, time_code: TimeCode = Usd.TimeCode.Default(), keep_world_transform: bool = True, on_move_fn: Optional[Callable] = None, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)
Creates a command to move a Fabric prim from one path to another.
#### do()
Executes the command to move the specified Fabric prim to the new location.
#### undo()
Undoes the move of the specified Fabric prims, restoring them to the previous location | 2,381 |
omni.fabric.commands.scripts.MoveFabricPrimsCommand.md | # MoveFabricPrimsCommand
## Overview
```python
class omni.fabric.commands.scripts.MoveFabricPrimsCommand:
def __init__(
paths_to_move: Dict[str, str],
time_code: TimeCode = Usd.TimeCode.Default(),
keep_world_transform: bool = True,
on_move_fn: Optional[Callable[[], None]] = None,
stage_or_context: Optional[Usd.Stage] = None
):
```
## Parameters
- `paths_to_move`: A dictionary where keys are source paths and values are destination paths.
- `time_code`: The time code at which the operation is performed. Default is `Usd.TimeCode.Default()`.
- `keep_world_transform`: If True, the world transform of the prims is preserved. Default is True.
- `on_move_fn`: A callback function to be executed after the move operation. Default is None.
- `stage_or_context`: The stage or context in which the operation is performed. Default is None.
```
## MoveFabricPrimsCommand
Bases: `Command`
A command for moving multiple prims within a Fabric stage.
This command allows multiple prims to be moved to new locations, updating the scene graph accordingly. Supports undo and redo.
### Parameters
- **paths_to_move** – (Dict[str, str])
A dictionary containing path mappings from source to destination.
- **time_code** – (usdrt.Usd.TimeCode, optional)
The timecode at which the move operation is performed. Defaults to usdrt.Usd.TimeCode.Default().
- **keep_world_transform** – (bool, optional)
If set to True, the world transform of the prims is maintained after moving. Defaults to True.
- **on_move_fn** – (Callable, optional)
An optional callback function to be called after the move operation. Defaults to None.
- **stage_or_context** – (Union[str, usdrt.Usd.Stage, omni.usd.UsdContext], optional)
The stage or context to which the changes are applied. It can be a stage instance, context instance, or context name. By default, it will apply the changes to the stage in the default context.
### Methods
- **__init__(paths_to_move[, time_code, ...])**
Creates a command for moving multiple Fabric prims to new locations.
- **do()**
Executes the move of multiple prims.
- **undo()**
Undoes the move of multiple prims.
### omni.fabric.commands.scripts.MoveFabricPrimsCommand
#### `__init__(self, on_completion_fn: Optional[Callable] = True, on_move_fn: Optional[Callable] = None, stage_or_context: Optional[Union[str, Stage, UsdContext]] = None)`
Creates a command for moving multiple Fabric prims to new locations.
#### `do(self)`
Executes the move of multiple prims.
#### `undo(self)`
Undoes the move of multiple prims. | 2,583 |
omni.fabric.commands.scripts.Submodules.md | # omni.fabric.commands.scripts Submodules
## Submodules Summary:
| Module | Description |
|--------|-------------|
| [omni.fabric.commands.scripts.commands](omni.fabric.commands.scripts.commands.html) | Provides a collection of commands for managing and manipulating prims within a Fabric stage. |
| [omni.fabric.commands.scripts.extension](omni.fabric.commands.scripts.extension.html) | Fabric commands extension |
| [omni.fabric.commands.scripts.fabric_stage_helper](omni.fabric.commands.scripts.fabric_stage_helper.html) | A helper class which helps to interact with Fabric stages. |
| [omni.fabric.commands.scripts.utils](omni.fabric.commands.scripts.utils.html) | An utility module which provides APIs to interact with Fabric stage and prim for fabric commands. | | 770 |
omni.fabric.commands.scripts.ToggleVisibilitySelectedFabricPrimsCommand.md | # ToggleVisibilitySelectedFabricPrimsCommand
## ToggleVisibilitySelectedFabricPrimsCommand
```
```markdown
class omni.fabric.commands.scripts.ToggleVisibilitySelectedFabricPrimsCommand(selected_paths: List[str], stage: Optional[Stage] = None)
```
```markdown
Bases: Command
Toggles the visibility of the selected Fabric prims.
### Parameters
- **selected_paths** (List[str]) – The Fabric paths of the selected prims.
- **stage** (Optional[usdrt.Usd.Stage]) – The stage where the prims exist. If not provided, the default stage is used.
### Methods
| Method | Description |
|--------|-------------|
| `__init__(selected_paths[, stage])` | Toggles the visibility of the selected prims. |
| `do()` | Executes the toggle visibility command on the selected prims. |
| `undo()` | Undoes the toggle visibility command, restoring the original visibility states of the selected prims. |
### __init__(selected_paths[, stage])
Toggles the visibility of the selected prims.
### do()
Executes the toggle visibility command on the selected prims.
### undo()
Undoes the toggle visibility command, restoring the original visibility states of the selected prims. | 1,154 |
omni.fabric.commands.scripts.TransformFabricPrimCommand.md | # TransformFabricPrimCommand
## TransformFabricPrimCommand
## TransformFabricPrimCommand
### Description
A command to transform a Fabric prim.
This command applies a specified transformation matrix to a Fabric prim at a given path. It can operate in either world or local space and supports undo/redo operations.
### Bases
- Command
### Parameters
- **path** – str: Prim path.
- **new_transform_matrix** – usdrt.Gf.Matrix4d: New local/world transform matrix.
- **old_transform_matrix** – Optional[usdrt.Gf.Matrix4d]: Optional old local/world transform matrix to undo to. If `None` use current transform.
- **is_world_xform** – bool: Whether the transformation is applied in world space (True) or local space (False). Defaults to False.
- **time_code** – usdrt.Usd.TimeCode: The timecode at which the transformation is applied. Defaults to usdrt.Usd.TimeCode.Default().
- **usd_context_name** – str: The name of the USD context the command operates within. Defaults to an empty string, which uses the default context.
### Methods
- **__init__(path, new_transform_matrix[, ...])**
- Creates a TransformFabricPrimCommand to perform transformations on a Fabric prim.
- **do()**
- Executes the command to transform a Fabric prim.
- **undo()**
- Undoes the transformation of the Fabric prim, effectively reset the prim to the old transformation.
<span class="n">
<span class="pre">
usd_context_name
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
<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>
Creates a TransformFabricPrimCommand to perform transformations on a Fabric prim.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
path
(
<em>
str
) – The path to the Fabric prim to transform.
<li>
<p>
<strong>
new_transform_matrix
(
<em>
usdrt.Gf.Matrix4d
) – A 4x4 transformation matrix specifying the new transformation.
<li>
<p>
<strong>
old_transform_matrix
(
<em>
usdrt.Gf.Matrix4d
<em>
,
<em>
optional
) – The original transformation matrix before the transformation.
<dl class="py method">
<dt class="sig sig-object py" id="omni.fabric.commands.scripts.TransformFabricPrimCommand.do">
<span class="sig-name descname">
<span class="pre">
do
<span class="sig-paren">
(
<span class="sig-paren">
)
<dd>
<p>
Executes the command to transform a Fabric prim.
<dl class="py method">
<dt class="sig sig-object py" id="omni.fabric.commands.scripts.TransformFabricPrimCommand.undo">
<span class="sig-name descname">
<span class="pre">
undo
<span class="sig-paren">
(
<span class="sig-paren">
)
<dd>
<p>
Undoes the transformation of the Fabric prim, effectively reset the prim to the old transformation
<footer>
<hr/>
| 3,279 |
omni.fabric.commands.scripts.UngroupFabricPrimsCommand.md | # UngroupFabricPrimsCommand
## UngroupFabricPrimsCommand
```
```markdown
class omni.fabric.commands.scripts.UngroupFabricPrimsCommand(prim_paths: List[Union[str, Path]], stage: Optional[Stage] = None, context_name: Optional[str] = None)
```
```markdown
Bases: Command, FabricStageHelper
```python
FabricStageHelper
```
A command to ungroup Fabric prims from their common parent group.
This command moves the specified prims from under their group parent prim to the parent path of the group prim. It is useful for flattening the scene hierarchy as needed.
### Parameters
- **prim_paths** (`List[str]`) – Prim paths that will be grouped.
- **stage** (`usdrt.Usd.Stage`) – Stage to operate. Optional.
- **context_name** (`str`) – The usd context to operate. Optional.
### Methods
- `__init__(prim_paths[, stage, context_name])`
- Initializes a command to ungroup Fabric prims from their common parent group
- `do()`
- Ungroups the specified Fabric prims from their parent group prim.
- `undo()`
- Restores the original group structure by regrouping the previously ungrouped prims.
#### `__init__(prim_paths, stage=None, context_name=None)`
- Initializes a command to ungroup Fabric prims from their common parent group
#### `do()`
- Ungroups the specified Fabric prims from their parent group prim.
- The prims will be moved to the parent path of the group prim.
- If there are no prims specified or the group prim is not valid, the command does nothing.
### undo
Restores the original group structure by regrouping the previously ungrouped prims.
Recreates the group prim that was deleted during the do() action and moves the prims back under it. | 1,662 |
omni.fabric.commands.scripts.utils.Functions.md | # omni.fabric.commands.scripts.utils Functions
## Functions Summary
- **can_prim_have_children**
- Determines if a given Fabric prim can have children based on its type and the types of its ancestors.
- **compute_extent_from_points**
- Computes the axis-aligned bounding box (extent) of a given Fabric prim based on its ‘points’ attribute at a specific time.
- **compute_visibility**
- Computes the visibility state of a given Fabric prim.
- **convert_matrix4_type**
- Converts a matrix to the specified matrix type.
- **get_local_transform_matrix_from_xform_attrs**
- Computes the local transformation matrix for a given Fabric prim at a specific time.
- **get_rotation_from_order**
- Composes a rotation based on a given order and corresponding angles.
- **get_stage_next_free_path**
- Generates a unique path for a new prim on the given stage by incrementing a numerical suffix until a free path is found.
- **has_prefix**
- Checks if the given Fabric path has the specified prefix.
| is_ancestor_prim_type | Checks if any ancestor prims of the given prim at the provided path are of the specified prim type. |
| --- | --- |
| remove_descendent_paths | Removes descendant paths from a sorted list of Fabric paths, effectively deduplicating the list by retaining only the highest ancestor paths. | | 1,324 |
omni.fabric.commands.scripts.utils.md | # omni.fabric.commands.scripts.utils
## Functions Summary:
### can_prim_have_children
Determines if a given Fabric prim can have children based on its type and the types of its ancestors.
### compute_extent_from_points
Computes the axis-aligned bounding box (extent) of a given Fabric prim based on its ‘points’ attribute at a specific time.
### compute_visibility
Computes the visibility state of a given Fabric prim.
### convert_matrix4_type
Converts a matrix to the specified matrix type.
### get_local_transform_matrix_from_xform_attrs
Computes the local transformation matrix for a given Fabric prim at a specific time.
### get_rotation_from_order
Composes a rotation based on a given order and corresponding angles.
### get_stage_next_free_path
Generates a unique path for a new prim on the given stage by incrementing a numerical suffix until a free path is found.
### has_prefix
Checks if the given Fabric path has the specified prefix.
<span class="doc">
is_ancestor_prim_type
<td>
<p>
Checks if any ancestor prims of the given prim at the provided path are of the specified prim type.
<tr class="row-even">
<td>
<p>
<a class="reference internal" href="omni.fabric.commands.scripts.utils/omni.fabric.commands.scripts.utils.remove_descendent_paths.html">
<span class="doc">
remove_descendent_paths
<td>
<p>
Removes descendant paths from a sorted list of Fabric paths, effectively deduplicating the list by retaining only the highest ancestor paths.
<footer>
<hr/>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
| 1,591 |
omni.fabric.commands.ToggleVisibilitySelectedFabricPrimsCommand.md | # ToggleVisibilitySelectedFabricPrimsCommand
## ToggleVisibilitySelectedFabricPrimsCommand
```python
class omni.fabric.commands.ToggleVisibilitySelectedFabricPrimsCommand(selected_paths: List[str], stage: Optional[Stage] = None)
```
**Base Class:** [Command](#)
**Description:**
Toggles the visibility of the selected Fabric prims.
**Parameters:**
- **selected_paths** (List[str]) – The Fabric paths of the selected prims.
- **stage** (Optional[Stage]) – The stage where the prims exist. If not provided, the default stage is used.
**Methods:**
- **__init__**(selected_paths, stage=None)
```
| Function | Description |
|----------|-------------|
| `do(selected_paths[, stage])` | Toggles the visibility of the selected prims. |
| `do()` | Executes the toggle visibility command on the selected prims. |
| `undo()` | Undoes the toggle visibility command, restoring the original visibility states of the selected prims. |
### `__init__(selected_paths: List[str], stage: Optional[Stage] = None)`
Toggles the visibility of the selected prims.
### `do()`
Executes the toggle visibility command on the selected prims.
### `undo()`
Undoes the toggle visibility command, restoring the original visibility states of the selected prims. | 1,235 |
omni.fabric.commands.TransformFabricPrimCommand.md | # TransformFabricPrimCommand
## TransformFabricPrimCommand
```python
class omni.fabric.commands.TransformFabricPrimCommand(path: str, new_transform_matrix: Matrix4d, old_transform_matrix: Optional[Matrix4d] = None, is_world_xform: bool = False, time_code: TimeCode = Usd.TimeCode.Default(), usd_context_name: str = '')
```
This class represents a command to transform a prim in the fabric.
- **path**: The path of the prim to transform.
- **new_transform_matrix**: The new transformation matrix to apply.
- **old_transform_matrix**: (Optional) The original transformation matrix. Default is None.
- **is_world_xform**: Whether the transformation is in world space. Default is False.
- **time_code**: The time code for the transformation. Default is Usd.TimeCode.Default().
- **usd_context_name**: The USD context name. Default is an empty string.
## omni.fabric.commands.TransformFabricPrimCommand
Bases: `Command`
A command to transform a Fabric prim.
This command applies a specified transformation matrix to a Fabric prim at a given path. It can operate in either world or local space and supports undo/redo operations.
### Parameters
- **path** – str
Prim path.
- **new_transform_matrix** – usdrt.Gf.Matrix4d
New local/world transform matrix.
- **old_transform_matrix** – Optional[usdrt.Gf.Matrix4d] = None
Optional old local/world transform matrix to undo to. If `None`, use current transform.
- **is_world_xform** – bool = False
Whether the transformation is applied in world space (True) or local space (False). Defaults to False.
- **time_code** – usdrt.Usd.TimeCode = Usd.TimeCode.Default()
The timecode at which the transformation is applied. Defaults to usdrt.Usd.TimeCode.Default().
- **usd_context_name** – str = ""
The name of the USD context the command operates within. Defaults to an empty string, which uses the default context.
### Methods
- `__init__(path, new_transform_matrix[, ...])`
Creates a TransformFabricPrimCommand to perform transformations on a Fabric prim.
- `do()`
Executes the command to transform a Fabric prim.
- `undo()`
Undoes the transformation of the Fabric prim, effectively reset the prim to the old transformation.
#### __init__
- **path** – str
- **new_transform_matrix** – Matrix4d
- **old_transform_matrix** – Optional[Matrix4d] = None
- **is_world_xform** – bool = False
- **time_code** – TimeCode = Usd.TimeCode.Default()
- **usd_context_name** – str = ""
## omni.fabric.commands.TransformFabricPrimCommand
### `__init__(path: str, new_transform_matrix: usdrt.Gf.Matrix4d, old_transform_matrix: usdrt.Gf.Matrix4d = None)`
Creates a TransformFabricPrimCommand to perform transformations on a Fabric prim.
**Parameters**
- **path** (str) – The path to the Fabric prim to transform.
- **new_transform_matrix** (usdrt.Gf.Matrix4d) – A 4x4 transformation matrix specifying the new transformation.
- **old_transform_matrix** (usdrt.Gf.Matrix4d, optional) – The original transformation matrix before the transformation.
### `do()`
Executes the command to transform a Fabric prim.
### `undo()`
Undoes the transformation of the Fabric prim, effectively reset the prim to the old transformation. | 3,168 |
omni.graph.action.Functions.md | # omni.graph.action Functions
## Functions Summary:
| Function | Description |
|----------|-------------|
| get_interface | get_interface() -> omni.graph.action_core._omni_graph_action_core.IActionGraph | | 206 |
omni.graph.action.get_interface.md | # get_interface
Access the IActionGraph interface. This may be more efficient than creating an instance each time it is needed.
## Returns
- The interface object
## Return type
- omni.graph.action.IActionGraph | 212 |
omni.graph.action_core.Functions.md | # omni.graph.action_core Functions
## Functions Summary
- **get_interface**
- get_interface() -> omni.graph.action_core._omni_graph_action_core.IActionGraph | 160 |
omni.graph.action_core_api.md | # Omniverse Kit API
## Class Hierarchy
- namespace omni
- namespace core
- template class Generated<omni::graph::action::IActionGraph_abi>
- template class Generated<omni::graph::action::unstable::IActionGraphNodes_abi>
- namespace graph
- namespace action
- namespace unstable
- class IActionGraphNodes_abi
- enum NodeTypeSpecialBehavior
- class IActionGraph_abi
## File Hierarchy
- Directory omni
- Directory graph
- Directory action
- Directory unstable
- File IActionGraphNodes.gen.h
- File IActionGraphNodes.h
## Namespaces
- **omni**
- **omni::core**
- **omni::graph**
- **omni::graph::action**
- **omni::graph::action::unstable**
## Classes and Structs
- **omni::core::Generated< omni::graph::action::IActionGraph_abi >** : Functions for implementing nodes which are used in `Action Graph`.
- **omni::core::Generated< omni::graph::action::unstable::IActionGraphNodes_abi >**
- **omni::graph::action::IActionGraph_abi** : Functions for implementing nodes which are used in `Action Graph`.
- **omni::graph::action::unstable::IActionGraphNodes_abi**
## Enums
- **omni::graph::action::unstable::NodeTypeSpecialBehavior**
## Functions
- **omni::graph::action::getInterface**
- **omni::graph::action::OMNI_DECLARE_INTERFACE**
- **omni::graph::action::unstable::OMNI_DECLARE_INTERFACE** | 1,377 |
omni.graph.core.acquire_interface.md | # acquire_interface
## acquire_interface
```python
omni.graph.core.acquire_interface(plugin_name: str = None, library_path: str = None) -> omni.graph.core._omni_graph_core.ComputeGraph
```
``` | 193 |
omni.graph.core.attach.md | # attach
## attach
```python
omni.graph.core.attach(stage_id: int, mps: float) -> None
```
Attach the graph to a particular stage.
### Parameters
- **stage_id** (int) – The stage id of the stage to attach to
- **mps** (float) – the meters per second setting for the stage | 274 |
omni.graph.core.Attribute.md | # Attribute
## Class Definition
```python
class omni.graph.core.Attribute(pybind11_object):
```
An attribute, defining a data type and value that belongs to a node
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | |
| `connect(self, path, modify_usd)` | Connects this attribute with another attribute. |
| `connectEx(self, info, modify_usd)` | Connects this attribute with another attribute. |
| `connectPrim(self, path, modify_usd, write)` | Connects this attribute to a prim that can represent a bundle connection or just a plain prim relationship |
| `deprecation_message(self)` | Gets the deprecation message on an attribute, if it is deprecated. |
| `disconnect(self, attribute, modify_usd)` | Disconnects this attribute from another attribute. |
| `disconnectPrim(self, attribute, modify_usd)` | |
```
- `disconnectPrim(self, path, modify_usd, write)`
- Disconnects this attribute to a prim that can represent a bundle connection or just a plain prim relationship.
- `ensure_port_type_in_name(name, port_type, ...)`
- Return the attribute name with the port type namespace prepended if it isn't already present.
- `get(self[, on_gpu, instance])`
- Get the value of the attribute.
- `get_all_metadata(self)`
- Gets the attribute's metadata.
- `get_array(self, on_gpu, get_for_write, ...)`
- Gets the value of an array attribute.
- `get_attribute_data(self, instance)`
- Get the AttributeData object that can access the attribute's data.
- `get_disable_dynamic_downstream_work(self)`
- Where we have dynamic scheduling, downstream nodes can have their execution disabled by turning on the flag in the upstream attribute.
- `get_downstream_connection_count(self)`
- Gets the number of downstream connections to this attribute.
- `get_downstream_connections(self)`
- Gets the list of downstream connections to this attribute.
- `get_downstream_connections_info(self)`
- Returns the list of downstream connections for this attribute, with detailed connection information such as the connection type.
- `get_extended_type(self)`
- Get the extended type of the attribute.
- `get_handle(self)`
- Get a handle to the attribute.
- `get_metadata(self, key)`
- Returns the metadata value for the given key.
- `get_metadata_count(self)`
- Gets the number of metadata values on the attribute.
- `get_name(self)`
- Get the name of the attribute.
| Method | Description |
|--------|-------------|
| `get_attribute_name(self)` | Get the attribute's name |
| `get_node(self)` | Gets the node to which this attribute belongs |
| `get_path(self)` | Get the path to the attribute |
| `get_port_type(self)` | Gets the attribute's port type (input, output, or state) |
| `get_port_type_from_name(name)` | Parse the port type from the given attribute name if present. |
| `get_resolved_type(self)` | Get the resolved type of the attribute |
| `get_type_name(self)` | Get the name of the attribute's type |
| `get_union_types(self)` | Get the list of types accepted by a union attribute |
| `get_upstream_connection_count(self)` | Gets the number of upstream connections to this attribute |
| `get_upstream_connections(self)` | Gets the list of upstream connections to this attribute |
| `get_upstream_connections_info(self)` | Returns the list of upstream connections for this attribute, with detailed connection information such as the connection type. |
| `is_array(self)` | Checks if the attribute is an array type. |
| `is_compatible(self, attribute)` | Checks to see if this attribute is compatible with another one, in particular the data types they use |
| `is_connected(self, attribute)` | Checks to see if this attribute has a connection to another attribute |
| `is_deprecated(self)` | Checks whether an attribute is deprecated. |
| `is_dynamic(self)` | |
| Method | Description |
| --- | --- |
| `is_dynamic(self)` | Checks to see if an attribute is dynamic |
| `is_runtime_constant(self)` | Checks is this attribute is a runtime constant. |
| `is_valid(self)` | Checks if the current attribute is valid. |
| `map_to_target(self, target_attrib_name, ...)` | Maps the attribute to another one on the graph target. |
| `register_value_changed_callback(self, func)` | Registers a function that will be invoked when the value of the given attribute changes. |
| `remove_port_type_from_name(name, is_bundle)` | Find the attribute name with the port type removed if it is present. |
| `set(self, value[, on_gpu, instance])` | Sets the value of the attribute's data |
| `set_default(self, value[, on_gpu])` | Sets the default value of the attribute's data (value when not connected) |
| `set_disable_dynamic_downstream_work(self, ...)` | Where we have dynamic scheduling, downstream nodes can have their execution disabled by turning on the flag in the upstream attribute. |
| `set_metadata(self, key, value)` | Sets the metadata value for the given key |
| `set_resolved_type(self, resolved_type)` | Sets the resolved type for the extended attribute. |
| `update_attribute_value(self, update_immediately)` | Requests the value of an attribute. |
| `write_complete(attributes)` | Warn the framework that writing to the provided attributes is done, so it can trigger callbacks attached to them |
### Attributes
| Attribute | Description |
| --- | --- |
| `gpu_ptr_kind` | Defines the memory space that GPU array data pointers live in. |
| `is_optional_for_compute` | |
| Attribute Name | Description |
|----------------|-------------|
| is_optional_for_compute | Flag that is set when an attribute need not be valid for compute() to happen. |
| resolved_prefix | |
| target_mapping | Returns the attribute name on the graph target the attribute is mapped to |
### __init__(*args, **kwargs)
### connect(self: omni.graph.core._omni_graph_core.Attribute, path: omni.graph.core._omni_graph_core.Attribute, modify_usd: bool) -> bool
Connects this attribute with another attribute. Assumes regular connection type.
**Parameters:**
- **path** (omni.graph.core.Attribute) – The destination attr
- **modify_usd** (bool) – Whether to create USD.
**Returns:**
- True for success, False for fail
**Return type:**
- bool
### connectEx(self: omni.graph.core._omni_graph_core.Attribute, info: omni::graph::core::Py_ConnectionInfo, modify_usd: bool) -> bool
Connects this attribute with another attribute. Allows for different connection types.
**Parameters:**
- **info** (omni.graph.core.ConnectionInfo) – The ConnectionInfo object that contains both the attribute and the connection type
- **modify_usd** (bool) – Whether to create USD.
**Returns:**
- True for success, False for fail
**Return type:**
- bool
### connectPrim
```python
connectPrim(self: omni.graph.core._omni_graph_core.Attribute, path: str, modify_usd: bool, write: bool) -> bool
```
Connects this attribute to a prim that can represent a bundle connection or just a plain prim relationship.
**Parameters:**
- **path** (str) – The path to the prim.
- **modify_usd** (bool) – Whether to modify USD.
- **write** (bool) – Whether this connection represents a bundle.
**Returns:**
- True for success, False for fail.
**Return type:**
- bool
### deprecation_message
```python
deprecation_message(self: omni.graph.core._omni_graph_core.Attribute) -> str
```
Gets the deprecation message on an attribute, if it is deprecated. Typically this message gives guidance as to what the user should do instead of using the deprecated attribute.
**Returns:**
- The message associated with a deprecated attribute.
**Return type:**
- str
### disconnect
```python
disconnect(self: omni.graph.core._omni_graph_core.Attribute, attribute: omni.graph.core._omni_graph_core.Attribute, modify_usd: bool) -> None
```
Disconnects an attribute.
**Parameters:**
- **attribute** (omni.graph.core._omni_graph_core.Attribute) – The attribute to disconnect.
- **modify_usd** (bool) – Whether to modify USD.
**Returns:**
- None
**Return type:**
- None
### disconnect
Disconnects this attribute from another attribute.
#### Parameters
- **attribute** (omni.graph.core.Attribute) – The destination attribute of the connection to remove
- **modify_usd** (bool) – Whether to modify USD
#### Returns
- True for success, False for fail
#### Return type
- bool
### disconnectPrim
Disconnects this attribute to a prim that can represent a bundle connection or just a plain prim relationship
#### Parameters
- **path** (str) – The path to the prim
- **modify_usd** (bool) – Whether to modify USD.
- **write** (bool) – Whether this connection represents a bundle
#### Returns
- True for success, False for fail
#### Return type
- bool
### ensure_port_type_in_name
static ensure_port_type_in_name(name: str, port_type: omni.graph.core._omni_graph_core.AttributePortType, is_bundle: bool)
### ensure_port_type_in_name
Return the attribute name with the port type namespace prepended if it isn’t already present.
#### Parameters
- **name** (`str`) – The attribute name, with or without the port prefix
- **port_type** (`omni.graph.core.AttributePortType`) – The port type of the attribute
- **is_bundle** (`bool`) – true if the attribute name is to be used in a bundle. Note that colon is an illegal character
- **instead** (`in bundled attributes so an underscore is used`) –
#### Returns
The name with the proper prefix for the given port type
#### Return type
`str`
### get
Get the value of the attribute
#### Parameters
- **on_gpu** (`bool`) – Is the data to be retrieved from the GPU?
- **instance** (`int`) – an instance index when getting value on an instantiated graph
#### Returns
Value of the attribute’s data
#### Return type
`Any`
### get_all_metadata
Gets the attribute’s metadata
#### Returns
A dictionary of name:value metadata on the attribute
#### Return type
`dict[str,str]`
## get_array
**Definition:**
```python
get_array(self: omni.graph.core._omni_graph_core.Attribute, on_gpu: bool = False, get_for_write: bool, reserved_element_count: int, instance: int = 18446744073709551614) -> object
```
**Description:**
Gets the value of an array attribute
**Parameters:**
- **on_gpu** (bool) – Is the data to be retrieved from the GPU?
- **get_for_write** (bool) – Should the data be retrieved for writing?
- **reserved_element_count** (int) – If the data is to be retrieved for writing, preallocate this many elements
- **instance** (int) – an instance index when getting value on an instantiated graph
**Returns:**
- Value of the array attribute’s data
**Return type:**
- list[Any]
---
## get_attribute_data
**Definition:**
```python
get_attribute_data(self: omni.graph.core._omni_graph_core.Attribute, instance: int = 18446744073709551614) -> omni::graph::core::Py_AttributeData
```
**Description:**
Get the AttributeData object that can access the attribute’s data
**Parameters:**
- **instance** (int) – an instance index when getting value on an instantiated graph
**Returns:**
- The underlying attribute data accessor object for this attribute
**Return type:**
- omni.graph.core.AttributeData
---
## get_disable_dynamic_downstream_work
**Definition:**
```python
get_disable_dynamic_downstream_work(self: omni.graph.core._omni_graph_core.Attribute) -> bool
```
**Description:**
(Description not provided in the HTML snippet)
**Returns:**
- bool
## Dynamic Scheduling
Where we have dynamic scheduling, downstream nodes can have their execution disabled by turning on the flag in the upstream attribute. Note you also have to call `setDynamicDownstreamControl` on the node to enable this feature. See `setDynamicDownstreamControl` on `INode` for further information.
### Returns
- **True** if downstream nodes are disabled in dynamic scheduling, **False** otherwise
- **Return type**: bool
## get_downstream_connection_count
Gets the number of downstream connections to this attribute
### Returns
- The number of downstream connections on this attribute.
- **Return type**: int
## get_downstream_connections
Gets the list of downstream connections to this attribute
### Returns
- The list of downstream connections for this attribute.
- **Return type**: list[omni.graph.core.Attribute]
## get_downstream_connections_info
Returns the list of downstream connections for this attribute, with detailed connection information such as the connection type.
### Returns
- A list of the downstream ConnectionInfo objects
- **Return type**: list[omni.graph.core.ConnectionInfo]
## get_extended_type
(Method description not provided in the HTML snippet)
)
→
omni.graph.core._omni_graph_core.ExtendedAttributeType
Get the extended type of the attribute
Returns
: Extended type of the attribute data object
Return type
: omni.graph.core.ExtendedAttributeType
get_handle
(
self : omni.graph.core._omni_graph_core.Attribute
)
→
int
Get a handle to the attribute
Returns
: An opaque handle to the attribute
Return type
: int
get_metadata
(
self : omni.graph.core._omni_graph_core.Attribute,
key : str
)
→
str
Returns the metadata value for the given key.
Parameters
: key – (str) The metadata keyword
Returns
: Metadata value for the given keyword, or None if it is not defined
Return type
: str
get_metadata_count
(
self : omni.graph.core._omni_graph_core.Attribute
)
→
int
Gets the number of metadata values on the attribute
Returns
: the number of metadata values currently defined on the attribute.
Return type
: int
get_name
(
self : omni.graph.core._omni_graph_core.Attribute
)
→
str
### omni.graph.core.Attribute.get_name
- **Description**: Get the attribute’s name
- **Returns**:
- **Description**: The name of the current attribute.
- **Type**: str
### omni.graph.core.Attribute.get_node
- **Description**: Gets the node to which this attribute belongs
- **Returns**:
- **Description**: The node associated with the attribute
- **Type**: omni.graph.core.Node
### omni.graph.core.Attribute.get_path
- **Description**: Get the path to the attribute
- **Returns**:
- **Description**: The full path to the attribute, including the node path.
- **Type**: str
### omni.graph.core.Attribute.get_port_type
- **Description**: Gets the attribute’s port type (input, output, or state)
- **Returns**:
- **Description**: The port type of the attribute.
- **Type**: omni.graph.core.AttributePortType
### omni.graph.core.Attribute.get_port_type_from_name
- **Description**: static method to get port type from name
- **Parameters**:
- **name**: str
- **Returns**:
- **Type**: omni.graph.core.AttributePortType
```python
omni.graph.core._omni_graph_core.AttributePortType
```
Parse the port type from the given attribute name if present. The port type is indicated by a prefix separated by a colon or underscore in the case of bundled attributes.
#### Parameters
- **name** (`name The attribute`) –
#### Returns
- The port type indicated by the attribute prefix if present.
- `AttributePortType.UNKNOWN` if there is no recognized prefix.
#### Return type
- `omni.graph.core.AttributePortType`
```python
get_resolved_type(self: omni.graph.core._omni_graph_core.Attribute) -> omni::graph::core::Py_Type
```
Get the resolved type of the attribute
#### Returns
- Resolved type of the attribute data object, or the hardcoded type for regular attributes
#### Return type
- `omni.graph.core.Type`
```python
get_type_name(self: omni.graph.core._omni_graph_core.Attribute) -> str
```
Get the name of the attribute’s type
#### Returns
- The type name of the current attribute.
#### Return type
- `str`
```python
get_union_types(self: omni.graph.core._omni_graph_core.Attribute) -> object
```
Get the list of types accepted by a union attribute
#### Returns
- The list of accepted types for the attribute if it is an extended union type, else None
#### Return type
- `list[str]`
```python
get_upstream_connection_count(self: omni.graph.core._omni_graph_core.Attribute) -> int
```
Get the number of upstream connections to this attribute
#### Returns
- The number of upstream connections to this attribute
#### Return type
- `int`
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.Attribute.get_upstream_connection_count">
<span class="sig-name descname">
<span class="pre">
get_upstream_connection_count
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
int
<dd>
<p>
Gets the number of upstream connections to this attribute
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
the number of upstream connections on this attribute.
<dt class="field-even">
Return type
<dd class="field-even">
<p>
int
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.Attribute.get_upstream_connections">
<span class="sig-name descname">
<span class="pre">
get_upstream_connections
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
List[omni.graph.core._omni_graph_core.Attribute]
<dd>
<p>
Gets the list of upstream connections to this attribute
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
The list of upstream connections for this attribute.
<dt class="field-even">
Return type
<dd class="field-even">
<p>
list[omni.graph.core._omni_graph_core.Attribute]
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.Attribute.get_upstream_connections_info">
<span class="sig-name descname">
<span class="pre">
get_upstream_connections_info
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
List[omni::graph::core::Py_ConnectionInfo]
<dd>
<p>
Returns the list of upstream connections for this attribute, with detailed connection information such as the connection type.
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
A list of the upstream ConnectionInfo objects
<dt class="field-even">
Return type
<dd class="field-even">
<p>
list[omni.graph.core.ConnectionInfo]
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.Attribute.is_array">
<span class="sig-name descname">
<span class="pre">
is_array
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
bool
<dd>
<p>
Checks if the attribute is an array type.
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
True if the attribute data type is an array
<dt class="field-even">
Return type
<dd class="field-even">
<p>
bool
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.Attribute.is_compatible">
<span class="sig-name descname">
<span class="pre">
is_compatible
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
bool
<dd>
<p>
Checks if the attribute is compatible with another type.
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
True if the attribute is compatible
<dt class="field-even">
Return type
<dd class="field-even">
<p>
bool
### is_compatible
Checks to see if this attribute is compatible with another one, in particular the data types they use
**Parameters**
- **attribute** (omni.graph.core.Attribute) – Attribute for which compatibility is to be checked
**Returns**
- True if this attribute is compatible with “attribute”
**Return type**
- bool
### is_connected
Checks to see if this attribute has a connection to another attribute
**Parameters**
- **attribute** (Attribute) – Attribute for which the connection is to be checked
**Returns**
- True if this attribute is connected to another, either as source or destination
**Return type**
- bool
### is_deprecated
Checks whether an attribute is deprecated. Deprecated attributes should not be used as they will be removed in a future version.
**Returns**
- True if the attribute is deprecated
**Return type**
- bool
### is_dynamic
Checks if an attribute is dynamic.
**Returns**
- True if the attribute is dynamic
**Return type**
- bool
<dl>
<dt>
<p>
Checks to see if an attribute is dynamic
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
True if the current attribute is a dynamic attribute (not in the node type definition).
<dt class="field-even">
Return type
<dd class="field-even">
<p>
bool
<dd>
<p>
Checks is this attribute is a runtime constant.
<p>
Runtime constants will keep the same value every frame, for every instance.
This property can be taken advantage of in vectorized compute.
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
True if the attribute is a runtime constant
<dt class="field-even">
Return type
<dd class="field-even">
<p>
bool
<dt>
<p>
Checks if the current attribute is valid.
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
True if the attribute reference points to a valid attribute object
<dt class="field-even">
Return type
<dd class="field-even">
<p>
bool
<dt>
<p>
Maps the attribute to another one on the graph target.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul>
<li>
<p>
<strong>
target_attrib_name
(
<em>
str
) – the attribute name on the graph target prim to map this attribute to
<li>
<p>
<strong>
fabric_id
(
<em>
integer
) – (optional) The fabric id cache in which the attribute lives.
Uses the default fabric cache associated to the graph if not specified
<dt class="field-even">
Returns
<dd class="field-even">
<p>
<dl>
<dt>
Whether the call was immediately applied, failed or deferred. Deferral can
<dd>
<p>
happen when the graph does not yet have any explicit instances or a prim view applied
## Return type
FunctionResult
## register_value_changed_callback
```python
register_value_changed_callback(self: omni.graph.core._omni_graph_core.Attribute, func: object) -> None
```
Registers a function that will be invoked when the value of the given attribute changes.
Note that an attribute can have one and only one callback. Subsequent calls will replace previously set callbacks. Passing None for the function argument will clear the existing callback.
### Parameters
**func** (callable) – A function with one argument representing the attribute that changed.
## remove_port_type_from_name
```python
remove_port_type_from_name(name: str, is_bundle: bool) -> str
```
Find the attribute name with the port type removed if it is present. For example “inputs:attr” becomes “attr”
### Parameters
- **name** (str) – The attribute name, with or without the port prefix
- **is_bundle** (bool) – True if the attribute name is to be used in a bundle. Note that colon is an illegal character in bundled attributes so an underscore is used instead.
### Returns
The name with the port type prefix removed
### Return type
str
## set
```python
set(self: omni.graph.core._omni_graph_core.Attribute, value: object, on_gpu: bool = False)
```
### omni.graph.core.Attribute.set
Sets the value of the attribute’s data
**Parameters:**
- **value** (Any) – New value of the attribute’s data
- **on_gpu** (bool) – Is the data to be set on the GPU?
- **instance** (int) – an instance index when setting value on an instantiated graph
**Returns:**
- True if the value was successfully set
**Return type:**
- bool
### omni.graph.core.Attribute.set_default
Sets the default value of the attribute’s data (value when not connected)
**Parameters:**
- **value** (Any) – New value of the default attribute’s data
- **on_gpu** (bool) – Is the data to be set on the GPU?
**Returns:**
- True if the value was successfully set
**Return type:**
- bool
### omni.graph.core.Attribute.set_disable_dynamic_downstream_work
Where we have dynamic scheduling, downstream nodes can have their execution disabled by turning on the flag in the upstream attribute. Note you also have to call setDynamicDownstreamControl on the node to enable this feature. This function allows you to set the flag on the attribute that will disable the downstream
**Parameters:**
- **disable** (bool) – Flag to disable downstream execution
**Returns:**
- None
node. See setDynamicDownstreamControl on INode for further information.
### Parameters
- **disable** (bool) – Whether to disable downstream connected nodes in dynamic scheduling.
### set_metadata
```python
set_metadata(self: omni.graph.core._omni_graph_core.Attribute, key: str, value: str) -> bool
```
Sets the metadata value for the given key
#### Parameters
- **key** (str) – The metadata keyword
- **value** (str) – The value of the metadata
### set_resolved_type
```python
set_resolved_type(self: omni.graph.core._omni_graph_core.Attribute, resolved_type: omni::graph::core::Py_Type) -> None
```
Sets the resolved type for the extended attribute.
Only valid for attributes with union/any extended types, who’s type has not yet been resolved. Should only be called from on_connection_type_resolve() callback. This operation is async and may fail if the type cannot be resolved as requested.
#### Parameters
- **resolved_type** (omni.graph.core.Type) – The type to resolve the attribute to
### update_attribute_value
```python
update_attribute_value(self: omni.graph.core._omni_graph_core.Attribute, update_immediately: bool) -> bool
```
Requests the value of an attribute. In the cases of lazy evaluation systems, this generates the “pull” that causes the attribute to update its value.
#### Parameters
- **update_immediately** (bool) – Whether to update the attribute value immediately. If True, the function will block until the attribute is update and then return. If False, the attribute will be updated in the next update loop.
#### Returns
- The value of the attribute
### write_complete
**Static**
```python
write_complete(attributes: sequence) -> None
```
Warn the framework that writing to the provided attributes is done, so it can trigger callbacks attached to them
**Parameters**
- **attributes** (list[omni.graph.core.Attribute]) – List of attributes that are done writing
### gpu_ptr_kind
**Property**
Defines the memory space that GPU array data pointers live in.
### is_optional_for_compute
**Property**
Flag that is set when an attribute need not be valid for compute() to happen. bool:
### target_mapping
**Property**
Returns the attribute name on the graph target the attribute is mapped to
**Returns**
- The name of the target, or None if there isn’t one mapped
- **Return type**: string | 30,684 |
omni.graph.core.AttributeData.md | # AttributeData
## Methods
- `__init__(*args, **kwargs)`
- `as_read_only(self)`
- Returns read-only variant of the attribute data.
- `copy_data(self, rhs)`
- Copies the AttributeData data into this object's data.
- `cpu_valid(self)`
- Returns whether this attribute data object is currently valid on the cpu.
- `get(self[, on_gpu])`
- Gets the current value of the attribute data
- `get_array(self, on_gpu, get_for_write, ...)`
- Gets the current value of the attribute data.
### Methods
- `get_extended_type(self)`
- Returns the extended type of the current attribute data.
- `get_name(self)`
- Returns the name of the current attribute data.
- `get_resolved_type(self)`
- Returns the resolved type of the extended attribute data.
- `get_type(self)`
- Returns the type of the current attribute data.
- `gpu_valid(self)`
- Returns whether this attribute data object is currently valid on the gpu.
- `is_read_only(self)`
- Returns whether this attribute data object is read-only or not.
- `is_valid(self)`
- Returns whether this attribute data object is valid or not.
- `resize(self, element_count)`
- Sets the number of elements in the array represented by this object.
- `set(self, value[, on_gpu])`
- Sets the value of the attribute data.
- `size(self)`
- Returns the size of the data represented by this object (1 if it's not an array).
### Attributes
- `gpu_ptr_kind`
- Defines the memory space that GPU array data pointers live in.
### Initialization
- `__init__(self, *args, **kwargs)`
- Initialize the object with arguments.
### Methods
- `as_read_only(self: omni.graph.core._omni_graph_core.AttributeData)`
- Converts the object to read-only.
omni.graph.core._omni_graph_core.AttributeData
Returns read-only variant of the attribute data.
Returns:
- Read-only variant of the attribute data.
Return type:
- AttributeData
copy_data(self: omni.graph.core._omni_graph_core.AttributeData, rhs: omni.graph.core._omni_graph_core.AttributeData) -> bool
Copies the AttributeData data into this object’s data.
Parameters:
- rhs (omni.graph.core.AttributeData) – Attribute data to be copied - must be the same type as the current object to work
Returns:
- True if the data was successfully copied, else False.
Return type:
- bool
cpu_valid(self: omni.graph.core._omni_graph_core.AttributeData) -> bool
Returns whether this attribute data object is currently valid on the cpu.
Returns:
- True if the data represented by this object currently has a valid value in CPU memory
Return type:
- bool
get(self: omni.graph.core._omni_graph_core.AttributeData, on_gpu: bool = False) -> object
Gets the current value of the attribute data
Parameters:
- on_gpu (bool) – If True, the data is fetched from GPU, otherwise from CPU. Default is False.
Returns:
- The current value of the attribute data
Return type:
- object
### omni.graph.core.AttributeData.get_data
- **Parameters**
- **on_gpu** (bool) – Is the data to be retrieved from the GPU?
- **Returns**
- Value of the attribute data
- **Return type**
- Any
### omni.graph.core.AttributeData.get_array
- **Parameters**
- **on_gpu** (bool) – Is the data to be retrieved from the GPU?
- **get_for_write** (bool) – Should the data be retrieved for writing?
- **reserved_element_count** (int) – If the data is to be retrieved for writing, preallocate this many elements
- **Returns**
- Value of the array attribute data
- **Return type**
- Any
### omni.graph.core.AttributeData.get_extended_type
- **Returns**
- Extended type of the attribute data object
- **Return type**
- omni.graph.core.ExtendedAttributeType
### omni.graph.core.AttributeData.get_name
- **Returns**
- Name of the attribute data object
- **Return type**
- str
### omni.graph.core.AttributeData.get_resolved_type
### get_resolved_type
```python
get_resolved_type(self: omni.graph.core._omni_graph_core.AttributeData) → omni.graph.core._omni_graph_core.Type
```
Returns the resolved type of the extended attribute data. Only valid for attributes with union/any extended types.
**Returns:**
- Resolved type of the attribute data object
**Return type:**
- omni.graph.core.Type
### get_type
```python
get_type(self: omni.graph.core._omni_graph_core.AttributeData) → omni.graph.core._omni_graph_core.Type
```
Returns the type of the current attribute data.
**Returns:**
- Type of the attribute data object
**Return type:**
- omni.graph.core.Type
### gpu_valid
```python
gpu_valid(self: omni.graph.core._omni_graph_core.AttributeData) → bool
```
Returns whether this attribute data object is currently valid on the gpu.
**Returns:**
- True if the data represented by this object currently has a valid value in GPU memory
**Return type:**
- bool
### is_read_only
```python
is_read_only(self: omni.graph.core._omni_graph_core.AttributeData) → bool
```
Returns whether this attribute data object is read-only or not.
**Returns:**
- True if the data represented by this object is read-only
**Return type:**
- bool
### is_valid
```python
is_valid(self: omni.graph.core._omni_graph_core.AttributeData) → bool
```
Returns whether this attribute data object is valid.
**Returns:**
- True if the data represented by this object is valid
**Return type:**
- bool
### omni.graph.core.AttributeData.is_valid
```python
def is_valid(self: omni.graph.core._omni_graph_core.AttributeData) -> bool:
```
Returns whether this attribute data object is valid or not.
**Returns:**
- True if the data represented by this object is valid
- Return type: bool
### omni.graph.core.AttributeData.resize
```python
def resize(self: omni.graph.core._omni_graph_core.AttributeData, element_count: int) -> bool:
```
Sets the number of elements in the array represented by this object.
**Parameters:**
- **element_count** (int) – Number of elements to reserve in the array
**Returns:**
- True if the array was resized, False if not (e.g. if the attribute data was not an array type)
- Return type: bool
### omni.graph.core.AttributeData.set
```python
def set(self: omni.graph.core._omni_graph_core.AttributeData, value: object, on_gpu: bool = False) -> bool:
```
Sets the value of the attribute data
**Parameters:**
- **value** (Any) – New value of the attribute data
- **on_gpu** (bool) – Is the data to be set on the GPU?
**Returns:**
- True if the value was successfully set
- Return type: bool
### omni.graph.core.AttributeData.size
```python
def size(self: omni.graph.core._omni_graph_core.AttributeData) -> int:
```
Returns the size of the attribute data.
**Returns:**
- The size of the attribute data
- Return type: int
### omni.graph.core._omni_graph_core.AttributeData.size
**Returns the size of the data represented by this object (1 if it’s not an array).**
- **Returns:** Number of elements in the data
- **Return type:** int
### omni.graph.core._omni_graph_core.AttributeData.gpu_ptr_kind
**Defines the memory space that GPU array data pointers live in** | 6,956 |
omni.graph.core.AttributeDataValueHelper.md | # AttributeDataValueHelper
## AttributeDataValueHelper
```
class omni.graph.core.AttributeDataValueHelper(data: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Attribute | pxr.Usd.Property | omni.graph.core._omni_graph_core.AttributeData, instance = 18446744073709551614)
```
Bases: `object`
Class to manage getting and setting of omni.graph.core.AttributeData values.
Note that this helper sets values directly and is not generally advised for use as it has no undo support. Instead you probably want to use Controller or DataView
### _data
The interface to the attribute data
### _type
The attribute type of the data (delay loaded to allow for extended types needing resolution)
### Methods
```
| Method | Description |
| --- | --- |
| `__init__ (data[, instance])` | Create an accessor to get at AttributeData values |
| `check_validity ()` | Check the validity of the data accessor |
| `get ([on_gpu, reserved_element_count, ...])` | Get the value of this attribute data. |
| `get_array (get_for_write[, ...])` | Deprecated - use get() |
| `get_array_size ()` | Get the length of this attribute data's array. |
| `reserve_element_count (new_element_count)` | Set the length of this attribute data's array. |
| `set (new_value[, on_gpu])` | Set the value of AttributeData |
### Attributes
| Attribute | Description |
| --- | --- |
| `attribute_data` | the attribute data this accessor is wrapping |
| `gpu_ptr_kind` | The location of pointers to GPU arrays |
| `is_resolved` | Does the underlying attribute have a definite resolved type? |
| `is_valid` | Validity of the underlying API object |
| `type` | the attribute type, extracting it from the data if it hasn't already been done |
### __init__ Method Details
```python
__init__(
data: str | pxr.Sdf.Path | omni.graph.core.Attribute
)
Create an accessor to get at AttributeData values
### Parameters
- **data** – Object type whose data is to be accessed
- **instance** – Index of the graph from which the attribute’s value is to be accessed
### Raises
- **og.OmniGraphTypeError** – if ‘data’ did not reference a correct attribute type
### check_validity()
Check the validity of the data accessor
### Raises
- **og.OmniGraphError** – if the data about to be accessed is invalid
### get(on_gpu: bool = False, reserved_element_count: Optional[int] = None, return_type: Optional[WrappedArrayType] = None) -> Any
Get the value of this attribute data.
#### Parameters
- **on_gpu** – Is the value stored on the GPU?
- **reserved_element_count** – For array attributes, if not None then the array will pre-reserve this many elements
- **return_type** – For array attributes this specifies how the return data is to be wrapped
#### Returns
Value of the attribute data
### Return type
Any
### Raises
- **og.OmniGraphAttributeError** – If reserved_element_count or return_type are defined but the attribute is not
- **an array type** –
- **og.OmniGraphTypeError** – Raised if the data type is not yet supported or the attribute type is not resolved
### get_array
```python
get_array(get_for_write: bool, reserved_element_count: int = 0, on_gpu: bool = False, return_type: Optional[WrappedArrayType] = None) -> Any
```
Deprecated - use get()
### get_array_size
```python
get_array_size() -> int
```
Get the length of this attribute data’s array.
#### Returns
Length of the data array in Fabric
#### Return type
int
#### Raises
**og.OmniGraphAttributeError** – If the array is not an array type
### reserve_element_count
```python
reserve_element_count(new_element_count: int)
```
Set the length of this attribute data’s array. It doesn’t matter whether the data will be on the GPU or CPU, all this does is reserve the size number. When retrieving the data you will specify where it lives.
#### Parameters
**new_element_count** – Number of array elements to reserve for the array
#### Raises
**og.OmniGraphAttributeError** – If the array is not an array type
### set
```python
set(new_value: Union[Any, TypedValue], on_gpu: bool = False)
```
- **Parameters**
- **new_value** – New value to be set on the attribute
- **on_gpu** – Should the value be stored on the GPU?
- **Raises**
- **og.OmniGraphTypeError** – Raised if the data type of the attribute is not yet supported
### attribute_data
```python
property attribute_data: AttributeData
```
- **Type**
- **AttributeData**
### gpu_ptr_kind
```python
property gpu_ptr_kind: PtrToPtrKind
```
- **Type**
- **PtrToPtrKind**
### is_resolved
```python
property is_resolved: bool
```
- **Type**
- **bool**
### is_valid
```python
property is_valid: bool
```
- **Type**
- **bool**
<dl class="field-list simple">
<dt class="field-odd">
Type
<dd class="field-odd">
<p>
bool
<dl class="py property">
<dt class="sig sig-object py" id="omni.graph.core.AttributeDataValueHelper.type">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
type
<em class="property">
<span class="p">
<span class="pre">
:
<span class="w">
<span class="pre">
Type
<span class="headerlink">
<dd>
<p>
the attribute type, extracting it from the data if it hasn’t already been done
<dl class="field-list simple">
<dt class="field-odd">
Type
<dd class="field-odd">
<p>
Type
<footer>
<hr/>
| 5,445 |
omni.graph.core.AttributePortType.md | # AttributePortType
## 概述
AttributePortType 是 omni.graph.core 模块中的一个类,用于表示节点上属性的端口类型。
### 基础信息
- **基类**: pybind11_object
- **描述**: 属性的端口侧,用于其节点上。
### 成员
- ATTRIBUTE_PORT_TYPE_INPUT : 已弃用,请使用 og.AttributePortType.INPUT
- ATTRIBUTE_PORT_TYPE_OUTPUT : 已弃用,请使用 og.AttributePortType.OUTPUT
- ATTRIBUTE_PORT_TYPE_STATE : 已弃用,请使用 og.AttributePortType.STATE
- ATTRIBUTE_PORT_TYPE_UNKNOWN : 已弃用,请使用 og.AttributePortType.UNKNOWN
- INPUT : 属性为输入
- OUTPUT : 属性为输出
- STATE : 属性为状态
- UNKNOWN : 属性端口类型未知
### 方法
- `__init__(self, value)`
### 属性
- ATTRIBUTE_PORT_TYPE_INPUT
- ATTRIBUTE_PORT_TYPE_OUTPUT
- ATTRIBUTE_PORT_TYPE_STATE
- ATTRIBUTE_PORT_TYPE_UNKNOWN
- INPUT
- OUTPUT
- STATE
- UNKNOWN
| OUTPUT |
| --- |
| STATE |
| UNKNOWN |
| name |
| value |
__init__(self: omni.graph.core._omni_graph_core.AttributePortType, value: int) → None
property name | 845 |
omni.graph.core.AttributePortType_omni.graph.core.AttributePortType.md | # AttributePortType
## Overview
AttributePortType is a class that represents the port side of an attribute on its node. It is based on `pybind11_object`.
### Members
- `ATTRIBUTE_PORT_TYPE_INPUT`: Deprecated: use `og.AttributePortType.INPUT`
- `ATTRIBUTE_PORT_TYPE_OUTPUT`: Deprecated: use `og.AttributePortType.OUTPUT`
- `ATTRIBUTE_PORT_TYPE_STATE`: Deprecated: use `og.AttributePortType.STATE`
- `ATTRIBUTE_PORT_TYPE_UNKNOWN`: Deprecated: use `og.AttributePortType.UNKNOWN`
- `INPUT`: Attribute is an input
- `OUTPUT`: Attribute is an output
- `STATE`: Attribute is state
- `UNKNOWN`: Attribute port type is unknown
### Methods
- `__init__(self, value)`
### Attributes
- `ATTRIBUTE_PORT_TYPE_INPUT`
- `ATTRIBUTE_PORT_TYPE_OUTPUT`
- `ATTRIBUTE_PORT_TYPE_STATE`
- `ATTRIBUTE_PORT_TYPE_UNKNOWN`
- `INPUT`
- `OUTPUT`
- `STATE`
- `UNKNOWN`
| OUTPUT |
| --- |
| STATE |
| UNKNOWN |
| name |
| value |
__init__(self: omni.graph.core._omni_graph_core.AttributePortType, value: int) -> None
property name | 1,003 |
omni.graph.core.AttributeRole.md | # AttributeRole
## Overview
AttributeRole is a class that defines the interpretation applied to attribute data. It is based on `pybind11_object`.
### Members
- **APPLIED_SCHEMA**: Data is to be interpreted as an applied schema.
- **BUNDLE**: Data is to be interpreted as an OmniGraph Bundle.
- **COLOR**: Data is to be interpreted as RGB or RGBA color.
- **EXECUTION**: Data is to be interpreted as an Action Graph execution pin.
- **FRAME**: Data is to be interpreted as a 4x4 matrix representing a reference frame.
- **MATRIX**: Data is to be interpreted as a square matrix of values.
- **NONE**: Data has no special role.
- **NORMAL**: Data is to be interpreted as a normal vector.
- **OBJECT_ID**: Data is to be interpreted as a unique object identifier.
- **PATH**: Data is to be interpreted as a path to a USD element.
- **POSITION**: Data is to be interpreted as a position or point vector.
- **PRIM_TYPE_NAME**: Data is to be interpreted as the name of a prim type.
- **QUATERNION**: Data is to be interpreted as a rotational quaternion.
- **TARGET**: Data is to be interpreted as a relationship target path.
- **TEXCOORD**: Data is to be interpreted as texture coordinates.
- **TEXT**: Data is to be interpreted as a text string.
- **TIMECODE**: Data is to be interpreted as a time code.
- **TRANSFORM**: Deprecated.
- **VECTOR**: Data is to be interpreted as a simple vector.
- **UNKNOWN**: Data role is currently unknown.
### Methods
- **__init__(self, value)**
### Attributes
- **APPLIED_SCHEMA**
- **BUNDLE**
- **COLOR**
- **EXECUTION**
- **FRAME**
- **MATRIX**
- **NONE**
- **NORMAL**
- **OBJECT_ID**
- **PATH**
- **POSITION**
- **PRIM_TYPE_NAME**
- **QUATERNION**
- **TARGET**
- **TEXCOORD**
- **TEXT**
- **TIMECODE**
- **TRANSFORM**
- **VECTOR**
- **UNKNOWN**
| | |
|----|----|
| COLOR | |
| EXECUTION | |
| FRAME | |
| MATRIX | |
| NONE | |
| NORMAL | |
| OBJECT_ID | |
| PATH | |
| POSITION | |
| PRIM_TYPE_NAME | |
| QUATERNION | |
| TARGET | |
| TEXCOORD | |
| TEXT | |
| TIMECODE | |
| TRANSFORM | |
| UNKNOWN | |
| VECTOR | |
| name | |
| value | |
### omni.graph.core.AttributeRole.__init__
```python
__init__(self: omni.graph.core._omni_graph_core.AttributeRole, value: int) -> None
<dl class="py property">
<dt class="sig sig-object py" id="omni.graph.core.AttributeRole.name">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
name
<a class="headerlink" href="#omni.graph.core.AttributeRole.name" title="Permalink to this definition">
<dd>
| 2,661 |
omni.graph.core.AttributeRole_omni.graph.core.AttributeRole.md | # AttributeRole
## Overview
The `AttributeRole` class in `omni.graph.core` provides various interpretations for attribute data. It is based on `pybind11_object`.
### Members
- **APPLIED_SCHEMA**: Data is to be interpreted as an applied schema.
- **BUNDLE**: Data is to be interpreted as an OmniGraph Bundle.
- **COLOR**: Data is to be interpreted as RGB or RGBA color.
- **EXECUTION**: Data is to be interpreted as an Action Graph execution pin.
- **FRAME**: Data is to be interpreted as a 4x4 matrix representing a reference frame.
- **MATRIX**: Data is to be interpreted as a square matrix of values.
- **NONE**: Data has no special role.
- **NORMAL**: Data is to be interpreted as a normal vector.
- **OBJECT_ID**: Data is to be interpreted as a unique object identifier.
- **PATH**: Data is to be interpreted as a path to a USD element.
- **POSITION**: Data is to be interpreted as a position or point vector.
- **PRIM_TYPE_NAME**: Data is to be interpreted as the name of a prim type.
- **QUATERNION**: Data is to be interpreted as a rotational quaternion.
- **TARGET**: Data is to be interpreted as a relationship target path.
- **TEXCOORD**: Data is to be interpreted as texture coordinates.
- **TEXT**: Data is to be interpreted as a text string.
- **TIMECODE**: Data is to be interpreted as a time code.
- **TRANSFORM**: Deprecated.
- **VECTOR**: Data is to be interpreted as a simple vector.
- **UNKNOWN**: Data role is currently unknown.
### Methods
- **__init__(self, value)**
### Attributes
- **APPLIED_SCHEMA**
- **BUNDLE**
- **COLOR**
- **EXECUTION**
- **FRAME**
- **MATRIX**
- **NONE**
- **NORMAL**
- **OBJECT_ID**
- **PATH**
- **POSITION**
- **PRIM_TYPE_NAME**
- **QUATERNION**
- **TARGET**
- **TEXCOORD**
- **TEXT**
- **TIMECODE**
- **TRANSFORM**
- **VECTOR**
- **UNKNOWN**
- **COLOR**
- **EXECUTION**
- **FRAME**
- **MATRIX**
- **NONE**
- **NORMAL**
- **OBJECT_ID**
- **PATH**
- **POSITION**
- **PRIM_TYPE_NAME**
- **QUATERNION**
- **TARGET**
- **TEXCOORD**
- **TEXT**
- **TIMECODE**
- **TRANSFORM**
- **UNKNOWN**
- **VECTOR**
- **name**
- **value**
### omni.graph.core.AttributeRole.__init__
__init__(self: omni.graph.core._omni_graph_core.AttributeRole, value: int) → None
``` | 2,202 |
omni.graph.core.AttributeType.md | # AttributeType
## Methods
- `__init__(*args, **kwargs)`
- `base_data_size(type)`
- Figure out how much space a base data type occupies in memory inside Fabric.
- `get_unions()`
- Returns a dictionary containing the names and contents of the ogn attribute union types.
- `is_legal_ogn_type(type)`
- Check to see if the type combination has a legal representation in OGN.
- `sdf_type_name_from_type(type)`
- Given an attribute type find the corresponding SDF type name for it, None if there is none, e.g.
- `type_from_ogn_type_name(ogn_type_name)`
- Parse an OGN attribute type name into the corresponding omni.graph.core.Type description.
<table>
<tbody>
<tr class="row-odd">
<td>
<p>
<code>type_from_sdf_type_name
(sdf_type_name)
<td>
<p>
Parse an SDF attribute type name into the corresponding omni.graph.core.Type description.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.AttributeType.__init__">
<code>__init__
(<code>*args
<dd>
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.AttributeType.base_data_size">
<code>static base_data_size
(<code>type: omni.graph.core._omni_graph_core.Type
<span class="sig-return">→ int
<dd>
<p>
Figure out how much space a base data type occupies in memory inside Fabric.
This will not necessarily be the same as the space occupied by the Python data, which is only transient.
Multiply by the tuple count and the array element count to get the full size of any given piece of data.
<dl class="field-list simple">
<dt class="field-odd">Parameters
<dd class="field-odd">
<p>
<strong>type
<dt class="field-even">Returns
<dd class="field-even">
<p>
Number of bytes one instance of the base data type occupies in Fabric
<dt class="field-odd">Return type
<dd class="field-odd">
<p>
int
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.AttributeType.get_unions">
<code>static get_unions
()
<span class="sig-return">→ dict
<dd>
<p>
Returns a dictionary containing the names and contents of the ogn attribute union types.
<dl class="field-list simple">
<dt class="field-odd">Returns
<dd class="field-odd">
<p>
Dictionary that maps the attribute union names to list of associated ogn types
<dt class="field-even">Return type
<dd class="field-even">
<p>
dict[str, list[str]]
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.AttributeType.is_legal_ogn_type">
<code>static is_legal_ogn_type
(<code>type: omni.graph.core._omni_graph_core.Type
<span class="sig-return">→ bool
<dd>
<p>
Check to see if the type combination has a legal representation in OGN.
<dl class="field-list simple">
<dt class="field-odd">Parameters
<dd class="field-odd">
<p>
<strong>type
<dt class="field-even">Returns
<dd class="field-even">
<p>
True if the type represents a legal OGN type, otherwise False
### Return type
- **bool**
### sdf_type_name_from_type
- **Parameters**
- **type** (omni.graph.core.Type) – The type to be converted
- **Returns**
- The SDF type name of the type, or None if there is no corresponding SDF type
- **Return type**
- str
### type_from_ogn_type_name
- **Parameters**
- **ogn_type_name** (str) – The OGN-style attribute type name to be converted
- **Returns**
- Type corresponding to the attribute type name in OGN format. Type object will be the unknown type if the type name could be parsed.
- **Return type**
- omni.graph.core.Type
### type_from_sdf_type_name
- **Parameters**
- **sdf_type_name** (str) – The SDF-style attribute type name to be converted
- **Returns**
- Type corresponding to the attribute type name in SDF format. Type object will be the unknown type if the type name could be parsed.
- **Return type**
- omni.graph.core.Type
# 转换后的Markdown格式数据
## 标题
这里是标题内容
## 段落
这里是段落内容,可以包含多个段落。
## 列表
- 列表项1
- 列表项2
## 代码块
```
这里是代码块内容
```
## 链接
这里是链接文本,但链接本身已被删除。
## 图片
这里是图片描述,但图片本身已被删除。 | 3,906 |
omni.graph.core.AttributeType_omni.graph.core.AttributeType.md | # AttributeType
## Methods
- `__init__(*args, **kwargs)`
- `base_data_size(type)`
- Figure out how much space a base data type occupies in memory inside Fabric.
- `get_unions()`
- Returns a dictionary containing the names and contents of the ogn attribute union types.
- `is_legal_ogn_type(type)`
- Check to see if the type combination has a legal representation in OGN.
- `sdf_type_name_from_type(type)`
- Given an attribute type find the corresponding SDF type name for it, None if there is none, e.g.
- `type_from_ogn_type_name(ogn_type_name)`
- Parse an OGN attribute type name into the corresponding omni.graph.core.Type description.
<p>
Parse an SDF attribute type name into the corresponding omni.graph.core.Type description.
<p>
__init__(*args, **kwargs)
<p>
static base_data_size(type: omni.graph.core._omni_graph_core.Type) -> int
<p>
Figure out how much space a base data type occupies in memory inside Fabric.
This will not necessarily be the same as the space occupied by the Python data, which is only transient.
Multiply by the tuple count and the array element count to get the full size of any given piece of data.
<p>
Parameters:
- type (omni.graph.core.Type) – The type object whose base data type size is to be found
<p>
Returns:
- Number of bytes one instance of the base data type occupies in Fabric
<p>
Return type:
- int
<p>
static get_unions() -> dict
<p>
Returns a dictionary containing the names and contents of the ogn attribute union types.
<p>
Returns:
- Dictionary that maps the attribute union names to list of associated ogn types
<p>
Return type:
- dict[str, list[str]]
<p>
static is_legal_ogn_type(type: omni.graph.core._omni_graph_core.Type) -> bool
<p>
Check to see if the type combination has a legal representation in OGN.
<p>
Parameters:
- type (omni.graph.core.Type) – The type object to be checked
<p>
Returns:
- True if the type represents a legal OGN type, otherwise False
## Return type
- bool
## sdf_type_name_from_type
- **Parameters**
- **type** (omni.graph.core.Type) – The type to be converted
- **Returns**
- The SDF type name of the type, or None if there is no corresponding SDF type
- **Return type**
- str
## type_from_ogn_type_name
- **Parameters**
- **ogn_type_name** (str) – The OGN-style attribute type name to be converted
- **Returns**
- Type corresponding to the attribute type name in OGN format. Type object will be the unknown type if the type name could be be parsed.
- **Return type**
- omni.graph.core.Type
## type_from_sdf_type_name
- **Parameters**
- **sdf_type_name** (str) – The SDF-style attribute type name to be converted
- **Returns**
- Type corresponding to the attribute type name in SDF format. Type object will be the unknown type if the type name could be be parsed.
- **Return type**
- omni.graph.core.Type | 2,840 |
omni.graph.core.AttributeValueHelper.md | # AttributeValueHelper
## Class Definition
```python
class omni.graph.core.AttributeValueHelper(attribute: omni.graph.core.Attribute, instance=18446744073709551614)
```
Bases: `AttributeDataValueHelper`
Class to manage getting and setting of Attribute values. You can also just use AttributeDataValueHelper directly.
### Methods
| Method | Description |
|--------|-------------|
| `__init__(attribute[, instance])` | Create a helper class to access Attribute values |
| `resolve_type(type_id)` | Resolves the attribute type, usually before setting an explicit value. |
| `set(new_value[, on_gpu, update_usd])` | Set the value of the attribute. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `attribute` | [Description not provided] |
| Attribute | Description |
|-----------|-------------|
| attribute | the attribute this helper is wrapping |
| is_resolved | Does the underlying attribute have a definite resolved type? |
| is_valid | Validity of the underlying API object |
| type | the attribute type, extracting it from the data if it hasn't already been done |
#### `__init__(attribute: Attribute, instance=18446744073709551614)`
Create a helper class to access Attribute values
**Parameters:**
- **attribute** – Attribute whose value will be accessed
- **instance** – Index of the graph from which the attribute’s value is to be accessed
#### `resolve_type(type_id: str | omni.graph.core._omni_graph_core.Type)`
Resolves the attribute type, usually before setting an explicit value.
**Parameters:**
- **type** – Attribute type to which the attribute will be resolved.
**Raises:**
- **OmniGraphError** – If the attribute could not (or should not) be resolved
#### `set(new_value: Union[Any, TypedValue], on_gpu: bool)`
### Set the value of the attribute
Set the value of the attribute. This is overridden so that it can include an explicit type for the data, which can be used to resolve the attribute type (only valid for extended types)
#### Parameters
- **new_value** – New value to be set on the attribute
- **on_gpu** – Should the value be stored on the GPU?
- **update_usd** – Should the value be immediately propagated to USD?
#### Raises
- **og.OmniGraphError** – Raised if the data type of the attribute is not yet supported
### attribute
the attribute this helper is wrapping
#### Type
- Attribute
### is_resolved
Does the underlying attribute have a definite resolved type?
#### Type
- bool
### is_valid
Validity of the underlying API object
#### Type
- bool
### type
the attribute type, extracting it from the data if it hasn’t already been done
#### Type
- Type | 2,629 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.