file_path
stringlengths 5
148
| content
stringlengths 0
526k
|
---|---|
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 |
omni.example.cpp.usdrt.release_example_usdrt_interface.md | # release_example_usdrt_interface
## release_example_usdrt_interface |
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插件交互。 |
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. |
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 |
omni.example.python.hello_world.Classes.md | # omni.example.python.hello_world Classes
## Classes Summary
- **ExamplePythonHelloWorldExtension** |
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` |
omni.example.python.hello_world.Functions.md | # omni.example.python.hello_world Functions
## Functions Summary
- **hello_from**
- **hello_squared** |
omni.example.python.hello_world.hello_from.md | # hello_from
## hello_from
```python
omni.example.python.hello_world.hello_from(caller: str)
```
```
```
--- |
omni.example.python.hello_world.hello_squared.md | # hello_squared
## hello_squared
```python
omni.example.python.hello_world.hello_squared(x: int)
```
```
```
--- |
omni.example.python.hello_world.hello_world_extension.Classes.md | # omni.example.python.hello_world.hello_world_extension Classes
## Classes Summary
- **ExamplePythonHelloWorldExtension** |
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
```
``` |
omni.example.python.hello_world.hello_world_extension.Functions.md | # omni.example.python.hello_world.hello_world_extension Functions
## Functions Summary:
- **hello_from**
- **hello_squared** |
omni.example.python.hello_world.hello_world_extension.hello_from.md | # hello_from
## hello_from |
omni.example.python.hello_world.hello_world_extension.hello_squared.md | # hello_squared
## hello_squared |
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 |
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) | | |
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 |
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) | | |
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`
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
```
``` |
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) |
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 |
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
``` |
omni.example.python.usdrt.Classes.md | # omni.example.python.usdrt Classes
## Classes Summary:
- **UsdrtExamplePythonExtension** |
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
``` |
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
``` |
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 |
omni.example.python.usdrt.example_python_usdrt_extension.Classes.md | # omni.example.python.usdrt.example_python_usdrt_extension Classes
## Classes Summary:
- **UsdrtExamplePythonExtension** |
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
"""
```
``` |
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 |
``` |
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
``` |
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 |
omni.example.python.usdrt.example_python_usdrt_extension.get_stage_id.md | # get_stage_id
## get_stage_id
Return the stage Id of the current stage |
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.
``` |
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 |
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` |
omni.example.python.usdrt.get_selected_prim_path.md | # get_selected_prim_path
## get_selected_prim_path |
omni.example.python.usdrt.get_stage_id.md | # get_stage_id
## get_stage_id
### omni.example.python.usdrt.get_stage_id
Return the stage Id of the current stage |
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. |
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 | |
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 | |
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:
```
``` |
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)
``` |
omni.ext.acquire_ext_interface.md | # acquire_ext_interface
## acquire_ext_interface |
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 | | |
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. |
omni.ext.destroy_link.md | # destroy_link
## destroy_link
Destroys an existing file system link
### Parameters
- **link_folder_path** – Path to linked folder to destroy. |
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* |
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]):
</dt>
<dd>
<p>
Tuple of result, list of extensions (solution) and error message.
</p>
</dd>
</dl>
</dd>
</dl>
<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>
</span>
<span class="sig-paren">
(
</span>
<em class="sig-param">
<span class="n">
<span class="pre">
self
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
omni.ext._extensions.ExtensionManager
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
on_enable_fn
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Callable
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
<span class="p">
<span class="pre">
,
</span>
</span>
<span class="w">
</span>
<span class="pre">
None
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
on_disable_fn
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Callable
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
<span class="p">
<span class="pre">
,
</span>
</span>
<span class="w">
</span>
<span class="pre">
None
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
ext_name
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
str
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
''
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
hook_name
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
str
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
''
</span>
</span>
</em>
<span class="sig-paren">
)
</span>
<span class="sig-return">
<span class="sig-return-icon">
→
</span>
<span class="sig-return-typehint">
<span class="pre">
Tuple[omni::ext::IHookHolder,
</span>
<span class="pre">
omni::ext::IHookHolder]
</span>
</span>
</span>
</dt>
<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>
<p>
Example:
</p>
<div class="highlight-c++ notranslate">
<div class="highlight">
<pre><span></span><span class="n">def</span><span class="w"> </span><span class="n">on_ext_enabled</span><span class="p">(</span><span class="n">ext_id</span><span class="o">:</span><span class="w"> </span><span class="n">str</span><span class="p">)</span><span class="o">:</span><span class="w"></span>
<span class="w"> </span><span class="n">print</span><span class="p">(</span><span class="s">"enabled:"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ext_id</span><span class="p">)</span><span class="w"></span>
<span class="n">def</span><span class="w"> </span><span class="n">on_ext_disabled</span><span class="p">(</span><span class="n">ext_id</span><span class="o">:</span><span class="w"> </span><span class="n">str</span><span class="p">)</span><span class="o">:</span><span class="w"></span>
<span class="w"> </span><span class="n">print</span><span class="p">(</span><span class="s">"disabled:"</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">ext_id</span><span class="p">)</span><span class="w"></span>
<span class="n">manager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">omni</span><span class="p">.</span><span class="n">kit</span><span class="p">.</span><span class="n">app</span><span class="p">.</span><span class="n">get_app</span><span class="p">().</span><span class="n">get_extension_manager</span><span class="p">()</span><span class="w"></span>
<span class="n">self</span><span class="p">.</span><span class="n">hooks</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">manager</span><span class="p">.</span><span class="n">subscribe_to_extension_enable</span><span class="p">(</span><span class="n">on_ext_enabled</span><span class="p">,</span><span class="w"> </span><span class="n">on_ext_disabled</span><span class="p">,</span><span class="w"> </span><span class="n">ext_name</span><span class="o">=</span><span class="s">"omni.kit.window.console"</span><span class="p">,</span><span class="w"> </span><span class="n">hook_name</span><span class="o">=</span><span class="s">"la la la"</span><span class="p">)</span><span class="w"></span>
<span class="cp"># Notice that we stored subscription holder somewhere (in self for instance) to hold it.</span>
</pre>
</div>
</div>
<dl class="field-list simple">
<dt class="field-odd">
Parameters
</dt>
<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` |
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 |
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>
</p>
</td>
</tr>
</tbody>
</table>
<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>
</span>
<span class="sig-paren">
(
</span>
<em class="sig-param">
<span class="n">
<span class="pre">
self
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
omni.ext._extensions.ExtensionStateChangeType
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
value
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
int
</span>
</span>
</em>
<span class="sig-paren">
)
</span>
<span class="sig-return">
<span class="sig-return-icon">
→
</span>
<span class="sig-return-typehint">
<span class="pre">
None
</span>
</span>
</span>
</dt>
<dd>
</dd>
</dl>
<dl class="py property">
<dt class="sig sig-object py" id="omni.ext.ExtensionStateChangeType.name">
<em class="property">
<span class="pre">
property
</span>
<span class="w">
</span>
</em>
<span class="sig-name descname">
<span class="pre">
name
</span>
</span>
</dt>
<dd>
</dd>
</dl>
</dd>
</dl>
</section>
</div>
</div>
<footer>
<hr/>
</footer>
</div>
</div>
</section>
</div> |
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 | |
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.
``` |
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 |
omni.ext.get_extensions_interface.md | # get_extensions_interface
## get_extensions_interface
```python
omni.ext.get_extensions_interface()
```
Returns cached `omni.ext.IExtensions` interface. |
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 |
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()`. |
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 |
omni.ext.IExt.md | # IExt
## IExt
```
class omni.ext.IExt
```
Bases:
```
ICppExt
```
### Methods
```
__init__ (self)
```
```
__init__ (self: omni.ext._extensions.IExt) -> None
``` |
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. |
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)`
这是一个段落,包含一个链接和一张图片。
```
这是一段代码。
``` |
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)
```
``` |
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
```
``` |
omni.ext.is_link.md | # is_link
## is_link |
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 | |
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
``` |
omni.ext.release_ext_interface.md | # release_ext_interface
## release_ext_interface
```python
def release_ext_interface(arg0: omni.ext._extensions.ICppExt) -> None:
pass
```
--- |
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. |
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. |
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. |
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>
<p>
A command for moving a single prim from one path to another within the Fabric stage.
</p>
<p>
MoveFabricPrimsCommand
</p>
<p>
A command for moving multiple prims within a Fabric stage.
</p>
<p>
ToggleVisibilitySelectedFabricPrimsCommand
</p>
<p>
Toggles the visibility of the selected Fabric prims.
</p>
<p>
TransformFabricPrimCommand
</p>
<p>
A command to transform a Fabric prim.
</p>
<p>
UngroupFabricPrimsCommand
</p>
<p>
A command to ungroup Fabric prims from their common parent group.
</p> |
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
</strong>
– bool
If True, the copied prim will be exclusively selected; otherwise, it won’t affect the selection.
</dt>
<dt>
<strong>
usd_context_name
</strong>
– str
The name of the USD context. Defaults to an empty string, which uses the default context.
</dt>
</dl>
### Methods
<table>
<tr>
<td>
<code>__init__(path_from[, path_to, ...])</code>
</td>
<td>
Creates a CopyFabricPrimCommand to copy a Fabric prim to a new location.
</td>
</tr>
<tr>
<td>
<code>do()</code>
</td>
<td>
Executes the command to copy a Fabric prim to a new location.
</td>
</tr>
<tr>
<td>
<code>undo()</code>
</td>
<td>
Undoes the copy a Fabric prim to a new location, effectively deleting it from the stage.
</td>
</tr>
</table>
<dl>
<dt>
<code>__init__(path_from: str, path_to: Optional[str] = None, exclusive_select: bool = True, usd_context_name: str = '')</code>
</dt>
<dd>
Creates a CopyFabricPrimCommand to copy a Fabric prim to a new location.
</dd>
</dl>
<dl>
<dt>
<code>do()</code>
</dt>
<dd>
Executes the command to copy a Fabric prim to a new location.
</dd>
</dl>
<dl>
<dt>
<code>undo()</code>
</dt>
<dd>
Undoes the copy a Fabric prim to a new location, effectively deleting it from the stage.
</dd>
</dl> |
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. |
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. |
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>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
,
</span>
</span>
<span class="w">
</span>
<span class="pre">
Any
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
{}
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
create_default_xform
</span>
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="default_value">
<span class="pre">
True
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
stage
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
Stage
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
context_name
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>
)
</dt>
<dd>
<p>
Initializes a command to create a Fabric prim with a default transform.
</p>
</dd> |
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. |
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. |
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. |
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. |
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. | |
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>
</span>
<span class="sig-paren">
(
</span>
<em class="sig-param">
<span class="n">
<span class="pre">
time_code
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
TimeCode
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
Usd.TimeCode.Default()
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
keep_world_transform
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
bool
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
True
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
on_move_fn
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
Callable
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
stage_or_context
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
Union
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
,
</span>
</span>
<span class="w">
</span>
<span class="pre">
Stage
</span>
<span class="p">
<span class="pre">
,
</span>
</span>
<span class="w">
</span>
<span class="pre">
UsdContext
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>
<span class="sig-paren">
)
</span>
</dt>
<dd>
<p>
Creates a command to move a Fabric prim from one path to another.
</p>
</dd>
</dl>
<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>
</span>
<span class="sig-paren">
(
</span>
<span class="sig-paren">
)
</span>
</dt>
<dd>
<p>
Executes the command to move the specified Fabric prim to the new location.
</p>
</dd>
</dl>
<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>
</span>
<span class="sig-paren">
(
</span>
<span class="sig-paren">
)
</span>
</dt>
<dd>
<p>
Undoes the move of the specified Fabric prims, restoring them to the previous location
</p>
</dd>
</dl> |
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. |
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. | |
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. |
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. |
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. |
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>,
<em class="sig-param">
<span class="n">
<span class="pre">
attributes
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Dict
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
,
</span>
</span>
<span class="w">
</span>
<span class="pre">
Any
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
{}
</span>
</span>
</em>,
<em class="sig-param">
<span class="n">
<span class="pre">
create_default_xform
</span>
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="default_value">
<span class="pre">
True
</span>
</span>
</em>,
<em class="sig-param">
<span class="n">
<span class="pre">
stage
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
Stage
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>,
<em class="sig-param">
<span class="n">
<span class="pre">
context_name
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>
<span class="sig-paren">
)
</span>
</dt>
<dd>
<p>
Initializes a command to create a Fabric prim with a default transform.
</p>
</dd>
</dl>
</dd>
</dl>
</section>
</div>
</div>
<footer>
<hr/>
</footer>
</div>
</div>
</section>
</div> |
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>
</span>
<span class="sig-paren">
(
</span>
<em class="sig-param">
<span class="n">
<span class="pre">
self
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
CreateFabricPrimWithDefaultXformCommand
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
prim_name
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
str
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
prim_path
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
select_new_prim
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
bool
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
True
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
attributes
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Dict
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
,
</span>
</span>
<span class="w">
</span>
<span class="pre">
Any
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
{}
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
create_default_xform
</span>
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="default_value">
<span class="pre">
True
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
stage
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
Stage
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>
,
<em class="sig-param">
<span class="n">
<span class="pre">
context_name
</span>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
Optional
</span>
<span class="p">
<span class="pre">
[
</span>
</span>
<span class="pre">
str
</span>
<span class="p">
<span class="pre">
]
</span>
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
None
</span>
</span>
</em>
<span class="sig-paren">
)
</span>
</dt>
<dd>
<p>
A command to create a Fabric prim with a default transform.
</p>
</dd>
</dl>
<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>
</span>
<span class="sig-paren">
(
</span>
<span class="sig-paren">
)
</span>
</dt>
<dd>
<p>
Executes the command to create a new Fabric prim with default transform.
</p>
<p>
If the prim already exists at the specified path, the command will fail and log an error.
</p>
</dd>
</dl>
<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>
</span>
<span class="sig-paren">
(
</span>
<span class="sig-paren">
)
</span>
</dt>
<dd>
<p>
Undoes the creation of the new Fabric prim, effectively deleting it from the stage.
</p>
</dd>
</dl> |
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. | |
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. |
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. | |
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 |
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. |
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. | |
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. |
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>
</span>
<span class="p">
<span class="pre">
:
</span>
</span>
<span class="w">
</span>
<span class="n">
<span class="pre">
str
</span>
</span>
<span class="w">
</span>
<span class="o">
<span class="pre">
=
</span>
</span>
<span class="w">
</span>
<span class="default_value">
<span class="pre">
''
</span>
</span>
</em>
<span class="sig-paren">
)
</span>
</dt>
<dd>
<p>
Creates a TransformFabricPrimCommand to perform transformations on a Fabric prim.
</p>
<dl class="field-list simple">
<dt class="field-odd">
Parameters
</dt>
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
path
</strong>
(
<em>
str
</em>
) – The path to the Fabric prim to transform.
</p>
</li>
<li>
<p>
<strong>
new_transform_matrix
</strong>
(
<em>
usdrt.Gf.Matrix4d
</em>
) – A 4x4 transformation matrix specifying the new transformation.
</p>
</li>
<li>
<p>
<strong>
old_transform_matrix
</strong>
(
<em>
usdrt.Gf.Matrix4d
</em>
<em>
,
</em>
<em>
optional
</em>
) – The original transformation matrix before the transformation.
</p>
</li>
</ul>
</dd>
</dl>
</dd>
</dl>
<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>
</span>
<span class="sig-paren">
(
</span>
<span class="sig-paren">
)
</span>
</dt>
<dd>
<p>
Executes the command to transform a Fabric prim.
</p>
</dd>
</dl>
<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>
</span>
<span class="sig-paren">
(
</span>
<span class="sig-paren">
)
</span>
</dt>
<dd>
<p>
Undoes the transformation of the Fabric prim, effectively reset the prim to the old transformation
</p>
</dd>
</dl>
</dd>
</dl>
</section>
</div>
</div>
<footer>
<hr/>
</footer>
</div>
</div>
</section>
</div> |
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. |
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. | |
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
</span>
</a>
</p>
</td>
<td>
<p>
Checks if any ancestor prims of the given prim at the provided path are of the specified prim type.
</p>
</td>
</tr>
<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
</span>
</a>
</p>
</td>
<td>
<p>
Removes descendant paths from a sorted list of Fabric paths, effectively deduplicating the list by retaining only the highest ancestor paths.
</p>
</td>
</tr>
</tbody>
</table>
</section>
</div>
</div>
<footer>
<hr/>
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script> |
omni.fabric.commands.Submodules.md | # omni.fabric.commands Submodules
## Submodules Summary
- **omni.fabric.commands.scripts**
- No submodule docstring provided |
Subsets and Splits