file_path
stringlengths
5
148
content
stringlengths
150
498k
size
int64
150
498k
omni.kit.xr.openxr.meta.passthrough.tests.md
# omni.kit.xr.openxr.meta.passthrough.tests ## Module Overview ### Breadcrumbs - [Home](https://docs.omniverse.nvidia.com/kit/docs) - [API (python)](API.html) - [Modules](Modules.html) - omni.kit.xr.openxr.meta.passthrough.tests ### Module Details **omni.kit.xr.openxr.meta.passthrough.tests** This module contains tests for the `omni.kit.xr.openxr.meta.passthrough` package. --- **Footer** ---
402
omni.mdl.neuraylib.acquire_interface.md
# acquire_interface ## acquire_interface ```python omni.mdl.neuraylib.acquire_interface(plugin_name: str = None, library_path: str = None) -> omni.mdl.neuraylib._neuraylib.NeurayLib ``` - **plugin_name**: str, optional - **library_path**: str, optional Returns: - omni.mdl.neuraylib._neuraylib.NeurayLib ```
310
omni.mdl.neuraylib.Classes.md
# omni.mdl.neuraylib Classes ## Classes Summary - **MdlEntity** - Maps between USD shade nodes and the MDL representation of a shade node. - **MdlEntitySnapshot** - MDL representation of a shade node along with the currently set parameters. - **MdlModule** - The representation of an MDL module to load or loaded by neuray. - **NeurayLib** - Access to the MDL Material back-end in Omniverse.
401
omni.mdl.neuraylib.Functions.md
# omni.mdl.neuraylib Functions ## Functions Summary: | Function Name | Description | |---------------|-------------| | EnsureRunning | Make sure that neuray is running and MDL resolution through USD is possible. | | RegisterExtensionSearchPath | Register a folder of your extension data in an default MDL search Path. | | UnregisterExtensionSearchPath | Removes your extension data from the default MDL search path. | | lru_cache | Least-recently-used cache decorator. | | acquire_interface | acquire_interface(plugin_name: str = None, library_path: str = None) -> omni.mdl.neuraylib._neuraylib.NeurayLib | | release_interface | release_interface(arg0: omni.mdl.neuraylib._neuraylib.NeurayLib) -> None |
705
omni.mdl.neuraylib.md
# omni.mdl.neuraylib ## Classes Summary - **MdlEntity** - Maps between USD shade nodes and the MDL representation of a shade node. - **MdlEntitySnapshot** - MDL representation of a shade node along with the currently set parameters. - **MdlModule** - The representation of an MDL module to load or loaded by neuray. - **NeurayLib** - Access to the MDL Material back-end in Omniverse. ## Functions Summary - **EnsureRunning** - Make sure that neuray is running and MDL resolution through USD is possible. - **RegisterExtensionSearchPath** - Register a folder of your extension data in an default MDL search Path. - **UnregisterExtensionSearchPath** - Removes your extension data from the default MDL search path. - **lru_cache** - Least-recently-used cache decorator. - **acquire_interface** - acquire_interface(plugin_name: str = None, library_path: str = None) -> omni.mdl.neuraylib._neuraylib.NeurayLib - **release_interface** - release_interface(arg0: omni.mdl.neuraylib._neuraylib.NeurayLib) -> None --- ---
1,034
omni.mdl.neuraylib.MdlEntity.md
# MdlEntity ## Methods - `__init__(*args, **kwargs)` - `getMdlModule(self)` - Handle to the module that contains the entities definition. - `valid(self)` - Get the state of entity. ## Attributes - `dbScopeName` - Name of the neuray database scope of the ISceneRenderer in which this entity is stored in. - `simpleNameWithSignature` - Name of the material or function within its module along with its parameter list attached. - `uniquePrimPath` - Unique identifier of the entity in the scene. | USD Prim Path | Description | |---------------|-------------| | uniquePrimPath | The USD Prim Path that identifies this entity in the scene. | ### __init__(*args, **kwargs) ### getMdlModule(self: omni.mdl.neuraylib._neuraylib.MdlEntity) -> omni.mdl.neuraylib._neuraylib.MdlModule Handle to the module that contains the entities definition. This can change during the lifetime of the object. Since this is module is not ‘created’ here, don’t call `destroy` on it. ### valid(self: omni.mdl.neuraylib._neuraylib.MdlEntity) -> bool Get the state of entity. It is valid if a module a simple name is assigned. ### property dbScopeName Name of the neuray database scope of the ISceneRenderer in which this entity is stored in. This can NOT change during the lifetime of the object. ### property simpleNameWithSignature Name of the material or function within its module along with its parameter list attached. This can change during the lifetime of the object. ### property uniquePrimPath The USD Prim Path that identifies this entity in the scene. This can NOT change during the lifetime of the object.
1,600
omni.mdl.neuraylib.MdlEntitySnapshot.md
# MdlEntitySnapshot ## Class Overview Bases: `pybind11_object` MDL representation of a shade node along with the currently set parameters. Parameters can be inspected while changes are reflected from USD (in rtx.hydra.plugin). This snapshot is passed to the ISceneRenderer for creating and updating the renderer material. Created from an MdlEntity at a certain point in time. When the MdlEntity did not change in the meantime, the same MdlEntitySnapshot can be accessed using the create function. When the MdlEntity changed (different module or function name), a new snapshot can be created while the old one still exists but might not be valid anymore (in case of reloads). ### Methods - `__init__(*args, **kwargs)` - `getMdlModule(self)` - Handle to the module that contains the entities definition. ### Attributes - `dbName` - Name of a MDL material instance or functions call in the neuray database. - `dbScopeName` - Name of the neuray database scope (of the ISceneRenderer) in which this entity is stored in. - `simpleNameWithSignature` - (Text missing, please provide the description) | Name of the material or function within its module along with its parameter list attached. | |------------------------------------------------------------------------------------------------| ## __init__ ```python __init__( *args, **kwargs ) ``` ## getMdlModule ```python getMdlModule( self: omni.mdl.neuraylib._neuraylib.MdlEntitySnapshot ) -> omni.mdl.neuraylib._neuraylib.MdlModule ``` Handle to the module that contains the entities definition. Since this module is not ‘created’ here, don’t call `destroy` on it. ## dbName ``` property dbName ``` Name of a MDL material instance or functions call in the neuray database. ## dbScopeName ``` property dbScopeName ``` Name of the neuray database scope (of the ISceneRenderer) in which this entity is stored in. ## simpleNameWithSignature ``` property simpleNameWithSignature ``` Name of the material or function within its module along with its parameter list attached.
2,037
omni.mdl.neuraylib.MdlModule.md
# MdlModule ## Class omni.mdl.neuraylib.MdlModule The representation of an MDL module to load or loaded by neuray. ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | | | `valid(self)` | Get the state of module, describes if loaded and if valid or not | ### Attributes | Attribute | Description | |-----------|-------------| | `dbName` | The name of the MDL module in the neuray database. | | `dbScopeName` | The name of the DB scope to load the definitions to. | | `qualifiedName` | The fully qualified MDL name of the module | ### omni.mdl.neuraylib.MdlModule.__init__ ``` **args**, **kwargs** ``` ### omni.mdl.neuraylib.MdlModule.valid ``` valid(self: omni.mdl.neuraylib._neuraylib.MdlModule) -> bool ``` Get the state of module, describes if loaded and if valid or not ### omni.mdl.neuraylib.MdlModule.dbName ``` property dbName ``` The name of the MDL module in the neuray database. ### omni.mdl.neuraylib.MdlModule.dbScopeName ``` property dbScopeName ``` The name of the DB scope to load the definitions to. ### omni.mdl.neuraylib.MdlModule.qualifiedName ``` property qualifiedName ``` The fully qualified MDL name of the module ```
1,191
omni.mdl.neuraylib.NeurayLib.md
# NeurayLib Access to the MDL Material back-end in Omniverse. ## Methods - **ResolveTiledResourceUri(self, arg0)** - Collect the matching file URIs for a given resolved URI that contains a mask. - **__init__(*args, **kwargs)** - (No description provided) - **createEditingTransaction(self[, dbScopeName])** - Creates a write access transaction for a given database scope with short term usage in mind. - **createMdlEntity(self, uniquePrimPath[, ...])** - Creates an MdlEnity for a selected scope. - **createMdlEntitySnapshot(self, arg0)** - Creates an MDL material instance or function call in the neuray DB scope provided. - **createMdlModule(self, usdIdentifier[, ...])** - Loads an MDL module and stores the loaded definitions in the neuray DB scope provided. | Method Name | Description | | --- | --- | | `createMdlModuleFromDbName(self, usdIdentifier)` | Get a loaded module and increase its ref count. | | `createReadingTransaction(self[, dbScopeName])` | Creates a read-only transaction for a given database scope with short term usage in mind. | | `destroyMdlEntity(self, arg0)` | Releases a previously created entity. | | `destroyMdlEntitySnapshot(self, arg0)` | Releases a previously created entity snapshot. | | `destroyMdlModule(self, arg0)` | Releases a previously loaded module. | | `getCurrentDefaultScope(self)` | Returns the current default database scope name depending on the active renderer. | | `getNeurayAPI(self)` | Returns a handle to the neuray API. | ### __init__(self, *args, **kwargs) ### ResolveTiledResourceUri(self, arg0: str) -> List[str] Collect the matching file URIs for a given resolved URI that contains a mask. **Parameters** - **resolvedFileNameMask** – A resolved URI that contains the a tiling marker like ``<UDIM>`` ### createEditingTransaction(self) Creates a transaction for editing a database scope. ### createEditingTransaction Creates a write access transaction for a given database scope with short term usage in mind. This transaction should be used for write access e.g. for editing a material instance code. Use the transaction on a per task level and from one thread only. When done, call `commit` in case you made changes or `abort` in case you only read information. However, keep in mind that the this new transaction can only see DB state that was already committed. The function returns a handle that has to be attached to the MDL SDK API using `omni.mdl.pymdlsdk.attach_itransaction`. #### Parameters - **dbScopeName** (optional) – Name of the DB scope to edit. #### Returns The created transaction or `None` if the creation failed, e.g. because of an invalid scope. ### createMdlEntity Creates an MdlEnity for a selected scope. It maps an MDL representation to a particular USD shade graph node. If there already is an MdlEntity the same object is returned again with an increased reference count. This allows multiple components to access the same data based on the USD Prim Path. #### Parameters - **uniquePrimPath** – USD path of the shade node this entity will belong to. Allows to identify the node from different kit components. - **scopeName** (optional) – Name of the DB scope to later store snapshots in (default: ‘usdIdentifier’). #### Returns The handle that represents the shade USD graph node. Needs to be released using `destroyMdlEntity` when not required anymore. ### createMdlEntitySnapshot Creates an MDL material instance or function call in the neuray DB scope provided. This snapshot is used for editing and creating material representations specific to the renderer. If there already is a valid snapshot for this MdlEntity and if the selected function name did not change, the same snapshot is returned again with an increased reference count. #### Parameters - **arg0** – The MdlEntity for which the snapshot is to be created. #### Returns The MdlEntitySnapshot representing the snapshot of the MdlEntity. ### Parameters **mdlEntity** – An MdlEntityId with a valid function name set (currently only from C++). ### Returns A snapshot that represents a MDL material instance or function call present in the neuray database. Needs to be released using `destroyMdlEntity` when not required anymore. ### createMdlModule ```python createMdlModule(self: omni.mdl.neuraylib._neuraylib.NeurayLib, usdIdentifier: str, dbScopeName: str = '') -> omni.mdl.neuraylib._neuraylib.MdlModule ``` Loads an MDL module and stores the loaded definitions in the neuray DB scope provided. #### Parameters - **usdIdentifier** – The USD asset identifier of the module to load. - **scopeName** (optional) – Name of the DB scope to load the definitions to (default: ‘usdIdentifier’). #### Returns The handle that contains the database name of the created module. Needs to be released using `destroyMdlModule` when not required anymore. ### createMdlModuleFromDbName ```python createMdlModuleFromDbName(self: omni.mdl.neuraylib._neuraylib.NeurayLib, usdIdentifier: str, dbScopeName: str = '') -> omni.mdl.neuraylib._neuraylib.MdlModule ``` Get a loaded module and increase its ref count. #### Parameters - **scopeName** (optional) – Name of the DB scope to load the definitions to (default: ‘usdIdentifier’). - **moduleDbName** – The DB name of the module. #### Returns The handle that contains the database name of the created module. Needs to be released using `destroyMdlModule` when not required anymore. ### createReadingTransaction ```python createReadingTransaction(self: omni.mdl.neuraylib._neuraylib.NeurayLib) ### omni.mdl.neuraylib.NeurayLib.createReadingTransaction Creates a read-only transaction for a given database scope with short term usage in mind. This transaction can only be used for read access e.g. for generating shader code. Use the transaction on a per task level and from one thread only. This transaction can not be committed as it is not allowed to make changes to the database. However, keep in mind that the this new transaction can only see DB state that was already committed. The function returns a handle hat has to be attached to the MDL SDK API using `omni.mdl.pymdlsdk.attach_itransaction`. #### Parameters - **dbScopeName** (optional) – Name of the DB scope to read from. #### Returns The created transaction handle or `None` if the creation failed, e.g. because of an invalid scope. ### omni.mdl.neuraylib.NeurayLib.destroyMdlEntity Releases a previously created entity. #### Parameters - **mdlEntity** – An MdlEntity that was created using `createMdlEntity`. ### omni.mdl.neuraylib.NeurayLib.destroyMdlEntitySnapshot Releases a previously created entity snapshot. #### Parameters - **mdlEntitySnapshot** – An MdlEntitySnapshot that was created using `createMdlEntitySnapshot`. ### omni.mdl.neuraylib.NeurayLib.destroyMdlModule ## omni.mdl.neuraylib.NeurayLib.destroyMdlModule Releases a previously loaded module. ### Parameters - **mdlModule** – A module that was created using `createMdlModule`. ## omni.mdl.neuraylib.NeurayLib.getCurrentDefaultScope Returns the current default database scope name depending on the active renderer. If there is no active scene renderer with a corresponding, properly initialized scope, the 'default_scope' with default settings is returned. ## omni.mdl.neuraylib.NeurayLib.getNeurayAPI Returns a handle to the neuray API. This handle has to be attached to the MDL SDK Python binding using `omni.mdl.pymdlsdk.attach_ineuray`.
7,410
omni.mdl.neuraylib.RegisterExtensionSearchPath.md
# RegisterExtensionSearchPath ## RegisterExtensionSearchPath ```python omni.mdl.neuraylib.RegisterExtensionSearchPath(extensionName: str, contentPath: str) -> str ``` Register a folder of your extension data in an default MDL search Path. The module can then be found in the MDL package `::omniverse_exts::<extensionName>` for imports from other MDL files. When referencing in a USD Shader Node it looks like: ```python uniform token info:implementationSource = "sourceAsset" uniform asset info:mdl:sourceAsset = @omniverse_exts/<extensionName>/MyMaterials.mdl@ ``` ### Parameters - **extensionName** – The name of your extension, e.g., `omni.foo.bar`. - **contentPath** – The absolute path of the content you want to register. ### Returns The absolute path of the registered path which is either a symlink, a copy, or empty in case of failure.
851
omni.mdl.neuraylib.release_interface.md
# release_interface ## release_interface ```python omni.mdl.neuraylib.release_interface(arg0: omni.mdl.neuraylib._neuraylib.NeurayLib) -> None ``` - **Parameters**: - `arg0`: `omni.mdl.neuraylib._neuraylib.NeurayLib` - **Returns**: - `None` ```
251
omni.mdl.neuraylib.UnregisterExtensionSearchPath.md
# UnregisterExtensionSearchPath ## UnregisterExtensionSearchPath ```python omni.mdl.neuraylib.UnregisterExtensionSearchPath(extensionName: str) -> bool ``` Removes your extension data from the default MDL search path. Resolving modules in the extensions data folder will fail. However, if MDL modules are currently loaded they will be available till the next start of kit. ### Parameters - **extensionName** – The name of your extension, e.g., `omni.foo.bar`. ### Returns - True if removing the symlink or deleting the registered content was successful.
558
omni.nvcf.core.api_call.md
# api_call ## api_call ## API Call ### `omni.nvcf.core.api_call(client_id: str, ssa_secret: str, function_id: str, function_version_id: str, params: Dict[str, Any], asset_names: List[str], ssa_url: str = util.SSA_URL.STG, nvcf_url: str = util.NVCF_URL.STG) -> Any` Single call to run an NVCF function end-to-end. NOTE: Images will be uploaded and sent as base64 encoded numpy archives. The NVCF function must handle this as input. #### Parameters - **client_id** (str) – SSA client id. - **ssa_secret** (str) – SSA secret for the SSA client. - **function_id** (str) – ID of the NVCF function. - **function_version_id** (str) – Version ID of the NVCF function. - **params** (Dict[str, Any]) – Dictionary of input parameters to the NVCF call. - **asset_names** (List[str]) – List of image assets as keys into `params`. - **ssa_url** (str, optional) – URL for SSA authentication. Defaults to util.SSA_URL.STG. - **nvcf_url** (str, optional) – URL for NVCF calls. Defaults to util.NVCF_URL.STG. #### Returns - Unzipped payload output from the NVCF call. #### Return type - Any
1,077
omni.nvcf.core.api_call_async.md
# api_call_async ## api_call_async ``` async``` omni.nvcf.core.api_call_async(client_id: str, ssa_secret: str, function_id: str, function_version_id: str, params: Dict[str, Any], asset_names: List[str], ssa_url: str = SSA_URL.STG, nvcf_url: str = NVCF_URL.STG) ``` This function performs an asynchronous API call with the specified parameters. ## API Call Async Single call to run an NVCF function end-to-end. NOTE: Images will be uploaded and sent as base64 encoded numpy archives. The NVCF function must handle this as input. ### Parameters - **client_id** (str) – SSA client id. - **ssa_secret** (str) – SSA secret for the SSA client. - **function_id** (str) – ID of the NVCF function. - **function_version_id** (str) – Version ID of the NVCF function. - **params** (Dict[str, Any]) – Dictionary of input parameters to the NVCF call. - **asset_names** (List[str]) – List of image assets as keys into `params`. - **ssa_url** (str, optional) – URL for SSA authentication. Defaults to util.SSA_URL.STG. - **nvcf_url** (str, optional) – URL for NVCF calls. Defaults to util.NVCF_URL.STG. ### Returns Unzipped payload output from the NVCF call. ### Return type Any
1,168
omni.nvcf.core.Classes.md
# omni.nvcf.core Classes ## Classes Summary: | Class | Description | |-------|-------------| | NVCF_URL | An enumeration. | | SSA_URL | URL for starfleet service authentication. |
181
omni.nvcf.core.compress_image_dict.md
# compress_image_dict ## compress_image_dict ```python omni.nvcf.core.compress_image_dict(images: Dict[str, numpy.ndarray]) -> bytes ``` Compress and base 64 encode a dictionary of images to reduce upload data payload. ### Parameters - **images** (Dict[str, np.ndarray]) – Dictionary of numpy arrays or PIL Images. ### Returns - Compressed and base 64 encoded data. ### Return type - bytes ```
398
omni.nvcf.core.compress_image_list.md
# compress_image_list ## compress_image_list ```python omni.nvcf.core.compress_image_list(images: List[numpy.ndarray]) -> bytes ``` Compress and base 64 encode a list of images to reduce upload data payload. ### Parameters - **images** (List[np.ndarray]) – List of numpy arrays or PIL Images. ### Returns - Compressed and base 64 encoded data. ### Return type - bytes ```
376
omni.nvcf.core.create_asset.md
# create_asset ## create_asset ```markdown Create an NVCF asset named `asset_name` of the desired content type. ``` ### Parameters - **session** (urllib3.PoolManager) – Client session. - **token** (str) – JWT authorization token. - **asset_name** (str) – Name to give the asset. - **content_type** (str) – MIME type of content stored in the asset. (ex: “image/jpeg”) - **nvcf_url** (str, optional) – Default is `NVCF_URL.STG`. ``` ## API Documentation ### create_asset #### Description Creates a new asset in the system. #### Parameters - **url** (str) – URL for NVCF calls. Defaults to util.NVCF_URL.STG. #### Returns Result from POST call to create the asset. #### Return type urllib3.HTTPResponse
707
omni.nvcf.core.create_asset_async.md
# create_asset_async ## create_asset_async ```python async omni.nvcf.core.create_asset_async(session: aiohttp.client.ClientSession, token: str, asset_name: str, content_type: str, nvcf_url: str = NVCF_URL.STG) -> aiohttp.client_reqrep.ClientResponse ``` Create an NVCF asset named `asset_name` of the desired content type. ### Parameters - **session** (aiohttp.ClientSession) – Client session. - **token** (str) – JWT authorization token. - **asset_name** (str) – Name to give the asset. - **content_type** (str) – MIME type of content stored in the asset. (ex: “image/jpeg”) - **nvcf_url** (str) – URL for NVCF service. Default is NVCF_URL.STG. ``` ## API Documentation ### create_asset **Parameters** - **url** *(str, optional)* – URL for NVCF calls. Defaults to util.NVCF_URL.STG. **Returns** - Result from POST call to create the asset. **Return type** - aiohttp.ClientResponse
891
omni.nvcf.core.decode_payload.md
# decode_payload  ## decode_payload  ### decode_payload Decode and uncompress a base 64 encoded numpy npz archive. #### Parameters - **raw_data** (str) – Bytes of a base 64 encoded numpy npz archive. #### Returns - Contents of the payload. #### Return type - Any
266
omni.nvcf.core.format_request.md
# format_request ## format_request ```python omni.nvcf.core.format_request(params: Dict[str, Any], token: str, asset_names: List[str] = []) -> Tuple[Dict[str, Any], Dict[str, str]] ``` Format input parameters for an NVCF function to produce request body and and request headers. ### Parameters - **params** (`Dict[str, Any]`): - **token** (`str`): - **asset_names** (`List[str]`): (default is `[]`) ``` - **params** (Dict[str, Any]) – Dictionary of input parameters to the NVCF call. - **token** (str) – JWT token. - **asset_names** (List[str]) – List of image assets as keys into `params`. **Returns** Request body and headers dictionaries. **Return type** Tuple[dict[str, Any], dict[str, str]]
702
omni.nvcf.core.Functions.md
# omni.nvcf.core Functions ## Functions Summary: | Function Name | Description | |---------------|-------------| | api_call | Single call to run an NVCF function end-to-end. | | api_call_async | Single call to run an NVCF function end-to-end. | | compress_image_dict | Compress and base 64 encode a dictionary of images to reduce upload data payload. | | compress_image_list | Compress and base 64 encode a list of images to reduce upload data payload. | | create_asset | Create an NVCF asset named `asset_name` of the desired content type. | | create_asset_async | Create an NVCF asset named `asset_name` of the desired content type. | | decode_payload | Decode and uncompress a base 64 encoded numpy npz archive. | | format_request | Format input parameters for an NVCF function to produce request body and and request headers. | | get_token | Given an SSA client and secret, request and return a JWT authorization token allowing calls to invoke NVCF functions. | | get_token_async | Given an SSA client and secret, request and return a JWT authorization token allowing calls to invoke NVCF functions. | | numpy_to_pil | Convert a numpy array to a PIL Image. | poll_response ============= Poll a pending NVCF request (status 202) until it is no longer pending. prepare_image_asset =================== Helper to create and then upload asset data with an asset name. Provides the generated asset ID as output. prepare_image_asset_async ======================== Helper to create and then upload asset data with an asset name. Provides the generated asset ID as output. unpack_zip_response =================== Retrieve and unpack an API call response that provides a reference to output assets. unpack_zip_response_async ======================== Retrieve and unpack an API call response that provides a reference to output assets. upload_asset ============ Upload asset data of a content type to a named asset with associated URL. upload_asset_async ================== Upload asset data of a content type to a named asset with associated URL.
2,055
omni.nvcf.core.get_token_async.md
# get_token_async  ## get_token_async  ```python async omni.nvcf.core.get_token_async(session: aiohttp.client.ClientSession, client_id: str, ssa_secret: str, ssa_url: str = SSA_URL.STG) -> str ``` Given an SSA client and secret, request and return a JWT authorization token allowing calls to invoke NVCF functions. ### Parameters - **session** (aiohttp.ClientSession) – Client session. - **client_id** (str) – SSA client id. - **ssa_secret** (str) – SSA secret for the SSA client. - **ssa_url** (str, optional) – URL for SSA authentication. Defaults to util.SSA_URL.STG. ### Returns - JWT token. ### Return type - str
622
omni.nvcf.core.numpy_to_pil.md
# numpy_to_pil ## numpy_to_pil ```python omni.nvcf.core.numpy_to_pil(arr: numpy.ndarray) ``` Convert a numpy array to a PIL Image. **Parameters** - **arr** (np.ndarray) – Numpy array of image data. **Returns** - PIL Image after conversion. **Return type** - Image ```
272
omni.nvcf.core.NVCF_URL.md
# NVCF_URL ## NVCF_URL ``` ```python class omni.nvcf.core.NVCF_URL(value): """ Bases: str, enum.Enum An enumeration. """ Attributes ---------- STG PROD def __init__(self): pass ``` - [Home](https://docs.omniverse.nvidia.com/kit/docs) » - [API (python)](../API.html) » - [Modules](../Modules.html) » - [omni.nvcf.core](../omni.nvcf.core.html) » - [omni.nvcf.core Classes](../omni.nvcf.core.Classes.html) » - NVCF_URL ```
469
omni.nvcf.core.poll_response.md
# poll_response ## poll_response ```python def poll_response(session: urllib3.poolmanager.PoolManager, response: urllib3.response.HTTPResponse, token: str, nvcf_url: str = NVCF_URL.STG, delay: float = 0.001, max_repeat: int = 10) -> urllib3.response.HTTPResponse: """ Poll a pending NVCF request (status 202) until it is no longer pending. Note that requests time out after 30 minutes automatically. Parameters: session (urllib3.PoolManager) – Client session. response (urllib3.HTTPResponse) – HTTP response object. token (str) – Token for the request. nvcf_url (str) – URL for the NVCF service. delay (float) – Delay between polling attempts. max_repeat (int) – Maximum number of polling attempts. Returns: urllib3.HTTPResponse: The final HTTP response object. """ ``` - **response** (`urllib3.HTTPResponse`) – NVCF request response. - **token** (`str`) – JWT token. - **nvcf_url** (`str`, optional) – URL for NVCF calls. Defaults to util.NVCF_URL.STG. - **delay** (`float`, optional) – Delay between repeat calls. Is gradually scaled to back off. Defaults to 0.001. - **max_repeat** (`int`, optional) – Maximum attempts before exiting. Defaults to 10. Returns: - Response from the request that is no longer pending. Return type: - `urllib3.HTTPResponse`
1,340
omni.nvcf.core.prepare_image_asset.md
# prepare_image_asset ## prepare_image_asset ```python omni.nvcf.core.prepare_image_asset(session: urllib3.poolmanager.PoolManager, token: str, asset_name: str, asset_data: str, nvcf_url: str = NVCF_URL.STG) -> str ``` Helper to create and then upload asset data with an asset name. Provides the generated asset ID as output. Assumes “application/octet-stream” data to upload encoded image bytes. ### Parameters - **session** (urllib3.PoolManager) – Client session. - **token** (str) – JWT authorization token. - **asset_name** (str) – Name given to the asset when created. - **asset_data** (Any) – Raw data to upload. - **nvcf_url** (str) – URL for the NVCF service. Default is `NVCF_URL.STG`. ``` ### Parameters - **url** ( - *optional* ) – URL for NVCF calls. Defaults to util.NVCF_URL.STG. ### Returns - ID of the created asset. ### Return type - str
867
omni.nvcf.core.prepare_image_asset_async.md
# prepare_image_asset_async ## prepare_image_asset_async ```python async omni.nvcf.core.prepare_image_asset_async(session: aiohttp.client.ClientSession, token: str, asset_name: str, asset_data: Any, nvcf_url: str = NVCF_URL.STG) -> str ``` Helper to create and then upload asset data with an asset name. Provides the generated asset ID as output. Assumes “application/octet-stream” data to upload encoded image bytes. ### Parameters - **session** (`aiohttp.ClientSession`) – Client session. - **token** (`str`) – JWT authorization token. - **asset_name** (`str`) – Name given to the asset when created. - **asset_data** (`Any`) – Raw data to upload. - **nvcf_url** (str, optional) – URL for NVCF calls. Defaults to util.NVCF_URL.STG. **Returns** ID of the created asset. **Return type** str
795
omni.nvcf.core.SSA_URL.md
# SSA_URL ## SSA_URL ``` class omni.nvcf.core.SSA_URL(value) ``` Bases: `str`, `enum.Enum` URL for starfleet service authentication. ### Attributes | Attribute | Description | |-----------|-------------| | `STG` | | | `PROD` | | ```python __init__() ``` ```
295
omni.nvcf.core.unpack_zip_response.md
# unpack_zip_response ## unpack_zip_response ```python omni.nvcf.core.unpack_zip_response(session: urllib3.poolmanager.PoolManager, response: urllib3.response.HTTPResponse) -> Any ``` Retrieve and unpack an API call response that provides a reference to output assets. NOTE: Assumes there is a single output provided in the zip file. **Parameters:** - **session** (urllib3.PoolManager) – Client session. - **response** (urllib3.HTTPResponse) – Zipped NVCF request response. **Returns:** - JSON loaded result from the response. **Return type:** - Any
554
omni.nvcf.core.unpack_zip_response_async.md
# unpack_zip_response_async ## unpack_zip_response_async ```python async omni.nvcf.core.unpack_zip_response_async(session: aiohttp.client.ClientSession, response: aiohttp.client_reqrep.ClientResponse) -> Any ``` Retrieve and unpack an API call response that provides a reference to output assets. NOTE: Assumes there is a single output provided in the zip file. ### Parameters - **session** (`aiohttp.ClientSession`) – Client session. - **response** (`aiohttp.ClientResponse`) – Zipped NVCF request response. ### Returns - JSON loaded result from the response. ### Return type - `Any`
589
omni.nvcf.core.upload_asset.md
# upload_asset ## upload_asset ```python omni.nvcf.core.upload_asset(session: urllib3.poolmanager.PoolManager, asset_url: str, asset_name: str, content_type: str, asset_data: Any) -> urllib3.response.HTTPResponse ``` Upload asset data of a content type to a named asset with associated URL. ### Parameters - **session** (urllib3.PoolManager) – Client session. - **asset_url** (str) – URL for the NVCF asset. Returned in response to asset creation. - **asset_name** (str) – Name given to the asset when created. - **content_type** (str) – MIME type of content stored in the asset. (ex: “image/jpeg”) - **asset_data** (Any) – Raw data to upload. ### Returns - Result from POST call to create the asset. ### Return type - urllib3.response.HTTPResponse ``` urllib3.HTTPResponse
778
omni.nvcf.core.upload_asset_async.md
# upload_asset_async ## upload_asset_async ```python async omni.nvcf.core.upload_asset_async(session: aiohttp.client.ClientSession, asset_url: str, asset_name: str, content_type: str, asset_data: Any) -> aiohttp.client_reqrep.ClientResponse ``` Upload asset data of a content type to a named asset with associated URL. ### Parameters - **session** (`aiohttp.ClientSession`) – Client session. - **asset_url** (`str`) – URL for the NVCF asset. Returned in response to asset creation. - **asset_name** (`str`) – Name given to the asset when created. - **content_type** (`str`) – MIME type of content stored in the asset. (ex: “image/jpeg”) - **asset_data** (`Any`) – Raw data to upload. ### Returns - `aiohttp.client_reqrep.ClientResponse` ``` ## Result from POST call to create the asset. ### Return type aiohttp.ClientResponse
831
omni.services.convert.cad.ConverterRegistry.md
# ConverterRegistry ## Methods - **converters()** - Returns a view of all the converters in the registry. - **get_converter_for_file(file_in)** - Get a converter for a given file. - **register_converter(filters, convert_fn, ...)** - Register a frame build function. - **unregister_converter(converter_id)** - (No description provided) <dl class="py method"> <dt class="sig sig-object py" id="omni.services.convert.cad.ConverterRegistry.get_converter_for_file"> <em class="property"> <span class="pre"> static <span class="w"> <span class="sig-name descname"> <span class="pre"> get_converter_for_file <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> file_in <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> str <span class="sig-paren"> ) <dd> <p> Get a converter for a given file. <dl class="py method"> <dt class="sig sig-object py" id="omni.services.convert.cad.ConverterRegistry.register_converter"> <em class="property"> <span class="pre"> static <span class="w"> <span class="sig-name descname"> <span class="pre"> register_converter <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> filters <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> List <span class="p"> <span class="pre"> [ <span class="pre"> str <span class="p"> <span class="pre"> ] , <em class="sig-param"> <span class="n"> <span class="pre"> convert_fn <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> Callable <span class="p"> <span class="pre"> [ <span class="p"> <span class="pre"> [ <span class="p"> <span class="pre"> ... <span class="p"> <span class="pre"> ] <span class="p"> <span class="pre"> , <span class="w"> <span class="pre"> str <span class="p"> <span class="pre"> ] , <em class="sig-param"> <span class="n"> <span class="pre"> options_cls <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> type <span class="sig-paren"> ) <dd> <p> Register a frame build function.
3,322
omni.services.convert.cad.md
# omni.services.convert.cad ## Submodules Summary - **omni.services.convert.cad.python_ext** - No submodule docstring provided - **omni.services.convert.cad.services** - No submodule docstring provided ## Classes Summary - **ConverterRegistry** - [Details](omni.services.convert.cad/omni.services.convert.cad.ConverterRegistry.html) - **ServiceConvertCADExtension** - [Details](omni.services.convert.cad/omni.services.convert.cad.ServiceConvertCADExtension.html)
476
omni.services.convert.cad.python_ext.ConverterRegistry.md
# ConverterRegistry ## Methods - **converters()** - Returns a view of all the converters in the registry. - **get_converter_for_file(file_in)** - Get a converter for a given file. - **register_converter(filters, convert_fn, ...)** - Register a frame build function. - **unregister_converter(converter_id)** - (No description provided) ## Converters Returns a view of all the converters in the registry. ## get_converter_for_file Get a converter for a given file. ## register_converter Register a frame build function.
532
omni.services.convert.cad.ServiceConvertCADExtension.md
# ServiceConvertCADExtension ## ServiceConvertCADExtension ``` class omni.services.convert.cad.ServiceConvertCADExtension ``` Bases: ``` omni.ext._extensions.IExt ``` ### Methods | Method | Description | |---------------|-------------| | `on_shutdown()` | | | `on_startup()` | | ``` def __init__(self: omni.ext._extensions.IExt) -> None ``` ```
381
omni.services.convert.cad.services.convert.Classes.md
# omni.services.convert.cad.services.convert Classes ## Classes Summary - **ConverterRegistry** - **ConverterResponseModel** - **ProgressFacility** - Progress monitoring facility. - **RegisteredConverter** - RegisteredConverter(id: int, filters: List[str], convert_fn: Callable[…, str], options_cls: type) - **RegistryResponseModel** - **RequestRunModel** - Request Model for CAD Converter task
402
omni.services.convert.cad.services.dgn_convert.Functions.md
# omni.services.convert.cad.services.dgn_convert Functions ## Functions Summary - **dgn_convert** - **Description**: Set up and call a new process to convert DGN files. - **Link**: [dgn_convert](omni.services.convert.cad.services.dgn_convert/omni.services.convert.cad.services.dgn_convert.dgn_convert.html)
312
omni.services.convert.cad.services.md
# omni.services.convert.cad.services ## Submodules Summary: | Submodule | Description | |-----------|-------------| | omni.services.convert.cad.services.convert | No submodule docstring provided | | omni.services.convert.cad.services.dgn_convert | No submodule docstring provided | | omni.services.convert.cad.services.progress_facility | Progress monitoring facility. | | omni.services.convert.cad.services.temp_json | No submodule docstring provided |
455
omni.services.convert.cad.services.progress_facility.Classes.md
# omni.services.convert.cad.services.progress_facility Classes ## Classes Summary - **ProgressFacility** - **Description:** Progress monitoring facility.
157
omni.services.convert.cad.services.progress_facility.Functions.md
# omni.services.convert.cad.services.progress_facility Functions ## Functions Summary - **run_coroutine** - Submit a coroutine object to the main event loop; return either a Task object
189
omni.services.convert.cad.services.progress_facility.md
# omni.services.convert.cad.services.progress_facility ## Classes Summary - **ProgressFacility** - Progress monitoring facility. ## Functions Summary - **run_coroutine** - Submit a coroutine object to the main event loop; return either a Task object
255
omni.services.convert.cad.services.Submodules.md
# omni.services.convert.cad.services Submodules ## Submodules Summary - **omni.services.convert.cad.services.convert** - No submodule docstring provided - **omni.services.convert.cad.services.dgn_convert** - No submodule docstring provided - **omni.services.convert.cad.services.progress_facility** - Progress monitoring facility. - **omni.services.convert.cad.services.temp_json** - No submodule docstring provided
428
omni.services.convert.cad.services.temp_json.Classes.md
# omni.services.convert.cad.services.temp_json Classes ## Classes Summary: | Class | Description | |-------|-------------| | [Path](omni.services.convert.cad.services.temp_json/omni.services.convert.cad.services.temp_json.Path.html) | PurePath subclass that can make system calls. |
284
omni.services.convert.cad.services.temp_json.md
# omni.services.convert.cad.services.temp_json ## Classes Summary: - **Path** - PurePath subclass that can make system calls. ## Functions Summary: - **create_generic_temp_json** - **create_temp_json**
205
omni.services.convert.cad.Submodules.md
# omni.services.convert.cad Submodules ## Submodules Summary | Module | Description | |--------|-------------| | [omni.services.convert.cad.python_ext](omni.services.convert.cad.python_ext.html) | No submodule docstring provided | | [omni.services.convert.cad.services](omni.services.convert.cad.services.html) | No submodule docstring provided |
348
omni.services.crash.md
# omni.services.crash ## Submodules Summary: - omni.services.crash.python_ext - No submodule docstring provided - omni.services.crash.services - No submodule docstring provided ## Classes Summary: - ServiceExtension
220
omni.services.crash.python_ext.md
# omni.services.crash.python_ext ## Classes Summary - [ServiceExtension](omni.services.crash.python_ext/omni.services.crash.python_ext.ServiceExtension.html)
159
omni.services.crash.python_ext.ServiceExtension.md
# ServiceExtension ## ServiceExtension ```python class omni.services.crash.python_ext.ServiceExtension ``` Bases: `omni.ext._extensions.IExt` ### Methods | Method | Description | |--------|-------------| | `on_shutdown()` | | | `on_startup(ext_id)` | | ```python def __init__(self: omni.ext._extensions.IExt) -> None: ``` ```
331
omni.services.crash.ServiceExtension.md
# ServiceExtension ## ServiceExtension ``` class omni.services.crash.ServiceExtension ``` Bases: ``` omni.ext._extensions.IExt ``` ### Methods | Method | Description | |--------------|-------------| | on_shutdown | | | on_startup(ext_id) | | ``` __init__(self: omni.ext._extensions.IExt) -> None ```
332
omni.services.crash.services.service.Classes.md
# omni.services.crash.services.service Classes ## Classes Summary: | Class Name | Description | |---------------------------------|-----------------------------------------------------------------------------| | BaseModel | | | HelloWorldRequestModel | Model of a request containing the data required to greet a User. | | HelloWorldResponseModel | Model of a response containing the formatted greeting message to the User. | | ServiceAPIRouter | Extended fastapi.APIRouter to support the storing and getting of facilities at runtime. |
763
omni.services.crash.services.service.Functions.md
# omni.services.crash.services.service Functions ## Functions Summary | Function | Description | |----------|-------------| | [greet](#greet) | An HTTP POST endpoint to return a greeting message including the formatted User name. | ### greet An HTTP POST endpoint to return a greeting message including the formatted User name.
330
omni.services.crash.services.service.md
# omni.services.crash.services.service ## Classes Summary - **BaseModel** - **HelloWorldRequestModel** - Model of a request containing the data required to greet a User. - **HelloWorldResponseModel** - Model of a response containing the formatted greeting message to the User. - **ServiceAPIRouter** - Extended fastapi.APIRouter to support the storing and getting of facilities at runtime. ## Functions Summary - **greet** - An HTTP POST endpoint to return a greeting message including the formatted User name.
522
omni.services.crash.Submodules.md
# omni.services.crash Submodules ## Submodules Summary | Submodule | Description | |-----------|-------------| | omni.services.crash.python_ext | No submodule docstring provided | | omni.services.crash.services | No submodule docstring provided |
248
omni.simai.python.md
# omni.simai.python ## Module Overview ### Navigation - [API (python)](API.html) - [Modules](Modules.html) ### Module Details #### omni.simai.python ##### Overview omni.simai.python
188
omni.simready.cadtools.convert_prim_to_payload.md
# convert_prim_to_payload ## convert_prim_to_payload ```python async omni.simready.cadtools.convert_prim_to_payload(stage: pxr.Usd.Stage, prim_path: pxr.Sdf.Path, payload_dir: Optional[str] = None, make_payload_simready: bool = False) -> bool ``` Converts a prim and all its descendants to a payload. The prim is saved to a layer (.usd), its parent payloads the new layer and the prim is deleted. The prim must have a parent, different than the root. The new layer is created in its own sub-folder of {payload_dir}. If {payload_dir} is not specified, the input file’s folder is used. If {make_payload_simready} is True, the prim is converted to a SimReady component. Note that SimReady components cannot contain other SimReady components. **Parameters:** - **stage** (Usd.Stage) – The stage to be worked on. Must be associated with a omni.usd.UsdContext. - **prim_path** (Sdf.Path) – The path of the prim to be converted. - **payload_dir** (Optional[str]) – The directory where the payload will be saved. If not specified, the input file’s folder is used. - **make_payload_simready** (bool) – If True, the prim is converted to a SimReady component. ``` ### Parameters - **Sdf.Path** – The prim path to replace with component. - **payload_dir** – (Optional[str]): The parent directory to save the prim to as a layer. If None, the input’s file folder is used. Defaults to None. - **make_payload_simready** (bool) – If True, the prim is converted to a SimReady component. ### Returns - True if the operation was successful, False otherwise. ### Return type - bool
1,566
omni.simready.cadtools.create_prototype_for_prims.md
# create_prototype_for_prims  ## create_prototype_for_prims  Create a “prototype” prim for the given prim in the given stage. It looks for a prim named “Prototypes” or “Components” and creates an XForm prim under it with the same name as the {prim_path}. It then adds an internal reference on the {prim_path} to the new prim. Note that it is the client’s responsibility to save the stage. ### Parameters - **stage** (`Usd.Stage`) – The stage to create the prototype prim in. - **prim_paths** (`List[Sdf.Path]`) – The prim paths to create the prototype prims for. ### Returns The path to the prototype prim, or empty list if none could not be created. ### Return type `List[Sdf.Path]`
688
omni.simready.cadtools.create_simready_assembly.md
# create_simready_assembly ## create_simready_assembly Creates a SimReady Assembly based on an input “CAD” assembly and a list of urls of SimReady Assets. It flattens the sublayers (only, i.e. not the references and payloads) in the input assembly file to the output location, then it replaces internal references from prims under the “Geometry” prim to the “Prototype” prims with references to SimReady Assets that have the same name as the internal references. It then applies any attributes of the meshes under “Geometry” as overs to the SimReady Assets. Finally it removes the prototypes and moves the prims from under the “Geometry” prim to the root prim so it can remove the “Geometry” prim. ### Parameters - **input_assembly_path** (str) – The path to the input “CAD” assembly file (.usd). - **output_assembly_path** (str) – The path to the output SimReady assembly file (.usd). - **simready_asset_urls** (List[str]) – The list of urls of SimReady Assets. ### Returns - True if the SimReady Assembly was created successfully, False otherwise. ### Return type - bool # 标题 这是一个段落,其中包含一些文本。这里没有链接或图片。 ## 子标题 这里是另一个段落。 --- 这里是页脚。
1,142
omni.simready.cadtools.create_simready_assembly_of_assemblies.md
# create_simready_assembly_of_assemblies ## create_simready_assembly_of_assemblies ```python async omni.simready.cadtools.create_simready_assembly_of_assemblies( input_assembly_path: str, output_assembly_path: str, simready_asset_urls: List[str], assemblies_urls: List[str] ) -> bool ``` Creates a SimReady Assembly of Assemblies based on an input “CAD” assembly and a list SimReady Asset files and assembly files. It collects the input assembly file to the output location, then it replaces internal references from prims under the “Geometry” prim to the “Prototype” prims with references to SimReady Asset files and assembly files that have the same name as the internal references. It also replaces the internal references of all assembly files to the assembly files that have the same name as the internal reference. Finally it removes the prototypes and moves the prims from under the “Geometry” prim to the root prim so it can remove the “Geometry” prim. ### Parameters - **input_assembly_path** (str) – The path to the input “CAD” assembly file (.usd). - **output_assembly_path** (str) – The path to the output SimReady assembly file (.usd). - **simready_asset_urls** (List[str]) – List of URLs to SimReady Asset files. - **assemblies_urls** (List[str]) – List of URLs to assembly files. ### Parameters - **simready_asset_urls** (List[str]) – The list of urls of SimReady Assets. - **assemblies_urls** (List[str]) – The list of urls of assemblies. ### Returns - True if the SimReady Assembly was created successfully, False otherwise. ### Return type - bool
1,585
omni.simready.cadtools.create_simready_asset.md
# create_simready_asset ## create_simready_asset ```python async omni.simready.cadtools.create_simready_asset(input_usd_path: str, output_usd_path: str, presentation_rig_path: Optional[str] = None, project_root_path: Optional[str] = None, mpu: float = -1.0, generate_thumbnail: bool = False) ``` - **input_usd_path**: str - **output_usd_path**: str - **presentation_rig_path**: Optional[str] = None - **project_root_path**: Optional[str] = None - **mpu**: float = -1.0 - **generate_thumbnail**: bool = False ``` This function is used to create a simulation-ready asset from a given USD path. ## omni.simready.cadtools.create_simready_asset Creates a SimReady Asset from the given input USD file, and saves it to the given output USD file. ### Parameters - **input_usd_path** (`str`) – The input usd path. This is the path to a “vanilla” USD file. - **output_usd_path** (`str`) – The output usd path. This is the path to the main or “interface” SimReady Asset file. - **presentation_rig_path** (`str`, optional) – The path to the presentation rig to apply to the SimReady Asset. - **project_root_path** (`str`) – The project root path. The output path is expected to be under the project root path. - **mpu** (`float`) – The desired meters per unit (scale) of the created SimReady Asset. Defaults to -1, which means the input asset’s mpu will be used. - **generate_thumbnail** (`bool`) – Whether to generate a thumbnail for the SimReady Asset. Defaults to False. Thumbnail generation is asynchronous. Thumbnail generation expect a camera at /PresentationRig/ThumbRig/primary in the stage. ### Returns - True if the SimReady Asset was created successfully, False otherwise. ### Return type - `bool`
1,703
omni.simready.cadtools.delete_dangling_internal_references.md
# delete_dangling_internal_references ## delete_dangling_internal_references ```python def delete_dangling_internal_references(stage: pxr.Usd.Stage) -> bool: ``` Cleans up dangling references to prims in the same stage. **Parameters:** - `stage`: The stage to clean up. - **Type:** `Usd.Stage` **Returns:** - `True` if the cleanup was successful, `False` otherwise. - **Type:** `bool` ```
395
omni.simready.cadtools.extension.Classes.md
# omni.simready.cadtools.extension Classes  ## Classes Summary: - [SimreadyCadToolsExtension](omni.simready.cadtools.extension/omni.simready.cadtools.extension.SimreadyCadToolsExtension.html)
194
omni.simready.cadtools.extension.SimreadyCadToolsExtension.md
# SimreadyCadToolsExtension ## SimreadyCadToolsExtension ```python class omni.simready.cadtools.extension.SimreadyCadToolsExtension ``` Bases: `omni.ext._extensions.IExt` ### Methods ```python def on_shutdown() ``` ```python def on_startup(ext_id) ``` ```python def __init__(self: omni.ext._extensions.IExt) -> None ``` ```
328
omni.simready.cadtools.extract_assemblies_to_layers.md
# extract_assemblies_to_layers  ## Functions ### extract_assemblies_to_layers ```python omni.simready.cadtools.extract_assemblies_to_layers( url: str, layers_output_dir: Optional[str] = None, layer_root_prim_path: pxr.Sdf.Path = Sdf.Path('/RootNode'), layer_up_axis: str = 'Z', layer_mpu: float = -1.0, layer_ext_usda: bool = False ) <span class="w"> <span class="default_value"> <span class="pre"> True , <em class="sig-param"> <span class="n"> <span class="pre"> presentation_rig_path <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> Optional <span class="p"> <span class="pre"> [ <span class="pre"> str <span class="p"> <span class="pre"> ] <span class="w"> <span class="o"> <span class="pre"> = <span class="w"> <span class="default_value"> <span class="pre"> None <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> List <span class="p"> <span class="pre"> [ <span class="pre"> str <span class="p"> <span class="pre"> ] <a class="headerlink" href="#omni.simready.cadtools.extract_assemblies_to_layers" title="Permalink to this definition">  <dd> <p> Extracts the assemblies of a given CAD assembly into their own layers. Assemblies can have nested assemblies. If finds the first level of assembly prims, extracts them to their layers, then calls itself recursively on the extracted assemblies, until no more new layers are created. <dl class="field-list simple"> <dt class="field-odd"> Parameters <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> url ( <em> str ) – The URL of the input USD file that contains the CAD assembly from which the assemblies will get extracted. <li> <p> <strong> layers_output_dir ( <em> str , <em> optional ) – The directory to create the new layers in. If None, it uses the directory of the input stage. Defaults to None. <li> <p> <strong> layer_root_prim_path ( <em> Sdf.Path , <em> optional ) – The root prim path to use for the new layers. Defaults to Sdf.Path(“/” + srtools.STANDARD_ROOT_PRIM_NAME). <li> <p> <strong> layer_up_axis ( <em> str , <em> optional ) – The up axis to use for the new layers. Defaults to UsdGeom.Tokens.z. <li> <p> <strong> layer_mpu ( <em> float ) – The meters per unit of layers to be created for the prototypes. Defaults to -1, which means the input asset’s mpu will be used. <li> <p> <strong> ext_usda ( <em> bool , <em> optional ) – If True, the extracted parts will be saved as .usda files. Otherwise, they will be saved as .usd files. Defaults to True. <li> <p> <strong> presentation_rig_path ( <em> str , <em> optional ) – The path to the presentation rig to apply to the extracted assemblies. Defaults to None. <dt class="field-even"> Returns <dd class="field-even"> <p> The list of URLs of the extracted parts, or an empty list if none were found. <dt class="field-odd"> Return type <dd class="field-odd"> <p> List[str] <footer> <hr/> ``` 请注意,上述Markdown数据直接复制了HTML内容,未进行任何转换。根据您的要求,需要将HTML转换为Markdown格式,并且删除URL链接和图片。以下是转换后的Markdown格式数据: ```markdown ### Parameters - **url** (str) – The URL of the input USD file that contains the CAD assembly from which the assemblies will get extracted. - **layers_output_dir** (str, optional) – The directory to create the new layers in. If None, it uses the directory of the input stage. Defaults to None. - **layer_root_prim_path** (Sdf.Path, optional) – The root prim path to use for the new layers. Defaults to Sdf.Path(“/” + srtools.STANDARD_ROOT_PRIM_NAME). - **layer_up_axis** (str, optional) – The up axis to use for the new layers. Defaults to UsdGeom.Tokens.z. - **layer_mpu** (float) – The meters per unit of layers to be created for the prototypes. Defaults to -1, which means the input asset’s mpu will be used. - **ext_usda** (bool, optional) – If True, the extracted parts will be saved as .usda files. Otherwise, they will be saved as .usd files. Defaults to True. - **presentation_rig_path** (str, optional) – The path to the presentation rig to apply to the extracted assemblies. Defaults to None. ### Returns - The list of URLs of the extracted parts, or an empty list if none were found. ### Return type - List[str]
4,424
omni.simready.cadtools.extract_asset_info_healthineers.Functions.md
# omni.simready.cadtools.extract_asset_info_healthineers Functions ## Functions Summary | Function | Description | |----------|-------------| | `generate_asset_db_for_sre_healthineers` | Generates an asset database for the SimReady Explorer. | | `get_user_friendly_name` | Returns the user-friendly name from the given asset name. | | `remove_non_alphanumeric_prefixes` | - |
377
omni.simready.cadtools.extract_asset_info_healthineers.generate_asset_db_for_sre_healthineers.md
# generate_asset_db_for_sre_healthineers  ## generate_asset_db_for_sre_healthineers  Generates an asset database for the SimReady Explorer. Simready Explorer expects the asset database to be a json file named asset_info.json containing a list of asset records. ### Parameters - **asset_root_path** (str) – The absolute path to the root of the asset folder where the Simready Assets are expected to live each in subfolders - **assembly_root_path** (str) – The absolute path to the root of the assembly folder where the Simready Assemblies are expected to live each in subfolders - **output_url** (str) – The url to the output location of the asset database json file. - **asset_file_filter_fn** (Callable[[str], bool]) – A function that takes a file path and returns True if the file should be included in the asset database. Defaults to filtering all the SimReady Asset “interface” files.
893
omni.simready.cadtools.extract_asset_info_healthineers.get_user_friendly_name.md
# get_user_friendly_name  ## Functions ### get_user_friendly_name ```python omni.simready.cadtools.extract_asset_info_healthineers.get_user_friendly_name(asset_name: str) -> str ``` Returns the user-friendly name from the given asset name. ```
244
omni.simready.cadtools.extract_asset_info_healthineers.remove_non_alphanumeric_prefixes.md
# remove_non_alphanumeric_prefixes ## remove_non_alphanumeric_prefixes ```python def remove_non_alphanumeric_prefixes(input_string: str, prefix_sep: str) -> str: pass ``` ---
180
omni.simready.cadtools.extract_components_to_layers.md
# extract_components_to_layers ## extract_components_to_layers ## Function: omni.simready.cadtools.extract_components_to_layers ### Description Extracts the parts of the USD stage at the given URL to their own layers. It looks for the child xforms under the “Prototypes” xform and copies them each to a new layer (USD file). The copy includes all child prims, materials, material bindings etc. ### Parameters - **url** (str) – The URL of the input USD file that contains the CAD assembly from which the parts will get extracted. - **layers_output_dir** (str, optional) – The directory to create the new layers in. If None, it uses the directory of the input stage. Defaults to None. - **layer_root_prim_path** (Sdf.Path, optional) – The root prim path to use for the new layers. Defaults to Sdf.Path(“/” + srtools.STANDARD_ROOT_PRIM_NAME). - **layer_up_axis** (str, optional) – The up axis to use for the new layers. Defaults to UsdGeom.Tokens.z. - **layer_mpu** (float) – The meters per unit of layers to be created for the prototypes. Defaults to -1, which means the input asset’s mpu will be used. - **ext_usda** (bool, optional) – If True, the extracted parts will be saved as .usda files. Otherwise, they will be saved as .usd files. Defaults to True. ### Returns The list of URLs of the extracted parts, or an empty list if none were found. ### Return type List[str]
1,377
omni.simready.cadtools.extract_prims_to_layers.md
# extract_prims_to_layers ## extract_prims_to_layers ``` This function is part of the `omni.simready.cadtools` module and is used to extract primitives to layers. The function signature is as follows: ```python omni.simready.cadtools.extract_prims_to_layers( stage: pxr.Usd.Stage, prim_paths: Dict[pxr.Sdf.Path, Optional[str]], layers_output_dir: Optional[str] = None, layer_root_prim_path: pxr.Sdf.Path = Sdf.Path('/RootNode'), layer_up_axis: str = 'Z' ) float = -1.0, clear_xforms = False, cleanup_dangling_references = True, delete_extracted_prims = True, layer_ext_usda = True) → List[str] Extracts the given prims into their own layers. The prim with all its descendants and materials it binds to is copied to its own layer. The new layers: - Are created in the folder specified by layers_output_dir, or in the same folder as the original stage pointed by url if layers_output_dir is None - Their file names are the names of the prim that was extracted to it, - Their root prim has the same name as the root prim of the original stage, - Their upAxis is the same as that of the original stage, - Their metersPerUnit is the same as that of the original stage, or the value provided as a parameter. Parameters: - **stage** (Usd.Stage) – The stage to extract the parts from. - **prim_paths** (Dict[Sdf.Path, Optional[str]]) – A dictionary of prim paths to be extracted to their own layers, and the file name of the extracted layers. If the filenames are None, the prim names are used as the filenames. - **layers_output_dir** (str, optional) – The directory to create the new layers in. If None, it uses the directory of the input stage. Defaults to None. - **layer_root_prim_path** (str, optional) – The path of the root prim of the new layers. If set to None, it uses the input stage’s root prim name. Defaults to STANDARD_ROOT_PRIM_NAME. - **layer_up_axis** (str, optional) – The up axis of the new layers. If set to None, it uses the input stage’s up axis. Defaults to UsdGeom.Tokens.z. - **layer_mpu** (float, optional) – The meters per unit of the new layers. If set to -1.0, it uses the input stage’s meters per unit. Defaults to -1.0. - **clear_xforms** (bool, optional) – (Note: Content truncated here) - **zero_xforms** (bool, optional) – If True, the xforms of the extracted prims will be zeroed. This is useful when the extracted prims are meant to be at the origin for ex. Defaults to False. - **cleanup_dangling_references** (bool, optional) – If True, the new layers will have dangling references to internal prims removed. Defaults to True. - **delete_extracted_prims** (bool, optional) – If True, the extracted prims will be deleted from the source layer. Defaults to True. - **layer_ext_usda** (bool, optional) – If True, the extracted parts will be saved as .usda files. Otherwise, they will be saved as .usd files. Defaults to True. **Returns** The list of URLs of the extracted parts, or an empty list if none were found. **Return type** List[str]
3,000
omni.simready.cadtools.Functions.md
# omni.simready.cadtools Functions ## Functions Summary: | Function | Description | |----------|-------------| | convert_prim_to_payload | Converts a prim and all its descendants to a payload. | | create_prototype_for_prims | Create a “prototype” prim for the given prim in the given stage. | | create_simready_assembly | Creates a SimReady Assembly based on an input “CAD” assembly and a list of urls of SimReady Assets. | | create_simready_assembly_of_assemblies | Creates a SimReady Assembly of Assemblies based on an input “CAD” assembly and a list SimReady Asset files and assembly files. | | create_simready_asset | Creates a SimReady Asset from the given input USD file, and saves it to the given output USD file. | | delete_dangling_internal_references | Cleans up dangling references to prims in the same stage. | | extract_assemblies_to_layers | Extracts the assemblies of a given CAD assembly into their own layers. | | extract_components_to_layers | Extracts the parts of the USD stage at the given URL to their own layers. | | extract_prims_to_layers | Extracts the given prims into their own layers. The prim with all its descendants and materials it binds to | | generate_asset_db_for_sre_healthineers | Generates an asset database for SRE Healthineers. | | Generates an asset database for the SimReady Explorer. | | --- | | get_user_friendly_name | | Returns the user-friendly name from the given asset name. | | remove_non_alphanumeric_prefixes |
1,465
omni.simready.cadtools.generate_asset_db_for_sre_healthineers.md
# generate_asset_db_for_sre_healthineers ## generate_asset_db_for_sre_healthineers ```python async omni.simready.cadtools.generate_asset_db_for_sre_healthineers( asset_root_path: str, assembly_root_path: str, output_url: str, asset_file_filter_fn: typing.Callable[[str], bool] = <function is_main_usd_file>, assembly_file_filter_fn: typing.Callable[[str], bool] = <function is_usd_file> ) ``` Generates an asset database for the SimReady Explorer. Simready Explorer expects the asset database to be a json file named asset_info.json containing a list of asset records. ### Parameters - **asset_root_path** (str) – The absolute path to the root of the asset folder where the Simready Assets are expected to live each in subfolders - **assembly_root_path** (str) – The absolute path to the root of the assembly folder where the Simready Assemblies are expected to live each in subfolders - **output_url** (str) – The url to the output location of the asset database json file. - **asset_file_filter_fn** (Callable[[str], bool]) – A function that takes a file path and returns True if the file should be included in the asset database. Defaults to filtering all the SimReady Asset “interface” files.
1,219
omni.simready.cadtools.get_user_friendly_name.md
# get_user_friendly_name ## get_user_friendly_name ```python omni.simready.cadtools.get_user_friendly_name(asset_name: str) -> str ``` Returns the user-friendly name from the given asset name. ```
198
omni.simready.cadtools.md
# omni.simready.cadtools ## Submodules Summary - **omni.simready.cadtools.extension** - No submodule docstring provided - **omni.simready.cadtools.extract_asset_info_healthineers** - No submodule docstring provided - **omni.simready.cadtools.simready_toolkit** - SimReady functions to decompose CAD assemblies into components and sub-assemblies. - **omni.simready.cadtools.usd_stage_utils** - Utility functions that query or alter a given USD stage. ## Classes Summary - **SimreadyCadToolsExtension** - No docstring provided ## Functions Summary - **convert_prim_to_payload** - Converts a prim and all its descendants to a payload. - **create_prototype_for_prims** - Create a “prototype” prim for the given prim in the given stage. - **create_simready_assembly** - Creates a SimReady Assembly based on an input “CAD” assembly and a list of urls of SimReady Assets. - **create_simready_assembly_of_assemblies** - Creates a SimReady Assembly of Assemblies based on an input “CAD” assembly and a list SimReady Asset files and assembly files. <section> <table> <tbody> <tr class="row-odd"> <td> <p> create_simready_asset <td> <p> Creates a SimReady Asset from the given input USD file, and saves it to the given output USD file. <tr class="row-even"> <td> <p> delete_dangling_internal_references <td> <p> Cleans up dangling references to prims in the same stage. <tr class="row-odd"> <td> <p> extract_assemblies_to_layers <td> <p> Extracts the assemblies of a given CAD assembly into their own layers. <tr class="row-even"> <td> <p> extract_components_to_layers <td> <p> Extracts the parts of the USD stage at the given URL to their own layers. <tr class="row-odd"> <td> <p> extract_prims_to_layers <td> <p> Extracts the given prims into their own layers. The prim with all its descendants and materials it binds to <tr class="row-even"> <td> <p> generate_asset_db_for_sre_healthineers <td> <p> Generates an asset database for the SimReady Explorer. <tr class="row-odd"> <td> <p> get_user_friendly_name <td> <p> Returns the user-friendly name from the given asset name. <tr class="row-even"> <td> <p> remove_non_alphanumeric_prefixes <td>
3,044
omni.simready.cadtools.SimreadyCadToolsExtension.md
# SimreadyCadToolsExtension ## SimreadyCadToolsExtension ``` ```python class omni.simready.cadtools.SimreadyCadToolsExtension ``` Bases: `omni.ext._extensions.IExt` ### Methods | Method | Description | |---------------|-------------| | `on_shutdown()` | | | `on_startup(ext_id)` | | ```python def __init__(self: omni.ext._extensions.IExt) -> None ```
384
omni.simready.cadtools.simready_toolkit.Functions.md
# omni.simready.cadtools.simready_toolkit Functions ## Functions Summary: | Function | Description | |----------|-------------| | [create_simready_asset](omni.simready.cadtools.simready_toolkit/omni.simready.cadtools.simready_toolkit.create_simready_asset.html) | Creates a SimReady Asset from the given input USD file, and saves it to the given output USD file. |
366
omni.simready.cadtools.simready_toolkit.md
# omni.simready.cadtools.simready_toolkit ## Functions Summary: - **create_simready_asset** - Creates a SimReady Asset from the given input USD file, and saves it to the given output USD file.
196
omni.simready.cadtools.Submodules.md
# omni.simready.cadtools Submodules ## Submodules Summary - **omni.simready.cadtools.extension** - No submodule docstring provided - **omni.simready.cadtools.extract_asset_info_healthineers** - No submodule docstring provided - **omni.simready.cadtools.simready_toolkit** - SimReady functions to decompose CAD assemblies into components and sub-assemblies. - **omni.simready.cadtools.usd_stage_utils** - Utility functions that query or alter a given USD stage.
473
omni.simready.cadtools.usd_stage_utils.extract_assemblies_to_layers.md
# extract_assemblies_to_layers ## Function Signature ```python def extract_assemblies_to_layers( url: str, layers_output_dir: Optional[str] = None, layer_root_prim_path: pxr.Sdf.Path = Sdf.Path('/RootNode'), layer_up_axis: str = 'Z', layer_mpu: float = -1.0, layer_ext_usda: str = 'usda' ) ``` ## Description This function extracts assemblies to layers. ### Parameters - `url`: The URL of the source data. - `layers_output_dir`: The directory where the output layers will be stored. - `layer_root_prim_path`: The root prim path for the layer. - `layer_up_axis`: The up axis for the layer. - `layer_mpu`: The material point unit for the layer. - `layer_ext_usda`: The extension for the USD layer. ``` : bool = True , presentation_rig_path : Optional [ str ] = None ) → List [ str ] Extracts the assemblies of a given CAD assembly into their own layers. Assemblies can have nested assemblies. If finds the first level of assembly prims, extracts them to their layers, then calls itself recursively on the extracted assemblies, until no more new layers are created. ### Parameters - **url** (str) – The URL of the input USD file that contains the CAD assembly from which the assemblies will get extracted. - **layers_output_dir** (str, optional) – The directory to create the new layers in. If None, it uses the directory of the input stage. Defaults to None. - **layer_root_prim_path** (Sdf.Path, optional) – The root prim path to use for the new layers. Defaults to Sdf.Path(“/” + srtools.STANDARD_ROOT_PRIM_NAME). - **layer_up_axis** (str, optional) – The up axis to use for the new layers. Defaults to UsdGeom.Tokens.z. - **layer_mpu** (float) – The meters per unit of layers to be created for the prototypes. Defaults to -1, which means the input asset’s mpu will be used. - **ext_usda** (bool, optional) – If True, the extracted parts will be saved as .usda files. Otherwise, they will be saved as .usd files. Defaults to True. - **presentation_rig_path** (str, optional) – The path to the presentation rig to apply to the extracted assemblies. Defaults to None. ### Returns - The list of URLs of the extracted parts, or an empty list if none were found. ### Return type - List[str]
2,216
omni.simready.cadtools.usd_stage_utils.extract_components_to_layers.md
# extract_components_to_layers ## Functions ### extract_components_to_layers ```python def extract_components_to_layers(url: str, layers_output_dir: Optional[str] = None, layer_root_prim_path: pxr.Sdf.Path = Sdf.Path('/RootNode'), layer_up_axis: str = 'Z', layer_mpu: float = -1.0): pass <details> <summary>omni.simready.cadtools.usd_stage_utils.extract_components_to_layers <p>Extracts the parts of the USD stage at the given URL to their own layers. It looks for the child xforms under the “Prototypes” xform and copies them each to a new layer (USD file). The copy includes all child prims, materials, material bindings etc. <dl class="field-list simple"> <dt class="field-odd">Parameters <dd class="field-odd"> <ul class="simple"> <li> <p><strong>url <li> <p><strong>layers_output_dir <li> <p><strong>layer_root_prim_path <li> <p><strong>layer_up_axis <li> <p><strong>layer_mpu <li> <p><strong>ext_usda <dt class="field-even">Returns <dd class="field-even"> <p>The list of URLs of the extracted parts, or an empty list if none were found. <dt class="field-odd">Return type <dd class="field-odd"> <p>List[str]
1,130
omni.simready.cadtools.usd_stage_utils.Functions.md
# omni.simready.cadtools.usd_stage_utils Functions ## Functions Summary: | Function | Description | |----------|-------------| | `convert_prim_to_payload` | Converts a prim and all its descendants to a payload. | | `create_prototype_for_prims` | Create a “prototype” prim for the given prim in the given stage. | | `create_simready_assembly` | Creates a SimReady Assembly based on an input “CAD” assembly and a list of urls of SimReady Assets. | | `create_simready_assembly_of_assemblies` | Creates a SimReady Assembly of Assemblies based on an input “CAD” assembly and a list SimReady Asset files and assembly files. | | `extract_assemblies_to_layers` | Extracts the assemblies of a given CAD assembly into their own layers. | | `extract_components_to_layers` | Extracts the parts of the USD stage at the given URL to their own layers. |
840
omni.simready.explorer.add_asset_to_stage.md
# add_asset_to_stage ## add_asset_to_stage ### omni.simready.explorer.add_asset_to_stage(url: str, parent_path: pxr.Sdf.Path, position: pxr.Gf.Vec3d, payload: bool, variants: Optional[Dict[str, str]], instanceable: bool = False) -> Tuple[bool, pxr.Sdf.Path] Adds an asset to the current stage. **Parameters** - **url** (str) – Url of asset to add. - **parent_path** (pxr.Sdf.Path) – Path of parent prim to add asset to. If empty path, add to default prim or pseudo root. - **position** (pxr.Gf.Vec3d) – Position to add asset at. - **payload** (bool) – If True, add asset as payload, otherwise as reference. - **variants** (Optional[Dict[str, str]]) – Variants to set on added asset. Dictionary of variant set name and value. **Returns** - Tuple of success, and path to added prim. **Return type** - Tuple[bool, pxr.Sdf.Path] **Note** The actions of this function are undoable. If you want to add an asset without undo, use the following: ```python with omni.kit.undo.disabled(): add_asset_to_stage(...) ```
1,015
omni.simready.explorer.add_asset_to_stage_using_prims.md
# add_asset_to_stage_using_prims ## add_asset_to_stage_using_prims ``` ```python omni.simready.explorer.add_asset_to_stage_using_prims( usd_context: omni.usd._usd.UsdContext, stage: pxr.Usd.Stage, url: str, variants: Optional[Dict[str, str]] = None, replace_prims: bool = False, prim_paths: List[pxr.Sdf.Path] = [] ) ``` ### omni.simready.explorer.add_asset_to_stage_using_prims Add an asset to a stage using a list of prims. The asset will be added to the average position of the provided prims, or the origin if no prims supplied. The asset will be added as a reference or payload based on whether the first provided prim has authored references or payloads. If no prims specified, the setting at “/persistent/app/stage/dragDropImport” is used. If the new asset is to replace the prims, the asset’s parent will be the common ancestor of all prims. If no prims specified, the default prim or pseudo root will be used as the parent prim of the added asset. #### Parameters - **usd_context** (omni.usd.UsdContext) – UsdContext to add asset to. - **stage** (Usd.Stage) – Stage to add asset to. - **url** (str) – Url of asset to add. - **variants** (Optional[Dict[str, str]]) – Variants to set on the added prim. - **replace_prims** (bool) – If True, replace the selection with the new asset. - **prim_paths** (List[Sdf.Path]) – List of prims to use for adding the asset. #### Returns Tuple of success and added prim path. #### Note The actions of this function are undoable. If you want to add an asset without undo, use the following: ```python with omni.kit.undo.disabled(): add_asset_to_stage_using_prims(...) ```
1,650
omni.simready.explorer.AssetFactory.md
# AssetFactory ## AssetFactory ```python class omni.simready.explorer.AssetFactory ``` A factory of SimReady asset objects. Allows to register asset classes and create instances of them. > **Note** > Currently only one asset class can be registered per asset type. The last registered asset class of a given type will be used. > > Asset classes created and registered by 3rd party developers are not fully supported yet. ### Methods - **create_asset(raw_asset_data)** - Creates an asset based on a dictionary of data with content specific to the asset type. - **dump_asset_types()** - Prints the list of registered asset types. - **num_asset_types()** - Returns the number of registered asset types. - **register(asset_type)** - Decorator. ### Attributes - **registry** - The registry of asset types. <dl class="py method"> <dt class="sig sig-object py" id="omni.simready.explorer.AssetFactory.__init__"> <span class="sig-name descname"> <span class="pre"> __init__ <span class="sig-paren"> ( <span class="sig-paren"> ) <dd> <dl class="py method"> <dt class="sig sig-object py" id="omni.simready.explorer.AssetFactory.create_asset"> <em class="property"> <span class="pre"> classmethod <span class="w"> <span class="sig-name descname"> <span class="pre"> create_asset <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> raw_asset_data <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> Dict <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> Optional <span class="p"> <span class="pre"> [ <span class="pre"> omni.simready.explorer.asset.SimreadyAsset <span class="p"> <span class="pre"> ] <dd> <p> Creates an asset based on a dictionary of data with content specific to the asset type. <dl class="py method"> <dt class="sig sig-object py" id="omni.simready.explorer.AssetFactory.dump_asset_types"> <em class="property"> <span class="pre"> classmethod <span class="w"> <span class="sig-name descname"> <span class="pre"> dump_asset_types <span class="sig-paren"> ( <span class="sig-paren"> ) <dd> <p> Prints the list of registered asset types <dl class="py method"> <dt class="sig sig-object py" id="omni.simready.explorer.AssetFactory.num_asset_types"> <em class="property"> <span class="pre"> classmethod <span class="w"> <span class="sig-name descname"> <span class="pre"> num_asset_types <span class="sig-paren"> ( <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> int <dd> <p> Returns the number of registered asset types <dl class="py method"> <dt class="sig sig-object py" id="omni.simready.explorer.AssetFactory.register"> <em class="property"> <span class="pre"> classmethod <span class="w"> <span class="sig-name descname"> <span class="pre"> register <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> asset_type <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> omni.simready.explorer.asset.AssetType <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> Callable <dd> <p> Decorator. Registers a new asset class as asset_type with the AssetFactory. <p class="rubric"> Example <p> Register MyAsset as AssetTypePROP with the AssetFactory <div class="highlight-python notranslate"> <div class="highlight"> <pre><span> <span class="k">class <span class="k">pass <dl class="py attribute"> <dt class="sig sig-object py" id="omni.simready.explorer.AssetFactory.registry"> <span class="sig-name descname"> <span class="pre"> registry <em class="property"> <span class="p"> <span class="pre"> : <span class="w"> <span class="pre"> Dict <span class="p"> <span class="pre"> [ <span class="pre"> omni.simready.explorer.asset.AssetType <span class="p"> <span class="pre"> , <span class="w"> <span class="pre"> omni.simready.explorer.asset.SimreadyAsset <span class="p"> <span class="pre"> ] <em class="property"> <span class="w"> <span class="p"> <span class="pre"> = <span class="w"> <span class="pre"> {AssetType.PROP: <em> <span class="pre"> {'type': 'omni.simready.explorer.asset.PropAsset'} <dt> <a class="headerlink" href="#omni.simready.explorer.AssetFactory.registry" title="Permalink to this definition">  <dd> <p> The registry of asset types. Maps asset types to asset classes.
4,663
omni.simready.explorer.AssetType.md
# AssetType SimReady asset types. An asset type derived from SimreadyAsset is expected to be of one of these types. The AssetType values are used when registering a new asset type with the AssetFactory, using the AssetFactory.register() decorator. The asset class should also set its _type attribute to the same AssetType value it registered itself with. Example: ```python @AssetFactory.register(AssetType.CHARACTER) class CharacterAsset(SimreadyAsset): def __init__(self): self._type = AssetType.CHARACTER ``` > Note: The SimReady Explorer API does not fully support yet asset classes created by 3rd party developers. ## Attributes - **PROP**: A non-deformable static object. - **VEHICLE**: A vehicle with wheels and doors. - **CHARACTER**: A skinned bipedal character with a rig and animations. - **SCENE**: A scene with multiple assets and interactions. A scene with a number of static objects and a ground plane ``` ``` SIGN ``` Road sign ``` ROADMARK ``` Marks on the road used to direct traffic ``` GENERIC ``` Generic asset type ``` UNKNOWN ``` Non-categorized asset ``` __init__() ``` ``` CHARACTER = 3 ``` A skinned bipedal character with a rig and animations. ``` GENERIC = 7 ``` Generic asset type ``` PROP = 1 ``` A non-deformable static object. ``` ROADMARK = 6 ``` Marks on the road used to direct traffic ``` SCENE = 4 ``` A scene with a number of static objects and a ground plane ``` SIGN = 5 ``` Road sign ``` UNKNOWN = 8 ``` Non-categorized asset ``` VEHICLE ``` ### VEHICLE = 2 A vehicle with wheels and doors.
1,564
omni.simready.explorer.Classes.md
# omni.simready.explorer Classes ## Classes Summary: | Class | Description | |-------|-------------| | [AssetFactory](#) | A factory of SimReady asset objects. | | [AssetType](#) | SimReady asset types. | | [PropAsset](#) | A SimReady prop asset. | | [SimreadyAsset](#) | Base class for SimReady assets. |
307
omni.simready.explorer.find_assets.md
# find_assets ## find_assets ```python async omni.simready.explorer.find_assets(search_words: Optional[List[str]] = None) -> List[omni.simready.explorer.asset.SimreadyAsset] ``` Search assets in the current asset library. Filter the current asset library by a list of search words. Search words are not case sensitive, and are matched partially against asset names as tags. If no search words are provided, all assets are returned. Example: Analyzing the results of searching with [“residential”, “chair”, “wood”] will reveal that the found assets have “residential” and “chair” in their tags, and “wood” in their names. ### Parameters - **search_words** (Optional[List[str]]) – List of search words to filter assets on. ### Returns - List of SimReady assets that match the search words. ### Return type - List[SimreadyAsset]
832
omni.simready.explorer.Functions.md
# omni.simready.explorer Functions ## Functions Summary: | Function Name | Description | |---------------|-------------| | add_asset_to_stage | Adds an asset to the current stage. | | add_asset_to_stage_using_prims | Add an asset to a stage using a list of prims. | | find_assets | Search assets in the current asset library | | get_average_position_of_prims | Get the average position of a list of prims. | | get_selected_xformable_prim_paths | Get the list of selected Xformable prim paths in the stage. |
509
omni.simready.explorer.get_average_position_of_prims.md
# get_average_position_of_prims  ## get_average_position_of_prims → pxr.Gf.Vec3d ### Description Get the average position of a list of prims. ### Parameters - **prims** (List[Usd.Prim]) – The list of prims to get the average position of. ### Returns The average 3D position of the prims, or the origin if no prims provided.
328
omni.simready.explorer.get_selected_xformable_prim_paths.md
# get_selected_xformable_prim_paths  ## get_selected_xformable_prim_paths Get the list of selected Xformable prim paths in the stage. ### Parameters - **usd_context** (omni.usd.UsdContext) – The USD context to get the selection from. - **stage** (Usd.Stage) – The stage to get the selection from. ### Returns The list of prim paths of the selected Xformable prims in the stage, or an empty list if there’s nothing selected.
426
omni.simready.explorer.md
# omni.simready.explorer  ## Classes Summary - **AssetFactory** - A factory of SimReady asset objects. - **AssetType** - SimReady asset types. - **PropAsset** - A SimReady prop asset. - **SimreadyAsset** - Base class for SimReady assets. ## Functions Summary - **add_asset_to_stage** - Adds an asset to the current stage. - **add_asset_to_stage_using_prims** - Add an asset to a stage using a list of prims. - **find_assets** - Search assets in the current asset library - **get_average_position_of_prims** - Get the average position of a list of prims. - **get_selected_xformable_prim_paths** - Get the list of selected Xformable prim paths in the stage.
676
omni.simready.explorer.PropAsset.md
# PropAsset ## PropAsset ``` class omni.simready.explorer.PropAsset(raw_asset_data: Dict) ``` **Bases:** [omni.simready.explorer.asset.SimreadyAsset](omni.simready.explorer.SimreadyAsset.html#omni.simready.explorer.SimreadyAsset) A SimReady prop asset. Props are physically based static objects that do not deform and don’t have kinematic behavior. Examples include chairs, tools, equipment, containers, etc. ### Methods | Method | Description | |--------|-------------| | `__init__(raw_asset_data)` | Initialize a SimReady asset. | | `is_asset_data(raw_asset_data)` | Returns true if the raw asset data is determined to represent a PROP type asset. | ### Attributes (No attributes listed) ### `__init__(raw_asset_data)` Initialize a SimReady asset. SimReadyAsset instances are created by the AssetFactory. Developers don’t need to instantiate this and derived classes directly. ``` ### Parameters **raw_asset_data** (`Dict`) – Dictionary with data used to initialize the SimreadyAsset instance. ### is_asset_data ```python classmethod is_asset_data(raw_asset_data: Dict) -> bool ``` Returns true if the raw asset data is determined to represent a PROP type asset.
1,180
omni.simready.explorer.SimreadyAsset.md
# SimreadyAsset ## SimreadyAsset ``` ```markdown class omni.simready.explorer.SimreadyAsset(raw_asset_data: Dict) ``` ```markdown Bases: omni.kit.browser.folder.core.models.folder_browser_data.BrowserFile, abc.ABC Base class for SimReady assets. SimreadyAsset is an abstract type that implements the common behavior of all SimReady assets. Derived classes can further refine and customize the semantics of a Simready asset. A SimReady asset is a collection of sublayers and other data files usually grouped in a folder. The SimReady Specification defines the structure of a SimReady asset in detail. At a high level, a SimReady asset is comprised of: - Main file : {asset_name}.usd - Sublayers : {asset_name}_{description}.usd - Materials: all mdl or usd material data - Textures: all image data pertaining to materials - Thumbnails: thumbnail images of the asset SimReady assets expose a number of behaviors such as physics, appearance, etc. Assets can also have behaviors that are specific to their type. For example, vehicles may have the number of wheels and doors as part of their behavior. SimReady assets can be tagged. Tags are space delimited groups of words used in filtering assets in an asset library. SimReady assets can be labeled. Hierarchical labels can come from the Wiki Data database and are backed by a QCode. The SimReady Explorer displays the labels in the `Category Tree Window`. Labels, just like tags can be multi-word, and can be used to search for assets. > Note > The SimReady Explorer API does not fully support yet asset classes created by 3rd party developers. ## Methods - `__init__(raw_asset_data)` - Initialize a SimReady asset. - `is_asset_data()` - [Description] | Attribute | Description | |-----------|-------------| | `is_asset_data` | Returns true if the provided raw asset data is determined to represent this asset type. | | `asset_type` | The type of this asset. | | `behaviors` | The behaviors of this asset. | | `extent_as_str` | The extent of this asset in 3D space. | | `hierarchy` | The Wiki Data label hierarchy of this asset. | | `hierarchy_as_str` | The Wiki Data label hierarchy of this asset formatted as a '>' delimited string Example: "furniture > seat > chair > armchair" | | `labels` | The labels of this asset as a list. | | `labels_as_str` | The labels of this asset as a comma delimited string. | | `main_url` | The full path to the main file representing the asset. | | `name` | The user readable name of this asset. | | `physics_variant` | The physics variant set for this asset. | | `qcode` | The Wiki Data QCode of this asset. | | `tags` | The list of tags of this asset. | | `tags_as_str` | List of comma delimited tag words. | | `thumbnail_url` | The full path to the asset's thumbnail image file. | ``` ### Attributes | Attribute | Description | |-----------|-------------| | `asset_type` | The type of this asset. | | `behaviors` | The behaviors of this asset. | | `extent_as_str` | The extent of this asset in 3D space. | | `hierarchy` | The Wiki Data label hierarchy of this asset. | | `hierarchy_as_str` | The Wiki Data label hierarchy of this asset formatted as a '>' delimited string Example: "furniture > seat > chair > armchair" | | `labels` | The labels of this asset as a list. | | `labels_as_str` | The labels of this asset as a comma delimited string. | | `main_url` | The full path to the main file representing the asset. | | `name` | The user readable name of this asset. | | `physics_variant` | The physics variant set for this asset. | | `qcode` | The Wiki Data QCode of this asset. | | `tags` | The list of tags of this asset. | | `tags_as_str` | List of comma delimited tag words. | | `thumbnail_url` | The full path to the asset's thumbnail image file. | ### __init__ Initialize a SimReady asset. SimReadyAsset instances are created by the AssetFactory. Developers don’t need to instantiate this and derived classes directly. #### Parameters - **raw_asset_data** (Dict) – Dictionary with data used to initialize the SimreadyAsset instance. ### is_asset_data Returns true if the provided raw asset data is determined to represent this asset type. To be implemented by derived classes. ### asset_type The type of this asset. Must be one of the values in the AssetType enum. ### behaviors The behaviors of this asset. The behaviors of this asset is represented as a dictionary of variant set names as keys and lists of variant names as values. Example: {‘PhysicsVariant’: [‘None’, ‘RigidBody’]} ### extent_as_str The extent of this asset in 3D space. Example: “20x10.5x0.25” ### hierarchy The Wiki Data label hierarchy of this asset. This is the same as the “labels” property. Examples: [‘furniture’, ‘seat’, ‘chair’, ‘armchair’] ### hierarchy_as_str The hierarchy of this asset as a string. ## hierarchy_as_str The Wiki Data label hierarchy of this asset formatted as a ‘&gt;’ delimited string Example: “furniture &gt; seat &gt; chair &gt; armchair” ## labels The labels of this asset as a list. Labels are hierarchical and can be used to group assets in a tree structure. The label hierarchy is determined by a Wiki Data QCode (see https://www.wikidata.org) Examples: [‘furniture/seat/chair/armchair’], QCode: Q11285759 ## labels_as_str The labels of this asset as a comma delimited string. Example: “furniture/seat/chair/armchair” ## main_url The full path to the main file representing the asset. This file represents the top-level USD composition arc for a SimReady asset. It may take other USD layers and combine them together into one USD file. The path is set by the AssetFactory when creating the asset based on the provided raw asset data. ## name The user readable name of this asset. ## physics_variant The physics variant set for this asset. This dictionary has the following structure: {‘Prim Path’: <prim_path>, ‘Values’: [‘None’, ‘RigidBody’]} where <prim_path> is a string representing the path to the prim that contains the physics variant set. The name of the Physics variant set is always “PhysicsVariant”. ## qcode The Wiki Data QCode of this asset. Every asset is identified by a QCode. The QCode is used to retrieve the labels from Wiki Data, which in effect, act as a classification of the asset. Example: “Q11285759” ## tags The labels of this asset as a list. Labels are hierarchical and can be used to group assets in a tree structure. The label hierarchy is determined by a Wiki Data QCode (see https://www.wikidata.org) Examples: [‘furniture/seat/chair/armchair’], QCode: Q11285759 ### Tags : List[str] The list of tags of this asset. Each tag can be a multi-word space delimited string. Examples: “car”, “three wheeled car”, etc ### tags_as_str : str List of comma delimited tag words. Note that tags, labels and the QCode are all part of the list of tags in order to make searching more effective. Example: “residential,furniture,seat,chair,armchair,Q11285759” ### thumbnail_url : Optional[str] The full path to the asset’s thumbnail image file. The thumbnail path is set by the AssetFactory when creating the asset based on the provided raw asset data.
7,120
omni.stageupdate.acquire_stage_update_interface.md
# acquire_stage_update_interface ## acquire_stage_update_interface ```python omni.stageupdate.acquire_stage_update_interface(plugin_name: str = None, library_path: str = None) -> omni.stageupdate._stageupdate.IStageUpdate ``` - **plugin_name**: str = None - **library_path**: str = None **Returns**: - omni.stageupdate._stageupdate.IStageUpdate ``` ---
356
omni.stageupdate.Functions.md
# omni.stageupdate Functions ## Functions Summary - **get_stage_update_interface** - Returns StageUpdate with the given name via cached :class:`omni.usd.IStageUpdate` interface - **acquire_stage_update_interface** - acquire_stage_update_interface(plugin_name: str = None, library_path: str = None) -> omni.stageupdate._stageupdate.IStageUpdate
350
omni.stageupdate.IStageUpdate.md
# IStageUpdate ## IStageUpdate ```python class omni.stageupdate.IStageUpdate ``` Bases: ```python pybind11_object ``` ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | | | `destroy_stage_update(self, name)` | Destroys the StageUpdate with the given name if nothing references it. | | `get_stage_update(self[, name])` | Returns the StageUpdate with the given name or creates a new if it does not exist. | ```python def __init__(*args, **kwargs): pass ``` ```python def destroy_stage_update(self, name): """ Destroys the StageUpdate with the given name if nothing references it. """ pass ``` ```python def get_stage_update(self, [name]): """ Returns the StageUpdate with the given name or creates a new if it does not exist. """ pass ``` ## omni.stageupdate.IStageUpdate.destroy_stage_update ### Parameters - **StageUpdate** (name of the) – ### Returns - True if a StageUpdate was deleted, False otherwise. The latter happens when the StageUpdate does not exist, it is in use, or it is the default StageUpdate. Destroys the StageUpdate with the given name if nothing references it. Does not release the default StageUpdate. ## omni.stageupdate.IStageUpdate.get_stage_update ### Parameters - **name** – The name of the StageUpdate. ### Returns - StageUpdate object. Returns the StageUpdate with the given name or creates a new if it does not exist.
1,441
omni.stageupdate.StageUpdate.md
# StageUpdate ## Class: omni.stageupdate.StageUpdate Bases: `pybind11_object` ### Methods - **__init__(*args, **kwargs)** - **create_stage_update_node(self, display_name, ...)** - **get_stage_update_nodes(self)** - **set_stage_update_node_enabled(self, index, ...)** - Toggle Simulation Node enable/disable. - **set_stage_update_node_order(self, index, order)** - Change Simulation Node order. - **subscribe_to_stage_update_node_change_events(...)** Subscribes to Simulation Node(s) change events. ### __init__(*args, **kwargs) ### create_stage_update_node(self: omni.stageupdate._stageupdate.StageUpdate, display_name: str, on_attach_fn: Callable[[int, float], None] = None, on_detach_fn: Callable[[], None] = None, on_update_fn: Callable[[float, float], None] = None, on_prim_add_fn: Callable[[str], None] = None, on_prim_or_property_change_fn: Callable[[str], None] = None, on_prim_remove_fn: Callable[[str], None] = None, on_raycast_fn: Callable[[carb::Float3, carb::Float3, bool], None] = None) -> omni.stageupdate._stageupdate.StageUpdateNode ### get_stage_update_nodes(self: omni.stageupdate._stageupdate.StageUpdate) -> tuple ### set_stage_update_node_enabled(self: omni.stageupdate._stageupdate.StageUpdate, index: int, enabled: bool) ### set_stage_update_node_enabled Toggle Simulation Node enable/disable. **Parameters** - **index** (int) – Simulation Node index in tuple, returned by `get_stage_update_nodes`. - **enabled** (bool) – Enable/disable toggle. ### set_stage_update_node_order Change Simulation Node order. **Parameters** - **index** (int) – Simulation Node index in tuple, returned by `get_stage_update_nodes`. - **order** (int) – Order to sort on. ### subscribe_to_stage_update_node_change_events Subscribes to Simulation Node(s) change events. Event is triggered when nodes are added, removed, toggled. See `Subscription` for more information on subscribing mechanism. **Parameters** - **fn** – The callback to be called on change. **Returns** - The subscription holder.
2,019
omni.stageupdate.StageUpdateNode.md
# StageUpdateNode ## StageUpdateNode ```python class omni.stageupdate.StageUpdateNode ``` Bases: `pybind11_object` ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | | ```python def __init__(*args, **kwargs): pass ```
269
omni.syntheticdata.Classes.md
# omni.syntheticdata Classes ## Classes Summary: | Class | Description | |-------|-------------| | [Extension](#) | Extension | | [SyntheticData](#) | SyntheticData | | [SyntheticDataException](#) | Common base class for all non-exit exceptions. | | [SyntheticDataStage](#) | SyntheticDataStage |
298