file_path
stringlengths
5
148
content
stringlengths
0
526k
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</summary> <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.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"> <ul class="simple"> <li> <p><strong>url</strong> (<em>str</em>) – The URL of the input USD file that contains the CAD assembly from which the parts will get extracted.</p> </li> <li> <p><strong>layers_output_dir</strong> (<em>str</em>, <em>optional</em>) – The directory to create the new layers in. If None, it uses the directory of the input stage. Defaults to None.</p> </li> <li> <p><strong>layer_root_prim_path</strong> (<em>Sdf.Path</em>, <em>optional</em>) – The root prim path to use for the new layers. Defaults to Sdf.Path(“/” + srtools.STANDARD_ROOT_PRIM_NAME).</p> </li> <li> <p><strong>layer_up_axis</strong> (<em>str</em>, <em>optional</em>) – The up axis to use for the new layers. Defaults to UsdGeom.Tokens.z.</p> </li> <li> <p><strong>layer_mpu</strong> (<em>float</em>) – 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.</p> </li> <li> <p><strong>ext_usda</strong> (<em>bool</em>, <em>optional</em>) – If True, the extracted parts will be saved as .usda files. Otherwise, they will be saved as .usd files. Defaults to True.</p> </li> </ul> </dd> <dt class="field-even">Returns</dt> <dd class="field-even"> <p>The list of URLs of the extracted parts, or an empty list if none were found.</p> </dd> <dt class="field-odd">Return type</dt> <dd class="field-odd"> <p>List[str]</p> </dd> </dl> </details>
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. |
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(...) ``` ``` ```
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(...) ```
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> </span> <span class="sig-paren"> ( </span> <span class="sig-paren"> ) </span> </dt> <dd> </dd> </dl> <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> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> create_asset </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> raw_asset_data </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> Dict </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> Optional </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> omni.simready.explorer.asset.SimreadyAsset </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </span> <dd> <p> Creates an asset based on a dictionary of data with content specific to the asset type. </p> </dd> </dl> <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> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> dump_asset_types </span> </span> <span class="sig-paren"> ( </span> <span class="sig-paren"> ) </span> </dt> <dd> <p> Prints the list of registered asset types </p> </dd> </dl> <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> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> num_asset_types </span> </span> <span class="sig-paren"> ( </span> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> int </span> </span> </span> </dt> <dd> <p> Returns the number of registered asset types </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.simready.explorer.AssetFactory.register"> <em class="property"> <span class="pre"> classmethod </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> register </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> asset_type </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.simready.explorer.asset.AssetType </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> Callable </span> </span> </span> </dt> <dd> <p> Decorator. Registers a new asset class as asset_type with the AssetFactory. </p> <p class="rubric"> Example </p> <p> Register MyAsset as AssetTypePROP with the AssetFactory </p> <div class="highlight-python notranslate"> <div class="highlight"> <pre><span></span><span class="nd">@AssetFactory</span><span class="o">.</span><span class="n">register</span><span class="p">(</span><span class="n">AssetType</span><span class="o">.</span><span class="n">PROP</span><span class="p">)</span> <span class="k">class</span> <span class="nc">MyMyAsset</span><span class="p">(</span><span class="n">BaseAsset</span><span class="p">):</span> <span class="k">pass</span> </pre> </div> </div> </dd> </dl> <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 </span> </span> <em class="property"> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="pre"> Dict </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> omni.simready.explorer.asset.AssetType </span> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <span class="pre"> omni.simready.explorer.asset.SimreadyAsset </span> <span class="p"> <span class="pre"> ] </span> </span> </em> <em class="property"> <span class="w"> </span> <span class="p"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="pre"> {AssetType.PROP: <em> <span class="pre"> {'type': 'omni.simready.explorer.asset.PropAsset'} </span> </em> <dt> <a class="headerlink" href="#omni.simready.explorer.AssetFactory.registry" title="Permalink to this definition">  </a> </dt> <dd> <p> The registry of asset types. Maps asset types to asset classes. </p> </dd>
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.
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. |
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]
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. |
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.
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.
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.
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.
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.
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 ``` ---
omni.stageupdate.Classes.md
# omni.stageupdate Classes ## Classes Summary - **IStageUpdate** - **StageUpdate** - **StageUpdateNode**
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
omni.stageupdate.get_stage_update_interface.md
# get_stage_update_interface Returns StageUpdate with the given name via cached `omni.usd.IStageUpdate` interface ## get_stage_update_interface
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.
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.
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 ```
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 |
omni.syntheticdata.dataclass.md
# dataclass ## dataclass ```python omni.syntheticdata.dataclass(cls=None, /, *, init=True, repr=True, eq=True, order=False, unsafe_hash=False, frozen=False, match_args=True, kw_only=False, slots=False) ``` This function is a part of the `omni.syntheticdata` module and is used to define a data class with various parameters controlling its behavior. ``` Returns the same class as was passed in, with dunder methods added based on the fields defined in the class. Examines PEP 526 __annotations__ to determine fields. If init is true, an __init__() method is added to the class. If repr is true, a __repr__() method is added. If order is true, rich comparison dunder methods are added. If unsafe_hash is true, a __hash__() method function is added. If frozen is true, fields may not be assigned to after instance creation. If match_args is true, the __match_args__ tuple is added. If kw_only is true, then by default all fields are keyword-only. If slots is true, an __slots__ attribute is added.
omni.syntheticdata.Extension.md
# Extension ## omni.syntheticdata.Extension Bases: `IExt` ### Methods - `__init__(self)` - `get_instance()` - `get_name()` - `on_shutdown()` - `on_startup(ext_id)` #### `__init__(self)` - Returns: `None`
omni.syntheticdata.field.md
# field ## field Return an object to identify dataclass fields. default is the default value of the field. default_factory is a 0-argument function called to initialize a field’s value. If init is true, the field will be a parameter to the class’s __init__() function. If repr is true, the field will be included in the object’s repr(). If hash is true, the field will be included in the object’s hash(). If compare is true, the field will be used in comparison functions. metadata, if specified, must be a mapping which is stored but not otherwise examined by dataclass. If kw_only is true, the field will become a keyword-only parameter to __init__(). It is an error to specify both default and default_factory.
omni.syntheticdata.Functions.md
# omni.syntheticdata Functions ## Functions Summary: - **dataclass** - Returns the same class as was passed in, with dunder methods - **field** - Return an object to identify dataclass fields.
omni.syntheticdata.md
# omni.syntheticdata ## Submodules Summary: | Submodule | Description | |-----------|-------------| | omni.syntheticdata.ogn | No submodule docstring provided | | omni.syntheticdata.scripts | No submodule docstring provided | ## Classes Summary: | Class | Description | |-------|-------------| | Extension | | | SyntheticData | | | SyntheticDataException | Common base class for all non-exit exceptions. | | SyntheticDataStage | | ## Functions Summary: | Function | Description | |----------|-------------| | dataclass | Returns the same class as was passed in, with dunder methods | | field | Return an object to identify dataclass fields. |
omni.syntheticdata.ogn.md
# omni.syntheticdata.ogn ## Navigation - [Omniverse Kit](https://docs.omniverse.nvidia.com/kit/docs) » - [API (python)](API.html) » - [Modules](Modules.html) » - [omni.syntheticdata](omni.syntheticdata.html) » - [omni.syntheticdata Submodules](omni.syntheticdata.Submodules.html) » - omni.syntheticdata.ogn
omni.syntheticdata.scripts.extension.Classes.md
# omni.syntheticdata.scripts.extension Classes ## Classes Summary | Class Name | Description | |------------|-------------| | [Extension](omni.syntheticdata.scripts.extension/omni.syntheticdata.scripts.extension.Extension.html) | - | | [SyntheticData](omni.syntheticdata.scripts.extension/omni.syntheticdata.scripts.extension.SyntheticData.html) | - | | [SyntheticDataException](omni.syntheticdata.scripts.extension/omni.syntheticdata.scripts.extension.SyntheticDataException.html) | Common base class for all non-exit exceptions. | | [SyntheticDataStage](omni.syntheticdata.scripts.extension/omni.syntheticdata.scripts.extension.SyntheticDataStage.html) | - |
omni.syntheticdata.scripts.extension.Functions.md
# omni.syntheticdata.scripts.extension Functions ## Functions Summary - **dataclass** - [dataclass](./omni.syntheticdata.scripts.extension.dataclass.html) - Returns the same class as was passed in, with dunder methods - **field** - [field](./omni.syntheticdata.scripts.extension.field.html) - Return an object to identify dataclass fields.
omni.syntheticdata.scripts.extension.md
# omni.syntheticdata.scripts.extension ## Classes Summary - **Extension** - **SyntheticData** - **SyntheticDataException** - Common base class for all non-exit exceptions. - **SyntheticDataStage** ## Functions Summary - **dataclass** - Returns the same class as was passed in, with dunder methods - **field** - Return an object to identify dataclass fields.
omni.syntheticdata.scripts.helpers.Functions.md
# omni.syntheticdata.scripts.helpers Functions ## Functions Summary | Function | Description | |----------|-------------| | [fish_eye_polynomial](#) | FTheta camera model based on DW src/dw/calibration/cameramodel/CameraModelsNoEigen.hpp | | [ftheta_distortion](#) | F-Theta distortion. | | [ftheta_distortion_prime](#) | Derivative to f_theta_distortion. | | [get_bbox_3d_corners](#) | Return transformed points in the following order: [LDB, RDB, LUB, RUB, LDF, RDF, LUF, RUF] | | [get_instance_mappings](#) | Get instance mappings. | | [get_projection_matrix](#) | Calculate the camera projection matrix. | | [get_view_params](#) | Get view parameters. | | [get_view_proj_mat](#) | Get View Projection Matrix. | | [image_to_world](#) | Map each image coordinate to a corresponding direction vector. | | lru_cache | Least-recently-used cache decorator. | | --- | --- | | merge_sensors | Merge sensor structured array outputs. | | project_fish_eye_map_to_sphere | | | project_fish_eye_polynomial | Project F-Theta camera model. | | project_pinhole | Project 3D points to 2D camera view using a pinhole camera model. | | reduce_bboxes_2d | Reduce 2D bounding boxes of leaf nodes to prims with a semantic label. | | reduce_bboxes_3d | Reduce 3D bounding boxes of leaf nodes to prims with a semantic label. | | reduce_occlusion | Reduce occlusion value of leaf nodes to prims with a semantic label. | | world_to_image | Project world coordinates to image-space. |
omni.syntheticdata.scripts.md
# omni.syntheticdata.scripts ## Submodules Summary: | Submodule | Description | |-----------|-------------| | [omni.syntheticdata.scripts.SyntheticData](omni.syntheticdata.scripts.SyntheticData.html) | No submodule docstring provided | | [omni.syntheticdata.scripts.extension](omni.syntheticdata.scripts.extension.html) | No submodule docstring provided | | [omni.syntheticdata.scripts.helpers](omni.syntheticdata.scripts.helpers.html) | No submodule docstring provided | | [omni.syntheticdata.scripts.sensors](omni.syntheticdata.scripts.sensors.html) | No submodule docstring provided | | [omni.syntheticdata.scripts.visualize](omni.syntheticdata.scripts.visualize.html) | No submodule docstring provided |
omni.syntheticdata.scripts.sensors.Classes.md
# omni.syntheticdata.scripts.sensors Classes ## Classes Summary | Class Name | Description | |------------|-------------| | [SyntheticData](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.SyntheticData.html) | | | [SyntheticDataException](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.SyntheticDataException.html) | Common base class for all non-exit exceptions. | | [SyntheticDataStage](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.SyntheticDataStage.html) | |
omni.syntheticdata.scripts.sensors.Functions.md
# omni.syntheticdata.scripts.sensors Functions ## Functions Summary: | Function Name | Description | |---------------|-------------| | create_or_retrieve_sensor | Retrieve a sensor for the specified viewport and sensor type. | | create_or_retrieve_sensor_async | Retrieve a sensor for the specified viewport and sensor type. | | dataclass | Returns the same class as was passed in, with dunder methods | | disable_sensors | deactivate the host buffer copy nodes for given sensor | | enable_sensors | activate the host buffer copy nodes for given sensor | | field | Return an object to identify dataclass fields. | | get_bounding_box_2d_loose | Get Bounding Box 2D Loose sensor output. | | get_bounding_box_2d_tight | Get Bounding Box 2D Tight sensor output. | | get_bounding_box_3d | Get Bounding Box 3D sensor output. | | 方法 | 描述 | | --- | --- | | get_bounding_box_3d | Get bounding box 3D sensor output. | | get_camera_3d_position | Get camera space 3d position sensor output. | | get_cross_correspondence | Get Cross Correspondence sensor output. | | get_depth | Get Inverse Depth sensor output. *** DEPRECATED *** | | get_depth_linear | Get Linear Depth sensor output. *** DEPRECATED *** | | get_distance_to_camera | Get distance to camera sensor output. | | get_distance_to_image_plane | Get distance to image plane sensor output. | | get_instance_segmentation | Get instance segmentation sensor output. | | get_motion_vector | Get Motion Vector sensor output. | | get_normals | Get Normals sensor output. | | get_occlusion | Get Occlusion values. | | get_occlusion_quadrant | Get Occlusion Quadrant. | | get_rgb | Get RGB sensor output. | | get_semantic_data | Get Semantic Data. | | get_semantic_segmentation | Get semantic segmentation sensor output. | | get_sensor_array | Retrieve the sensor array data from the last sensor node evaluation. | | get_synthetic_data | | | initialize_async | Initialize sensors in the list provided. | | next_render_simulation_async | Fetch the current simulation time and wait for a frame to be rendered at or after this time. | | next_sensor_data_async | Wait for frame complete event from Kit for specific viewport. |
omni.syntheticdata.scripts.sensors.md
# omni.syntheticdata.scripts.sensors ## Classes Summary - [SyntheticData](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.SyntheticData.html) - [SyntheticDataException](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.SyntheticDataException.html) - Common base class for all non-exit exceptions. - [SyntheticDataStage](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.SyntheticDataStage.html) ## Functions Summary - [create_or_retrieve_sensor](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.create_or_retrieve_sensor.html) - Retrieve a sensor for the specified viewport and sensor type. - [create_or_retrieve_sensor_async](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.create_or_retrieve_sensor_async.html) - Retrieve a sensor for the specified viewport and sensor type. - [dataclass](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.dataclass.html) - Returns the same class as was passed in, with dunder methods - [disable_sensors](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.disable_sensors.html) - deactivate the host buffer copy nodes for given sensor - [enable_sensors](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.enable_sensors.html) - activate the host buffer copy nodes for given sensor - [field](omni.syntheticdata.scripts.sensors/omni.syntheticdata.scripts.sensors.field.html) | Function | Description | |----------|-------------| | get_bounding_box_2d_loose | Get Bounding Box 2D Loose sensor output. | | get_bounding_box_2d_tight | Get Bounding Box 2D Tight sensor output. | | get_bounding_box_3d | Get bounding box 3D sensor output. | | get_camera_3d_position | Get camera space 3d position sensor output. | | get_cross_correspondence | Get Cross Correspondence sensor output. | | get_depth | Get Inverse Depth sensor output. *** DEPRECATED *** | | get_depth_linear | Get Linear Depth sensor output. *** DEPRECATED *** | | get_distance_to_camera | Get distance to camera sensor output. | | get_distance_to_image_plane | Get distance to image plane sensor output. | | get_instance_segmentation | Get instance segmentation sensor output. | | get_motion_vector | Get Motion Vector sensor output. | | get_normals | Get Normals sensor output. | | get_occlusion | Get Occlusion values. | | get_occlusion_quadrant | Get Occlusion Quadrant. | | get_rgb | Get RGB sensor output. | | get_semantic_data | Get Semantic Data. | | get_semantic_segmentation | Get semantic segmentation sensor output. | | get_sensor_array | Retrieve the sensor array data from the last sensor node evaluation. | | get_synthetic_data | | | initialize_async | | ## Sensors ### Initialize sensors in the list provided. ### next_render_simulation_async Fetch the current simulation time and wait for a frame to be rendered at or after this time. ### next_sensor_data_async Wait for frame complete event from Kit for specific viewport.
omni.syntheticdata.scripts.Submodules.md
# omni.syntheticdata.scripts Submodules ## Submodules Summary: | Module Name | Description | |----------------------------|-------------------| | omni.syntheticdata.scripts.SyntheticData | No submodule docstring provided | | omni.syntheticdata.scripts.extension | No submodule docstring provided | | omni.syntheticdata.scripts.helpers | No submodule docstring provided | | omni.syntheticdata.scripts.sensors | No submodule docstring provided | | omni.syntheticdata.scripts.visualize | No submodule docstring provided |
omni.syntheticdata.scripts.SyntheticData.Classes.md
# omni.syntheticdata.scripts.SyntheticData Classes ## Classes Summary - **SyntheticData** - **SyntheticDataException** - Common base class for all non-exit exceptions. - **SyntheticDataStage**
omni.syntheticdata.scripts.visualize.Functions.md
# omni.syntheticdata.scripts.visualize Functions ## Functions Summary - **colorize_bboxes** - **colorize_bboxes_3d** - bboxes_3d_corners: in the local camera frame - **colorize_distance** - **colorize_segmentation** - **get_bbox2d_loose** - **get_bbox2d_tight** - **get_bbox3d** - **get_cross_correspondence** - **get_depth** - **get_distance** - **get_instance_segmentation** ## Functions - **get_instance_segmentation** - **get_motion_vector** - **get_normals** - **get_semantic_segmentation** - **random_colours** - Generate random colors.
omni.syntheticdata.scripts.visualize.md
# omni.syntheticdata.scripts.visualize ## Functions Summary: | Function | Description | |----------|-------------| | colorize_bboxes | - | | colorize_bboxes_3d | bboxes_3d_corners: in the local camera frame | | colorize_distance | - | | colorize_segmentation | - | | get_bbox2d_loose | - | | get_bbox2d_tight | - | | get_bbox3d | - | | get_cross_correspondence | - | | get_depth | - | | get_distance | - | | get_instance_segmentation | - | | 奇数行 | 偶数行 | |--------|--------| | get_motion_vector | | | get_normals | | | get_semantic_segmentation | | | random_colours | Generate random colors. |
omni.syntheticdata.Submodules.md
# omni.syntheticdata Submodules ## Submodules Summary - **omni.syntheticdata.ogn** - No submodule docstring provided - **omni.syntheticdata.scripts** - No submodule docstring provided
omni.syntheticdata.SyntheticData.md
# SyntheticData ## SyntheticData ```python class omni.syntheticdata.SyntheticData ``` **Bases:** `object` **Methods:** - **Get()** - Get the interface singleton instance. - **Initialize()** - Initialize interface singleton instance. - **Reset()** - Reset the interface singleton - **__init__()** - **activate_node_template(template_name, [...])** - Activate a registered node. - **connect_node_template(src_template_name, ...)** - Connect the given source node template to the destination node template ```code convert_sensor_type_to_rendervar ``` Convert of legacy sensor type name to its rendervar name ```code deactivate_node_template ``` (template_name[, ...]) Deactivate a registered node. ```code disable_async_rendering ``` () Disable asynchronous rendering Since asyncRendering is not supported by the fabric, graphs are currently not compatible with this mode. ```code disable_rendervar ``` (render_product_path, ...) Explicitely disable the computation of a render_var for a given render_product. ```code disconnect_node_template ``` (src_template_name, ...) Disconnect the given source node template to the destination node template ```code enable_rendervar ``` (render_product_path, render_var) Explicitely enable the computation of a render_var for a given render_product. ```code get_default_semantic_filter ``` () Returns: The default semantic filter predicate. ```code get_graph ``` ([stage, renderProductPath]) Return the graph at a given stage, for a given renderProduct. ```code get_instance_mapping_semantic_filter ``` () Returns: The semantic filter predicate currently applied to the instance mapping. ```code get_node_attributes ``` (template_name, ...[, ...]) Get the value of several activated node's attributes. ```code get_registered_visualization_template_names ``` () Get the registered node template names which types are in the display type list ```code get_registered_visualization_template_names_for_display ``` () Get the registered node template names which types are in the display type list and their display name ```code get_semantic_filter ``` (filter_name) Get the predicate of the given semantic filter. ```code get_semantic_filter_label_template_name ``` (...) 1. **Get the template name of the node exposing the semantic label map of a given semantic filter.** 2. **Get the default activation status of a visualization node template** - `get_visualization_template_name_default_activation` 3. **Query the activation status of a node template.** - `is_node_template_activated(template_name[, ...])` 4. **Check if a node template has already been registered.** - `is_node_template_registered(template_name)` 5. **Query the enabled status of a render var for a render product** - `is_rendervar_enabled(render_product_path, ...)` 6. **Query the used status of a render var for a render product** - `is_rendervar_used(render_product_path, ...)` 7. **Automatically register SdPostCompRenderVarTextures node template for the given template name.** - `register_combine_rendervar_template(...)` 8. **Automatically register SdPostCompRenderVarTextures node template for all registered nodes whose type is in the post display type list.** - `register_combine_rendervar_templates()` 9. **Automatically register SdPostRenderVarTextureToBuffer node templates for the given rendervars** - `register_device_rendervar_tex_to_buff_templates(...)` 10. **Automatically register SdPostRenderVarToHost node templates for the given rendervars** - `register_device_rendervar_to_host_templates(...)` 11. **Automatically register SdRenderVarDisplayTexture node template for all registered nodes whose type is in the post display type.** - `register_display_rendervar_templates()` 12. **Automatically register SdRenderVarToRawArray node templates for the given rendervars** - `register_export_rendervar_array_templates(...)` 13. **Automatically register SdRenderVarPtr node templates for the given rendervars** - `register_export_rendervar_ptr_templates(...)` 14. **Automatically register SdPostRenderVarToHost node templates for the given rendervars** - `register_host_rendervar_to_disk_templates(...)` - Automatically register SdPostRenderVarToDisk node templates for the given rendervars - Register a node template. - Return the root renderer template name. - Return the template name of the node triggering the execution of the post host to disk. - Request the execution of an activated node. - Reset the SyntheticData instance - Deactivate all visualization node template by default - Set the default semantic filter predicate. - Set the semantic filter predicate to be applied to the instance mapping. Contrary to the default - Set the value of an activated node attribute. - Set a semantic filter predicate. - Set the default activation status of visualization node template - Unregister a node template. __init__() → None ### NodeConnectionTemplate ```python class NodeConnectionTemplate(node_template_id: str, render_product_idxs: tuple = (0), attributes_mapping: dict = <factory>) ``` Bases: object ### NodeTemplate ```python class NodeTemplate(pipeline_stage: int, node_type_id: str, connections: list = <factory>, attributes: dict = <factory>) ``` Bases: object ### Get ```python static Get() ``` Get the interface singleton instance. ### Initialize ```python static Initialize() ``` Initialize interface singleton instance. ### Reset ```python static Reset() ``` Reset the interface singleton ### activate_node_template ```python activate_node_template(template_name: str, render_product_path_index: int = -1, render_product_paths: Optional[list] = None) ``` Activate a registered node. Create a node instance for the given node template and all its missing dependencies (including nodes and renderVar). The node will be executed during the next stage execution. **Parameters** - **template_name** – name of the node template to be activate - **render_product_path_index** – if the node template is associated to a render product, index of the associated render product in the render product path list - **render_product_paths** – render product path list to be used for specifying the render product of the node template and its dependencies to activate - **attributes** – dictionnary of attributes to set to the activated “template_name” node - **stage** – the stage to change, if None use the stage of the current usd context - **activate_render_vars** – if True activate the required render_vars, if False it is the user responsability to activate the required render_vars **Returns** A dictionnary containing for every render products the list of render var dependencies of this activation. NB: if activate_render_vars is True those render vars are added. ### connect_node_template Connect the given source node template to the destination node template #### Parameters - **src_template_name** – name of the source node template - **dst_template_name** – name of the destination node template - **render_product_path** – render product path of the node templates (None if the node are not specific to a render product) - **connection_map** – attribute mapping for the source inputs to the destination outputs. (None for an automatic mapping based on names) ### convert_sensor_type_to_rendervar Convert of legacy sensor type name to its rendervar name #### Parameters - **legacy_type_name** – legacy sensor type name to convert #### Returns - the name of the renderVar correspoding to the legacy name ### deactivate_node_template Deactivate a node template #### Parameters - **template_name** – name of the node template - **render_product_path_index** – index of the render product path (default -1) - **render_product_paths** – list of render product paths (default []) - **stage** – optional Stage instance (default None) - **deactivate_render_vars** – boolean indicating whether to deactivate render variables (default False) ### deactivate_node_template Deactivate a registered node. Delete a node instance for the given node template and all its automatically activated dependencies with no more downstream connections. The node won’t be executed anymore starting with the next stage execution. #### Parameters - **template_name** – name of the node template to deactivate - **render_product_path_index** – if the node template is associated to a render product, index of the associated render product in the render product path list - **render_product_paths** – render product path list to be used for specifying the render product of the node template and its dependencies to deactivate - **stage** – the stage to change, if None use the stage of the current usd context - **deactivate_render_vars** – if True deactivate the render_vars that have been activated in a call to activate_node_template and which are not used anymore by the managed graphs. Beware that in some cases, some of these render vars maybe actually used by other graphs, hence it is False by default if False it is the user responsability to deactivate the unused render_vars. - **recurse_only_automatically_activated** – if True recursively deactivate only automatically activated upstream nodes without other connections if False recursively deactivate all upstream nodes without other connections #### Returns A dictionary containing for every render products path the list of render var dependencies that have been activated by activate_node_template and are not used anymore by the managed graphs. NB: if deactivate_render_vars is True those render vars are removed ### disable_async_rendering Disable asynchronous rendering. Since asyncRendering is not supported by the fabric, graphs are currently not compatible with this mode. ### disable_rendervar Explicitely disable the computation of a render_var for a given render_product. #### Parameters - **render_product_path** – the render_product for which to disable the given render_var computation - **render_var** – the render_var to disable - **usd_stage** – the USD stage, if None use the stage of the current usd context #### Returns None ### disconnect_node_template ```python disconnect_node_template(src_template_name: str, dst_template_name: str, render_product_path: Optional[str] = None, connection_map: Optional[dict] = None) ``` Disconnect the given source node template to the destination node template. **Parameters:** - **src_template_name** – name of the source node template - **dst_template_name** – name of the destination node template - **render_product_path** – render product path of the node templates (None if the node are not specific to a render product) - **connection_map** – attribute mapping for the source inputs to the destination outputs. (None for an automatic mapping based on names) ### enable_rendervar ```python enable_rendervar(render_product_path: str, render_var: str, usd_stage: Optional[Stage] = None) ``` Explicitely enable the computation of a render_var for a given render_product. **Parameters:** - **render_product_path** – the render_product for which to enable the given render_var computation - **render_var** – the render_var to enable - **usd_stage** – usd stage (None if not specified) - **render_var** – the name of the render_var to enable - **usd_stage** – usd stage ### get_default_semantic_filter() Returns: The default semantic filter predicate. ### get_graph(stage: int = 3, renderProductPath: Optional[str] = None) Return the graph at a given stage, for a given renderProduct. Gives access to the SyntheticData graphs. Parameters: - **stage** – SyntheticDataStage of the queried graph - **renderProductPath** – (for POST_RENDER stage only) the renderProductPath for which to get the POST_RENDER graph Returns: the graph at the given stage for the given renderProductPath. ### get_instance_mapping_semantic_filter() Returns: The semantic filter predicate currently applied to the instance mapping. ### get_node_attributes(template_name: str, attribute_names: list, render_product_path: Optional[str] = None, gpu: bool = False) Get the value of several activated node’s attributes. The function may be used to retrieve the value of multiple activated node output attributes after the execution of its graph. Parameters: - **template_name** – name of the activated node - **attribute_names** – list of node attribute names to retrieve the value - **render_product_path** – if the activated node is associated to a render product, provide its path - **gpu** – for array data attribute, get a gpu data Returns - A dictionary of attribute name/value for every successfully retrieved attributes - None if the node is not a valid activated node static get_registered_visualization_template_names() → list - Get the registered node template names which types are in the display type list - Returns: list of registered template names which types are in the display type list static get_registered_visualization_template_names_for_display() → list - Get the registered node template names which types are in the display type list and their display name - Returns: list of tuples of registered template names which types are in the display type list and their display name get_semantic_filter(filter_name: str) - Get the predicate of the given semantic filter - Parameters: - **filter_name** – name of a semantic filter - Returns: the predicate of the semantic filter get_semantic_filter_label_template_name(filter_name: str, post_render_stage: bool = True) - Get the template name of the node exposing the semantic label map of a given semantic filter - Parameters: - **filter_name** – name of a semantic filter - **post_render_stage** – if true return the POST_RENDER stage node template name otherwise the ON_DEMAND stage - Returns: the template name of the node exposing the semantic labels of the given semantic filter ### get_visualization_template_name_default_activation ```python static get_visualization_template_name_default_activation(template_name: str) -> bool ``` Get the default activation status of a visualization node template **Parameters** - **template_name** – the name of the visualization node template to activate/deactivate by default **Returns** - True if the visualization node template is activated by default, False otherwise ### is_node_template_activated ```python is_node_template_activated(template_name: str, render_product_path: Optional[str] = None, only_manually_activated: bool = False) -> None ``` Query the activation status of a node template. **Parameters** - **template_name** – name of the node template to query the activation status - **render_product_path** – render product path for which to check the template activation status (None if not applicable) - **only_manually_activated** – if True check the activation for only the explicitely activated templates ( exclude the automatically activated template ) **Returns** - True if the node template is currently activated and, if only_explicitely_activated is True, if it has been explicitely activated ### is_node_template_registered ```python static is_node_template_registered(template_name: str) -> bool ``` Check if a node template has already been registered. **Parameters** - **template_name** – name of the node template to check **Returns** - True if the template_name specifie a node template within the registry, False otherwise ### is_rendervar_enabled query the enabled status of a render var for a render product #### Parameters - **render_product_path** – the path of the render product - **render_var** – the name of the render_var - **only_sdg_activated** – consider only the render var automatically enabled by a call to activate_node_template - **usd_stage** – the usd stage (if None use the current usd context stage) #### Returns True if the given render var is currently enabled for the given render product and, if only_sdg_activated is True, if it has been enabled by a call to activate_node_template ### is_rendervar_used query the used status of a render var for a render product #### Parameters - **render_product_path** – the path of the render product - **render_var** – the name of the render_var #### Returns True if the given render var is currently in use by the activated syntheticData nodes for the given render product ### register_combine_rendervar_template static ### register_combine_rendervar_template Automatically register SdPostCompRenderVarTextures node template for the given template name. #### Parameters - **template_name** – name of the node template for which registering a SdPostCompRenderVarTextures template ### register_combine_rendervar_templates Automatically register SdPostCompRenderVarTextures node template for all registerd nodes whose type is in the post display type list. The function is called for every statically registered nodes during the interface initialization. It may be called after having registered nodes whose type is in the post display type list. ### register_device_rendervar_tex_to_buff_templates Automatically register SdPostRenderVarTextureToBuffer node templates for the given rendervars #### Parameters - **rendervars** – list of renderVar names to register the rendervar device texture to buffer copy node template ### register_device_rendervar_to_host_templates Automatically register SdPostRenderVarToHost node templates for the given rendervars #### Parameters - **rendervars** – list of renderVar names to register the rendervar device to host copy node template ### register_display_rendervar_templates Automatically register SdRenderVarDisplayTexture node template for all registerd nodes whose type is in the post display type. The function is called for every statically registered nodes during the interface initialization. It may be called after having registered nodes whose type is omni.syntheticdata.SdPostRenderVarDisplayTexture. ### register_export_rendervar_array_templates ### register_export_rendervar_array_templates **Parameters** - **rendervars** – list of renderVar names to register the export raw array node template ### register_export_rendervar_ptr_templates **Parameters** - **rendervars** – list of renderVar names to register the ptr node template ### register_host_rendervar_to_disk_templates **Parameters** - **rendervars** – list of renderVar names to register the rendervar dispatch to disk node template ### register_node_template **Parameters** - **node_template** : NodeTemplate - **rendervars** : Optional[list] = None - **template_name** : Optional[str] = None ### Register a node template. Register a node template. Add a node template in the node registry. After the template has been added it may be activated for being executed in its associated stage. #### Parameters - **node_template** – template to be added to the registry - **rendervars** – list of renderVar the node is producing - **template_name** – unique name id of the template #### Returns the unique name id of the registered template ### Return the root renderer template name. Return the root renderer template name. To be scheduled a post-render node must be downstream to the root renderer node. ### Return the template name of the node triggering the execution of the post host to disk. ### Request the execution of an activated node. Request the execution of an activated node. The function will schedule the execution of compute-on-request node #### Parameters - **template_name** – name of the activated node - **render_product_path** – if the activated node is associated to a render product, provide its path #### Returns True if the request has been successfull ### Reset Reset #### Parameters - **usd** – default: True - **remove_activated_render_vars** – default: False ## omni.syntheticdata.SyntheticData.reset - **Description**: Reset the SyntheticData instance - **Parameters**: - `usd` – if true reset the graph in the usd stage session layer - `remove_activated_render_vars` – if True and usd is True remove the render vars activated by the node activation - **Note**: If the stage is valid it will destroy every graph created. ## omni.syntheticdata.SyntheticData.reset_visualization_template_name_default_activation - **Description**: Deactivate all visualization node template by default ## omni.syntheticdata.SyntheticData.set_default_semantic_filter - **Description**: Set the default semantic filter predicate. - **Parameters**: - `predicate` – a semantic filter predicate. - `hierarchical_labels` – option to propagate semantic labels within the hierarchy, from parent to childrens - `matching_labels` – option to remove from the set of labels the one that do not match the predicate - `examples` (predicate) – “typeA : labelA & !labelB | labelC , typeB: labelA ; typeC: labelD”, “typeA : * ; * : labelA” ## omni.syntheticdata.SyntheticData.set_instance_mapping_semantic_filter - **Description**: Set the semantic filter predicate to be applied to the instance mapping. Contrary to the default semantic filter this filter affect the instance mapping. All semantic data filtered at this level is not available in the instance mapping. - **Parameters**: - `predicate` – a semantic filter predicate. - `examples` (predicate) – “typeA : labelA & !labelB | labelC , typeB: labelA ; typeC: labelD”, “typeA : * ; * : labelA” ## omni.syntheticdata.SyntheticData.set_node_attributes - **Description**: Set node attributes for a specific template. - **Parameters**: - `template_name` : str - `attributes` : dict <em class="sig-param"> <span class="n"> <span class="pre"> render_product_path </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> Optional </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> str </span> <span class="p"> <span class="pre"> ] </span> </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> None </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Set the value of an activated node attribute. </p> <p> The function may be used to set the value of multiple activated node input attributes before the execution of its stage. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> template_name </strong> – name of the activated node </p> </li> <li> <p> <strong> attributes </strong> – dictionnary of attribute name/value to set </p> </li> <li> <p> <strong> render_product_path </strong> – if the activated node is associated to a render product, provide its path </p> </li> </ul> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.syntheticdata.SyntheticData.set_semantic_filter"> <span class="sig-name descname"> <span class="pre"> set_semantic_filter </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> filter_name </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> str </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> predicate </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> str </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> hierarchical_labels </span> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="default_value"> <span class="pre"> False </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> matching_labels </span> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="default_value"> <span class="pre"> True </span> </span> </em> <span class="sig-paren"> ) </span> </dt> <dd> <dl class="simple"> <dt> Set a semantic filter predicate. </dt> <dd> <p> If no semantic filter with the given name exists it will be created. If the predicate is empty the filter will be removed </p> </dd> </dl> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> filter_name </strong> – </p> </li> <li> <p> <strong> predicate </strong> – a semantic filter predicate. (if empty the filter will be removed) </p> </li> <li> <p> <strong> hierarchical_labels </strong> – option to propagate semantic labels within the hiearchy, from parent to childrens </p> </li> <li> <p> <strong> matching_labels </strong> – option to remove from the set of labels the one that do not match the predicate </p> </li> <li> <p> <strong> examples </strong> ( <em> predicate </em> ) – “typeA : labelA &amp; !labelB | labelC , typeB: labelA ; typeC: labelD” “typeA : * ; * : labelA” </p> </li> </ul> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.syntheticdata.SyntheticData.set_visualization_template_name_default_activation"> <em class="property"> <span class="pre"> static </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> set_visualization_template_name_default_activation </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> template_name </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> str </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> activation </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> bool </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> bool </span> </span> </span> </dt> <dd> Set the default activation status of visualization node template ### Parameters - **template_name** – the name of the visualization node template to activate/deactivate by default - **activation** – True if the visualization node template should be activated/deactivated by default ### Returns True if the template name is an activated visualization template name after the call, False otherwise ### unregister_node_template ```python static unregister_node_template(template_name: str) -> None ``` Unregister a node template. Remove a node template from the registry and all its dependencies. After removing a template, it cannot be activated anymore, nor its dependent templates. ```
omni.syntheticdata.SyntheticDataException.md
# SyntheticDataException ## SyntheticDataException ```python class omni.syntheticdata.SyntheticDataException(message='error') ``` Bases: `Exception` ```python def __init__(message='error'): ``` ```
omni.syntheticdata.SyntheticDataStage.md
# SyntheticDataStage ## SyntheticDataStage ``` class omni.syntheticdata.SyntheticDataStage ``` Bases: `object` ### Methods ### Attributes | Attribute | Description | |-----------|-------------| | `AUTO` | | | `ON_DEMAND` | | | `POST_RENDER` | | | `PRE_RENDER` | | | `SIMULATION` | | ```python __init__() ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```
omni.ui.AbstractField.md
# AbstractField ## Summary The abstract widget that is base for any field, which is a one-line text editor. A field allows the user to enter and edit a single line of plain text. It’s implemented using the model-view pattern and uses AbstractValueModel as the central component of the system. ### Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ### Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Details ### `__init__(*args, **kwargs)` ### `focus_keyboard(self[, focus])` Puts cursor to this field or removes focus if focus ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ```markdown ## Methods | Method Name | Description | |-------------|-------------| | `__init__(*args, **kwargs)` | | | `focus_keyboard(self[, focus])` | Puts cursor to this field or removes focus if focus | ``` ```markdown ## Attributes | Attribute Name | Description | |----------------|-------------| ``` ## omni.ui.AbstractField.focus_keyboard ### Parameters - **self**: omni.ui._ui.AbstractField - **focus**: bool = True ### Returns - None ### Description Puts cursor to this field or removes focus if focus
omni.ui.AbstractItem.md
# AbstractItem ## AbstractItem ```python class omni.ui.AbstractItem(pybind11_object) ``` The object that is associated with the data entity of the AbstractItemModel. ### Methods | Method | Description | |--------|-------------| | `__init__(self)` | | ```python def __init__(self): pass ``` ```
omni.ui.AbstractItemDelegate.md
# AbstractItemDelegate ## AbstractItemDelegate AbstractItemDelegate is used to generate widgets that display and edit data items from a model. ### Methods | Method | Description | |--------|-------------| | `__init__(self)` | Constructs AbstractItemDelegate. | | `build_branch(self, model[, item, column_id, ...])` | This pure abstract method must be reimplemented to generate custom collapse/expand button. | | `build_header(self[, column_id])` | This pure abstract method must be reimplemented to generate custom widgets for the header table. | | `build_widget(self, model[, item, index, ...])` | This pure abstract method must be reimplemented to generate custom widgets for specific item in the model. | ### omni.ui.AbstractItemDelegate.__init__ Constructs AbstractItemDelegate. #### Keyword Arguments: - `kwargs`: dict - See below ### omni.ui.AbstractItemDelegate.build_branch This pure abstract method must be reimplemented to generate custom collapse/expand button. #### Parameters: - `self`: omni.ui._ui.AbstractItemDelegate - `model`: omni.ui._ui.AbstractItemModel - `item`: omni.ui._ui.AbstractItem = None - `column_id`: int = 0 - `level`: int = 0 - `expanded`: bool = False ### omni.ui.AbstractItemDelegate.build_header This pure abstract method must be reimplemented to generate custom widgets for the header table. #### Parameters: - `self`: omni.ui._ui.AbstractItemDelegate - `column_id`: int = 0 ### build_widget ```python build_widget(self: omni.ui._ui.AbstractItemDelegate, model: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None, index: int = 0, level: int = 0, expanded: bool = False) -> None ``` This pure abstract method must be reimplemented to generate custom widgets for specific item in the model. ```
omni.ui.AbstractItemModel.md
# AbstractItemModel ## AbstractItemModel The central component of the item widget. It is the application’s dynamic data structure, independent of the user interface, and it directly manages the nested data. It follows closely model-view pattern. It’s abstract, and it defines the standard interface to be able to interoperate with the components of the model-view architecture. It is not supposed to be instantiated directly. Instead, the user should subclass it to create a new model. The item model doesn’t return the data itself. Instead, it returns the value model that can contain any data type and supports callbacks. Thus the client of the model can track the changes in both the item model and any value it holds. From any item, the item model can get both the value model and the nested items. Therefore, the model is flexible to represent anything from color to complicated tree-table construction. ### Methods - **__init__(self)** - Constructs AbstractItemModel. - **add_begin_edit_fn(self, arg0)** - Adds the function that will be called every time the user starts the editing. - **add_end_edit_fn(self, arg0)** - Adds the function that will be called every time the user finishes the editing. - **add_item_changed_fn(self, arg0)** - Adds the function that will be called every time the value changes. - `append_child_item(self, parentItem, model)` - Creates a new item from the value model and appends it to the list of the children of the given item. - `begin_edit(self, item)` - Called when the user starts the editing. - `can_item_have_children(self[, parentItem])` - Returns true if the item can have children. - `drop(*args, **kwargs)` - Overloaded function. - `drop_accepted(*args, **kwargs)` - Overloaded function. - `end_edit(self, item)` - Called when the user finishes the editing. - `get_drag_mime_data(self[, item])` - Returns Multipurpose Internet Mail Extensions (MIME) for drag and drop. - `get_item_children(self[, parentItem])` - Returns the vector of items that are nested to the given parent item. - `get_item_value_model(self[, item, column_id])` - Get the value model associated with this item. - `get_item_value_model_count(self[, item])` - Returns the number of columns this model item contains. - `remove_begin_edit_fn(self, arg0)` - Remove the callback by its id. - `remove_end_edit_fn(self, arg0)` - Remove the callback by its id. - `remove_item(self, item)` - Removes the item from the model. - `remove_item_changed_fn(self, arg0)` - Remove the callback by its id. - `subscribe_begin_edit_fn(self, arg0)` - Adds the function that will be called every time the user starts the editing. - `subscribe_end_edit_fn(self, arg0)` - Adds the function that will be called every time the user finishes the editing. <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> subscribe_end_edit_fn </span> </code> </a> (self, arg0) </p> </td> <td> <p> Adds the function that will be called every time the user finishes the editing. </p> </td> </tr> <tr class="row-odd"> <td> <p> <a class="reference internal" href="#omni.ui.AbstractItemModel.subscribe_item_changed_fn" title="omni.ui.AbstractItemModel.subscribe_item_changed_fn"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> subscribe_item_changed_fn </span> </code> </a> (self, arg0) </p> </td> <td> <p> Adds the function that will be called every time the value changes. </p> </td> </tr> </tbody> </table> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractItemModel.__init__"> <span class="sig-name descname"> <span class="pre"> __init__ </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <a class="reference internal" href="#omni.ui.AbstractItemModel" title="omni.ui._ui.AbstractItemModel"> <span class="pre"> omni.ui._ui.AbstractItemModel </span> </a> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> <a class="headerlink" href="#omni.ui.AbstractItemModel.__init__" title="Permalink to this definition">  </a> </dt> <dd> <p> Constructs AbstractItemModel. </p> <blockquote> <div> <dl class="simple"> <dt> `kwargs <span class="classifier"> dict` </span> </dt> <dd> <p> See below </p> </dd> </dl> </div> </blockquote> <p> ### Keyword Arguments: </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractItemModel.add_begin_edit_fn"> <span class="sig-name descname"> <span class="pre"> add_begin_edit_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <a class="reference internal" href="#omni.ui.AbstractItemModel" title="omni.ui._ui.AbstractItemModel"> <span class="pre"> omni.ui._ui.AbstractItemModel </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg0 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> Callable </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="p"> <span class="pre"> [ </span> </span> <a class="reference internal" href="#omni.ui.AbstractItemModel" title="omni.ui._ui.AbstractItemModel"> <span class="pre"> omni.ui._ui.AbstractItemModel </span> </a> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <a class="reference internal" href="omni.ui.AbstractItem.html#omni.ui.AbstractItem" title="omni.ui._ui.AbstractItem"> <span class="pre"> omni.ui._ui.AbstractItem </span> </a> <span class="p"> <span class="pre"> ] </span> </span> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <span class="pre"> None </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> int </span> </span> </span> <a class="headerlink" href="#omni.ui.AbstractItemModel.add_begin_edit_fn" title="Permalink to this definition">  </a> </dt> <dd> <p> Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractItemModel.add_end_edit_fn"> <span class="sig-name descname"> <span class="pre"> add_end_edit_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <a class="reference internal" href="#omni.ui.AbstractItemModel" title="omni.ui._ui.AbstractItemModel"> <span class="pre"> omni.ui._ui.AbstractItemModel </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg0 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> Callable </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="p"> <span class="pre"> [ </span> </span> <a class="reference internal" href="#omni.ui.AbstractItemModel" title="omni.ui._ui.AbstractItemModel"> <span class="pre"> omni.ui._ui.AbstractItemModel </span> </a> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <a class="reference internal" href="omni.ui.AbstractItem.html#omni.ui.AbstractItem" title="omni.ui._ui.AbstractItem"> <span class="pre"> omni.ui._ui.AbstractItem </span> </a> <span class="p"> <span class="pre"> ] </span> </span> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <span class="pre"> None </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> int </span> </span> </span> <a class="headerlink" href="#omni.ui.AbstractItemModel.add_end_edit_fn" title="Permalink to this definition">  </a> </dt> <dd> <p> Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback. </p> </dd> </dl> ### add_end_edit_fn Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback. ### add_item_changed_fn Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback. ### append_child_item Creates a new item from the value model and appends it to the list of the children of the given item. ### begin_edit ### omni.ui.AbstractItemModel.begin_edit - **Description:** Called when the user starts the editing. If it’s a field, this method is called when the user activates the field and places the cursor inside. ### omni.ui.AbstractItemModel.can_item_have_children - **Description:** Returns true if the item can have children. In this way the delegate usually draws +/- icon. - **Arguments:** - `id :` The item to request children from. If it’s null, the children of root will be returned. ### omni.ui.AbstractItemModel.drop - **Description:** Overloaded function. - 1. drop(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, item_source: omni.ui._ui.AbstractItem, drop_location: int = -1) -> None - **Description:** Called when the user droped one item to another. - 2. drop(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, source: str, drop_location: int = -1) -> None - **Description:** Called when the user droped a string to the item. ### omni.ui.AbstractItemModel.drop_accepted - **Description:** Overloaded function. - 1. drop_accepted(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, item_source: omni.ui._ui.AbstractItem, drop_location: int = -1) -> bool - **Description:** Called to determine if the model can perform drag and drop to the given item. If this method returns false, the widget shouldn’t highlight the visual element that represents this item. - 2. drop_accepted(self: omni.ui._ui.AbstractItemModel, item_tagget: omni.ui._ui.AbstractItem, source: str, drop_location: int = -1) -> bool - **Description:** Called to determine if the model can perform drag and drop of the given string to the given item. If this method returns false, the widget shouldn’t highlight the visual element that represents this item. ### omni.ui.AbstractItemModel.end_edit - **Description:** (No description provided in the HTML source) ### omni.ui.AbstractItemModel.end_edit - **Description**: Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo. ### omni.ui.AbstractItemModel.get_drag_mime_data - **Description**: Returns Multipurpose Internet Mail Extensions (MIME) for drag and drop. ### omni.ui.AbstractItemModel.get_item_children - **Description**: Returns the vector of items that are nested to the given parent item. - **Arguments**: - `id :` - **Description**: The item to request children from. If it’s null, the children of root will be returned. ### omni.ui.AbstractItemModel.get_item_value_model - **Description**: (To be continued...) <span class="pre"> None </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> column_id </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> omni.ui._ui.AbstractValueModel </span> </span> </span> </dt> <dd> <p> Get the value model associated with this item. </p> <p> ### Arguments: </p> <blockquote> <div> <dl class="simple"> <dt> `item :` </dt> <dd> <p> The item to request the value model from. If it’s null, the root value model will be returned. </p> </dd> <dt> `index :` </dt> <dd> <p> The column number to get the value model. </p> </dd> </dl> </div> </blockquote> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractItemModel.get_item_value_model_count"> <span class="sig-name descname"> <span class="pre"> get_item_value_model_count </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.AbstractItemModel </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> item </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.AbstractItem </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> None </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> int </span> </span> </span> </dt> <dd> <p> Returns the number of columns this model item contains. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractItemModel.remove_begin_edit_fn"> <span class="sig-name descname"> <span class="pre"> remove_begin_edit_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.AbstractItemModel </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg0 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Remove the callback by its id. </p> <p> ### Arguments: </p> <blockquote> <div> <dl class="simple"> <dt> `id :` </dt> <dd> <p> The id that addBeginEditFn returns. </p> </dd> </dl> </div> </blockquote> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractItemModel.remove_end_edit_fn"> <span class="sig-name descname"> <span class="pre"> remove_end_edit_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.AbstractItemModel </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg0 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Remove the callback by its id. </p> <p> ### Arguments: </p> <blockquote> <div> <dl class="simple"> <dt> `id :` </dt> <dd> <p> The id that addEndEditFn returns. </p> </dd> </dl> </div> </blockquote> </dd> </dl> <dd> <p> Remove the callback by its id. </p> <p> ### Arguments: </p> <blockquote> <div> <dl class="simple"> <dt> `id :` </dt> <dd> <p> The id that addEndEditFn returns. </p> </dd> </dl> </div> </blockquote> </dd> ``` ```markdown <dd> <p> Removes the item from the model. There is no parent here because we assume that the reimplemented model deals with its data and can figure out how to remove this item. </p> </dd> ``` ```markdown <dd> <p> Remove the callback by its id. </p> <p> ### Arguments: </p> <blockquote> <div> <dl class="simple"> <dt> `id :` </dt> <dd> <p> The id that addValueChangedFn returns. </p> </dd> </dl> </div> </blockquote> </dd> ``` ```markdown <dd> <p> Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback. </p> </dd> ``` ```markdown <dd> <p> Adds the function that will be called every time the user ends the editing. The id of the callback that is used to remove the callback. </p> </dd> ### Methods #### subscribe_end_edit_fn ```python subscribe_end_edit_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem, None], None]) -> carb._carb.Subscription ``` Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback. #### subscribe_item_changed_fn ```python subscribe_item_changed_fn(self: omni.ui._ui.AbstractItemModel, arg0: Callable[[omni.ui._ui.AbstractItemModel, omni.ui._ui.AbstractItem, None], None]) -> carb._carb.Subscription ``` Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback. ``` ### Description Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback. Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback.
omni.ui.AbstractMultiField.md
# AbstractMultiField AbstractMultiField is the abstract class that has everything to create a custom widget per model item. The class that wants to create multiple widgets per item needs to reimplement the method _createField. ## Methods - `__init__(*args, **kwargs)` ## Attributes - `column_count` - The max number of fields in a line. - `h_spacing` - Sets a non-stretchable horizontal space in pixels between child fields. - `v_spacing` - Sets a non-stretchable vertical space in pixels between child fields. *args, **kwargs) ### column_count The max number of fields in a line. ### h_spacing Sets a non-stretchable horizontal space in pixels between child fields. ### v_spacing Sets a non-stretchable vertical space in pixels between child fields.
omni.ui.AbstractSlider.md
# AbstractSlider ## AbstractSlider The abstract widget that is base for drags and sliders. ### Methods - `__init__(*args, **kwargs)` ### Attributes ``` ``` - `__init__(*args, **kwargs)` ``` ```
omni.ui.AbstractValueModel.md
# AbstractValueModel ## Methods - `__init__(self)` - Constructs AbstractValueModel. - `add_begin_edit_fn(self, arg0)` - Adds the function that will be called every time the user starts the editing. - `add_end_edit_fn(self, arg0)` - Adds the function that will be called every time the user finishes the editing. - `add_value_changed_fn(self, arg0)` - Adds the function that will be called every time the value changes. - `begin_edit(self)` - Called when the user starts the editing. - `end_edit(self)` - Called when the user finishes the editing. | Method | Description | |--------|-------------| | `get_value_as_bool(self)` | Return the bool representation of the value. | | `get_value_as_float(self)` | Return the float representation of the value. | | `get_value_as_int(self)` | Return the int representation of the value. | | `get_value_as_string(self)` | Return the string representation of the value. | | `remove_begin_edit_fn(self, arg0)` | Remove the callback by its id. | | `remove_end_edit_fn(self, arg0)` | Remove the callback by its id. | | `remove_value_changed_fn(self, arg0)` | Remove the callback by its id. | | `set_value(*args, **kwargs)` | Overloaded function. | | `subscribe_begin_edit_fn(self, arg0)` | Adds the function that will be called every time the user starts the editing. | | `subscribe_end_edit_fn(self, arg0)` | Adds the function that will be called every time the user finishes the editing. | | `subscribe_item_changed_fn(self, arg0)` | | | `subscribe_value_changed_fn(self, arg0)` | Adds the function that will be called every time the value changes. | ### Attributes | Attribute | Description | |-----------|-------------| | `as_bool` | Return the bool representation of the value. | | `as_float` | Return the float representation of the value. | | `as_int` | Return the int representation of the value. | | Method | Description | |--------|-------------| | `as_int` | Return the int representation of the value. | | `as_string` | Return the string representation of the value. | ### __init__ Constructs AbstractValueModel. #### Keyword Arguments: - `kwargs dict` - See below ### add_begin_edit_fn Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback. ### add_end_edit_fn Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback. ### add_value_changed_fn ### add_value_changed_fn ```python add_value_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None]) -> int ``` Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback. ### begin_edit ```python begin_edit(self: omni.ui._ui.AbstractValueModel) -> None ``` Called when the user starts the editing. If it’s a field, this method is called when the user activates the field and places the cursor inside. This method should be reimplemented. ### end_edit ```python end_edit(self: omni.ui._ui.AbstractValueModel) -> None ``` Called when the user finishes the editing. If it’s a field, this method is called when the user presses Enter or selects another field for editing. It’s useful for undo/redo. This method should be reimplemented. ### get_value_as_bool ```python get_value_as_bool(self: omni.ui._ui.AbstractValueModel) -> bool ``` Return the bool representation of the value. ### get_value_as_float ```python get_value_as_float(self: omni.ui._ui.AbstractValueModel) -> float ``` Return the float representation of the value. <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractValueModel.get_value_as_float"> <span class="sig-name descname"> <span class="pre"> get_value_as_float </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.AbstractValueModel </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> float </span> </span> </span> </dt> <dd> <p> Return the float representation of the value. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractValueModel.get_value_as_int"> <span class="sig-name descname"> <span class="pre"> get_value_as_int </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.AbstractValueModel </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> int </span> </span> </span> </dt> <dd> <p> Return the int representation of the value. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractValueModel.get_value_as_string"> <span class="sig-name descname"> <span class="pre"> get_value_as_string </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.AbstractValueModel </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> str </span> </span> </span> </dt> <dd> <p> Return the string representation of the value. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractValueModel.remove_begin_edit_fn"> <span class="sig-name descname"> <span class="pre"> remove_begin_edit_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.AbstractValueModel </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg0 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Remove the callback by its id. </p> <p> ### Arguments: </p> <blockquote> <div> <dl class="simple"> <dt> `id :` </dt> <dd> <p> The id that addBeginEditFn returns. </p> </dd> </dl> </div> </blockquote> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractValueModel.remove_end_edit_fn"> <span class="sig-name descname"> <span class="pre"> remove_end_edit_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.AbstractValueModel </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg0 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Remove the callback by its id. </p> <p> ### Arguments: </p> <blockquote> <div> <dl class="simple"> <dt> `id :` </dt> <dd> <p> The id that addEndEditFn returns. </p> </dd> </dl> </div> </blockquote> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.AbstractValueModel.remove_value_changed_fn"> <span class="sig-name descname"> <span class="pre"> remove_value_changed_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.AbstractValueModel </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg0 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Remove the callback by its id. </p> <p> ### Arguments: </p> <blockquote> <div> <dl class="simple"> <dt> `id :` </dt> <dd> <p> The id that addValueChangedFn returns. </p> </dd> </dl> </div> </blockquote> </dd> </dl> ### omni.ui.AbstractValueModel.remove_value_changed_fn Remove the callback by its id. #### Arguments: > The id that addValueChangedFn returns. ### omni.ui.AbstractValueModel.set_value Overloaded function. 1. set_value(self: omni.ui._ui.AbstractValueModel, value: bool) -> None 2. set_value(self: omni.ui._ui.AbstractValueModel, value: int) -> None 3. set_value(self: omni.ui._ui.AbstractValueModel, value: float) -> None 4. set_value(self: omni.ui._ui.AbstractValueModel, value: str) -> None Set the value. ### omni.ui.AbstractValueModel.subscribe_begin_edit_fn Adds the function that will be called every time the user starts the editing. The id of the callback that is used to remove the callback. ### omni.ui.AbstractValueModel.subscribe_end_edit_fn Adds the function that will be called every time the user ends the editing. The id of the callback that is used to remove the callback. ### omni.ui.AbstractValueModel.subscribe_end_edit_fn ```python subscribe_end_edit_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None]) -> carb._carb.Subscription ``` Adds the function that will be called every time the user finishes the editing. The id of the callback that is used to remove the callback. ### omni.ui.AbstractValueModel.subscribe_item_changed_fn ```python subscribe_item_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel, None]]) -> carb._carb.Subscription ``` ### omni.ui.AbstractValueModel.subscribe_value_changed_fn ```python subscribe_value_changed_fn(self: omni.ui._ui.AbstractValueModel, arg0: Callable[[omni.ui._ui.AbstractValueModel], None]) -> carb._carb.Subscription ``` Adds the function that will be called every time the value changes. The id of the callback that is used to remove the callback. ### omni.ui.AbstractValueModel.as_bool ``` property as_bool ``` Return the bool representation of the value. ### omni.ui.AbstractValueModel.as_float ``` property as_float ``` Return the float representation of the value. ### omni.ui.AbstractValueModel.as_int ``` property as_int ``` Return the int representation of the value. ### omni.ui.AbstractValueModel.as_string ``` property as_string ``` <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> as_string </span> </span> </dt> <dd> <p> Return the string representation of the value. </p> </dd> </dl> </dd> </dl> </section> </div> </div> </section>
omni.ui.abstract_shade.AbstractShade.md
# AbstractShade ## AbstractShade ``` ``` class omni.ui.abstract_shade.AbstractShade ``` ``` Bases: object ``` ``` The implementation of shades for custom style parameter type. The user has to reimplement methods _store and _find to set/get the value in the specific store. ``` ### Methods | Method | Description | |--------|-------------| | `__init__()` | | | `set_shade(name)` | Set the default shade. | | `shade(default)` | Save the given shade, pick the color and apply it to ui.ColorStore. | ``` __init__() ``` ``` set_shade(name) ``` ``` Set the default shade. ``` ``` shade(default) ``` ``` Save the given shade, pick the color and apply it to ui.ColorStore. ``` ## AbstractShade Methods ### set_shade Set the default shade. ### shade Save the given shade, pick the color and apply it to ui.ColorStore.
omni.ui.abstract_shade.Classes.md
# omni.ui.abstract_shade Classes ## Classes Summary: | Class Name | Description | |------------|-------------| | [AbstractShade](omni.ui.abstract_shade/omni.ui.abstract_shade.AbstractShade.html) | The implementation of shades for custom style parameter type. |
omni.ui.abstract_shade.md
# omni.ui.abstract_shade ## Classes Summary: - **AbstractShade** - The implementation of shades for custom style parameter type.
omni.ui.add_to_namespace.md
# add_to_namespace ## add_to_namespace <class 'omni.ui._ui.CollapsableFrame'>, 'ColorStore': <class 'omni.ui._ui.ColorStore'>, 'ColorWidget': <class 'omni.ui._ui.ColorWidget'>, 'ComboBox': <class 'omni.ui._ui.ComboBox'>, 'Container': <class 'omni.ui._ui.Container'>, 'CornerFlag': <class 'omni.ui._ui.CornerFlag'>, 'Direction': <class 'omni.ui._ui.Direction'>, 'DockPolicy': <class 'omni.ui._ui.DockPolicy'>, 'DockPosition': <class 'omni.ui._ui.DockPosition'>, 'DockPreference': <class 'omni.ui._ui.DockPreference'>, 'DockSpace': <class 'omni.ui._ui.DockSpace'>, 'DynamicTextureProvider': <class 'omni.ui._ui.DynamicTextureProvider'>, 'Ellipse': <class 'omni.ui._ui.Ellipse'>, 'FillPolicy': <class 'omni.ui._ui.FillPolicy'>, 'FloatDrag': <class 'omni.ui._ui.FloatDrag'>, 'FloatField': <class 'omni.ui._ui.FloatField'>, 'FloatSlider': <class 'omni.ui._ui.FloatSlider'>, 'FloatStore': <class 'omni.ui._ui.FloatStore'>, 'FocusPolicy': <class 'omni.ui._ui.FocusPolicy'>, 'FontStyle': <class 'omni.ui._ui.FontStyle'>, 'Fraction': <class 'omni.ui._ui.Fraction'>, 'Frame': <class 'omni.ui._ui.Frame'>, 'FreeBezierCurve': <class 'omni.ui._ui.FreeBezierCurve'>, 'FreeCircle': <class 'omni.ui._ui.FreeCircle'>, 'FreeEllipse': <class 'omni.ui._ui.FreeEllipse'>, 'FreeLine': <class 'omni.ui._ui.FreeLine'>, 'FreeRectangle': <class 'omni.ui._ui.FreeRectangle'>, 'FreeTriangle': <class 'omni.ui._ui.FreeTriangle'>, 'Grid': <class 'omni.ui._ui.Grid'>, 'HGrid': <class 'omni.ui._ui.HGrid'>, 'HStack': <class 'omni.ui._ui.HStack'>, 'Image': <class 'omni.ui._ui.Image'>, 'ImageProvider': <class 'omni.ui._ui.ImageProvider'>, 'ImageWithProvider': <class 'omni.ui._ui.ImageWithProvider'>, 'Inspector': <class 'omni.ui._ui.Inspector'>, 'IntDrag': <class 'omni.ui._ui.IntDrag'>, 'IntField': <class 'omni.ui._ui.IntField'>, 'IntSlider': <class 'omni.ui._ui.IntSlider'>, 'InvisibleButton': <class 'omni.ui._ui.InvisibleButton'>, 'ItemModelHelper': <class 'omni.ui._ui.ItemModelHelper'>, 'IwpFillPolicy': <class 'omni.ui._ui.IwpFillPolicy'>, 'Label': <class 'omni.ui._ui.Label'>, 'Length': <class 'omni.ui._ui.Length'>, 'Line': <class 'omni.ui._ui.Line'>, 'MainWindow': <class 'omni.ui._ui.MainWindow'>, 'Menu': <class 'omni.ui._ui.Menu'>, 'MenuBar': <class 'omni.ui._ui.MenuBar'>, 'MenuDelegate': <class 'omni.ui._ui.MenuDelegate'>, 'MenuHelper': <class 'omni.ui._ui.MenuHelper'>, 'MenuItem': <class 'omni.ui._ui.MenuItem'>, 'MenuItemCollection': <class 'omni.ui._ui.MenuItemCollection'>, 'MultiFloatDragField': <class 'omni.ui._ui.MultiFloatDragField'>, 'MultiFloatField': <class 'omni.ui._ui.MultiFloatField'>, 'MultiIntDragField': <class 'omni.ui._ui.MultiIntDragField'>, 'MultiIntField': <class 'omni.ui._ui.MultiIntField'>, 'MultiStringField': <class 'omni.ui._ui.MultiStringField'>, 'OffsetLine': <class 'omni.ui._ui.OffsetLine'>, 'Optional': typing.Optional, 'Percent': <class 'omni.ui._ui.Percent'>, 'Pixel': <class 'omni.ui._ui.Pixel'>, 'Placer': <class 'omni.ui._ui.Placer'>, 'Plot': <class 'omni.ui._ui.Plot'>, 'ProgressBar': <class 'omni.ui._ui.ProgressBar'>, 'RadioButton': <class 'omni.ui._ui.RadioButton'>, 'RadioCollection': <class 'omni.ui._ui.RadioCollection'>, 'RasterImageProvider': <class 'omni.ui._ui.RasterImageProvider'>, 'RasterPolicy': <class 'omni.ui._ui.RasterPolicy'>, 'Rectangle': <class 'omni.ui._ui.Rectangle'>, 'ScrollBarPolicy': <class 'omni.ui._ui.ScrollBarPolicy'>, 'ScrollingFrame': <class 'omni.ui._ui.ScrollingFrame'>, 'Separator': <class 'omni.ui._ui.Separator'>, 'ShadowFlag': <class 'omni.ui._ui.ShadowFlag'>, 'Shape': <class 'omni.ui._ui.Shape'>, 'ShapeAnchorHelper': <class 'omni.ui._ui.ShapeAnchorHelper'>, 'SimpleBoolModel': <class 'omni.ui._ui.SimpleBoolModel'>, 'SimpleFloatModel': <class 'omni.ui._ui.SimpleFloatModel'>, 'SimpleIntModel': <class 'omni.ui._ui.SimpleIntModel'>, 'SimpleStringModel': <class 'omni.ui._ui.SimpleStringModel'>, 'SliderDrawMode': <class 'omni.ui._ui.SliderDrawMode'>, 'Spacer': <class 'omni.ui._ui.Spacer'>, 'Stack': <class 'omni.ui._ui.Stack'>, 'StringField': <class 'omni.ui._ui.StringField'>, 'omni.ui._ui.StringField'>, 'StringStore': <class 'omni.ui._ui.StringStore'>, 'Style': <class 'omni.ui._ui.Style'>, 'TextureFormat': <class 'omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat'>, 'ToolBar': <class 'omni.ui._ui.ToolBar'>, 'ToolBarAxis': <class 'omni.ui._ui.ToolBarAxis'>, 'ToolButton': <class 'omni.ui._ui.ToolButton'>, 'TreeView': <class 'omni.ui._ui.TreeView'>, 'Triangle': <class 'omni.ui._ui.Triangle'>, 'Type': <class 'omni.ui._ui.Type'>, 'UIPreferencesExtension': <class 'omni.ui.extension.UIPreferencesExtension'>, 'UIntDrag': <class 'omni.ui._ui.UIntDrag'>, 'UIntSlider': <class 'omni.ui._ui.UIntSlider'>, 'UnitType': <class 'omni.ui._ui.UnitType'>, 'VGrid': <class 'omni.ui._ui.VGrid'>, 'VStack': <class 'omni.ui._ui.VStack'>, 'ValueModelHelper': <class 'omni.ui._ui.ValueModelHelper'>, 'VectorImageProvider': <class 'omni.ui._ui.VectorImageProvider'>, 'WINDOW_FLAGS_FORCE_HORIZONTAL_SCROLLBAR': 32768, 'WINDOW_FLAGS_FORCE_VERTICAL_SCROLLBAR': 16384, 'WINDOW_FLAGS_MENU_BAR': 1024, 'WINDOW_FLAGS_MODAL': 134217728, 'WINDOW_FLAGS_NONE': 0, 'WINDOW_FLAGS_NO_BACKGROUND': 128, 'WINDOW_FLAGS_NO_CLOSE': 2147483648, 'WINDOW_FLAGS_NO_COLLAPSE': 32, 'WINDOW_FLAGS_NO_DOCKING': 2097152, 'WINDOW_FLAGS_NO_FOCUS_ON_APPEARING': 4096, 'WINDOW_FLAGS_NO_MOUSE_INPUTS': 512, 'WINDOW_FLAGS_NO_MOVE': 4, 'WINDOW_FLAGS_NO_RESIZE': 2, 'WINDOW_FLAGS_NO_SAVED_SETTINGS': 256, 'WINDOW_FLAGS_NO_SCROLLBAR': 8, 'WINDOW_FLAGS_NO_SCROLL_WITH_MOUSE': 16, 'WINDOW_FLAGS_NO_TITLE_BAR': 1, 'WINDOW_FLAGS_POPUP': 67108864, 'WINDOW_FLAGS_SHOW_HORIZONTAL_SCROLLBAR': 2048, 'Widget': <class 'omni.ui._ui.Widget'>, 'WidgetMouseDropEvent': <class 'omni.ui._ui.WidgetMouseDropEvent'>, 'Window': <class 'omni.ui._ui.Window'>, 'WindowHandle': <class 'omni.ui._ui.WindowHandle'>, 'Workspace': <class 'omni.ui._ui.Workspace'>, 'ZStack': <class 'omni.ui._ui.ZStack'>, '__builtins__': {'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': 'BlockingIOError': &lt;class 'BlockingIOError'&gt;, 'BrokenPipeError': &lt;class 'BrokenPipeError'&gt;, 'BufferError': &lt;class 'BufferError'&gt;, 'BytesWarning': &lt;class 'BytesWarning'&gt;, 'ChildProcessError': &lt;class 'ChildProcessError'&gt;, 'ConnectionAbortedError': &lt;class 'ConnectionAbortedError'&gt;, 'ConnectionError': &lt;class 'ConnectionError'&gt;, 'ConnectionRefusedError': &lt;class 'ConnectionRefusedError'&gt;, 'ConnectionResetError': &lt;class 'ConnectionResetError'&gt;, 'DeprecationWarning': &lt;class 'DeprecationWarning'&gt;, 'EOFError': &lt;class 'EOFError'&gt;, 'Ellipsis': Ellipsis, 'EncodingWarning': &lt;class 'EncodingWarning'&gt;, 'EnvironmentError': &lt;class 'OSError'&gt;, 'Exception': &lt;class 'Exception'&gt;, 'False': False, 'FileExistsError': &lt;class 'FileExistsError'&gt;, 'FileNotFoundError': &lt;class 'FileNotFoundError'&gt;, 'FloatingPointError': &lt;class 'FloatingPointError'&gt;, 'FutureWarning': &lt;class 'FutureWarning'&gt;, 'GeneratorExit': &lt;class 'GeneratorExit'&gt;, 'IOError': &lt;class 'OSError'&gt;, 'ImportError': &lt;class 'ImportError'&gt;, 'ImportWarning': &lt;class 'ImportWarning'&gt;, 'IndentationError': &lt;class 'IndentationError'&gt;, 'IndexError': &lt;class 'IndexError'&gt;, 'InterruptedError': &lt;class 'InterruptedError'&gt;, 'IsADirectoryError': &lt;class 'IsADirectoryError'&gt;, 'KeyError': &lt;class 'KeyError'&gt;, 'KeyboardInterrupt': &lt;class 'KeyboardInterrupt'&gt;, 'LookupError': &lt;class 'LookupError'&gt;, 'MemoryError': &lt;class 'MemoryError'&gt;, 'ModuleNotFoundError': &lt;class 'ModuleNotFoundError'&gt;, 'NameError': &lt;class 'NameError'&gt;, 'None': None, 'NotADirectoryError': &lt;class 'NotADirectoryError'&gt;, 'NotImplemented': NotImplemented, 'NotImplementedError': &lt;class 'NotImplementedError'&gt;, 'OSError': &lt;class 'OSError'&gt;, 'OverflowError': &lt;class 'OverflowError'&gt;, 'PendingDeprecationWarning': &lt;class 'PendingDeprecationWarning'&gt;, 'PermissionError': &lt;class 'PermissionError'&gt;, 'ProcessLookupError': &lt;class 'ProcessLookupError'&gt;, 'RecursionError': <class 'RecursionError'>, 'ReferenceError': <class 'ReferenceError'>, 'ResourceWarning': <class 'ResourceWarning'>, 'RuntimeError': <class 'RuntimeError'>, 'RuntimeWarning': <class 'RuntimeWarning'>, 'StopAsyncIteration': <class 'StopAsyncIteration'>, 'StopIteration': <class 'StopIteration'>, 'SyntaxError': <class 'SyntaxError'>, 'SyntaxWarning': <class 'SyntaxWarning'>, 'SystemError': <class 'SystemError'>, 'SystemExit': <class 'SystemExit'>, 'TabError': <class 'TabError'>, 'TimeoutError': <class 'TimeoutError'>, 'True': True, 'TypeError': <class 'TypeError'>, 'UnboundLocalError': <class 'UnboundLocalError'>, 'UnicodeDecodeError': <class 'UnicodeDecodeError'>, 'UnicodeEncodeError': <class 'UnicodeEncodeError'>, 'UnicodeError': <class 'UnicodeError'>, 'UnicodeTranslateError': <class 'UnicodeTranslateError'>, 'UnicodeWarning': <class 'UnicodeWarning'>, 'UserWarning': <class 'UserWarning'>, 'ValueError': <class 'ValueError'>, 'Warning': <class 'Warning'>, 'ZeroDivisionError': <class 'ZeroDivisionError'>, '__build_class__': <built-in function __build_class__>, '__debug__': True, '__doc__': "Built-in functions, exceptions, and other objects.\n\nNoteworthy: None is the `nil' object; Ellipsis represents `...' in slices.", '__import__': <built-in function __import__>, '__loader__': <class '_frozen_importlib.BuiltinImporter'>, '__name__': 'builtins', '__package__': '', '__pybind11_internals_v4_gcc_libstdcpp_cxxabi1011__': <capsule object NULL>, '__spec__': ModuleSpec(name='builtins', loader=<class '_frozen_importlib.BuiltinImporter'>, origin='built-in'), 'abs': <built-in function abs>, 'aiter': <built-in function aiter>, 'all': <built-in function all>, function all>, 'anext': <built-in function anext>, 'any': <built-in function any>, 'ascii': <built-in function ascii>, 'bin': <built-in function bin>, 'bool': <class 'bool'>, 'breakpoint': <built-in function breakpoint>, 'bytearray': <class 'bytearray'>, 'bytes': <class 'bytes'>, 'callable': <built-in function callable>, 'chr': <built-in function chr>, 'classmethod': <class 'classmethod'>, 'compile': <built-in function compile>, 'complex': <class 'complex'>, 'copyright': Copyright (c) 2001-2022 Python Software Foundation. All Rights Reserved. Copyright (c) 2000 BeOpen.com. All Rights Reserved. Copyright (c) 1995-2001 Corporation for National Research Initiatives. All Rights Reserved. Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam. All Rights Reserved., 'credits': Thanks to CWI, CNRI, BeOpen.com, Zope Corporation and a cast of thousands for supporting Python development. See www.python.org for more information., 'delattr': <built-in function delattr>, 'dict': <class 'dict'>, 'dir': <built-in function dir>, 'divmod': <built-in function divmod>, 'enumerate': <class 'enumerate'>, 'eval': <built-in function eval>, 'exec': <built-in function exec>, 'exit': Use exit() or Ctrl-D (i.e. EOF) to exit, 'filter': <class 'filter'>, 'float': <class 'float'>, 'format': <built-in function format>, 'frozenset': <class 'frozenset'>, 'getattr': <built-in function getattr>, 'globals': <built-in function globals>, 'hasattr': <built-in function hasattr>, 'hash': <built-in function hash>, 'help': Type help() for interactive help, or help(object) for help about object., 'hex': <built-in function hex>, 'id': <built-in function id>, 'input': <built-in function input>, 'int': <class 'int'>, 'isinstance': <built-in function isinstance>, 'issubclass': <built-in function issubclass>, 'iter': <built-in function iter>, 'len': <built-in function len>, 'license': Type license() to see the full license text, 'list': <class 'list'>, 'locals': <built-in function locals>, 'map': <class 'map'>, 'max': <built-in function max>, 'memoryview': <class 'memoryview'>, 'min': <built-in function min>, 'next': <built-in function next>, 'object': <class 'object'>, 'oct': <built-in function oct>, 'open': <built-in function open>, 'ord': <built-in function ord>, 'pow': <built-in function pow>, 'print': <built-in function print> print&gt;, 'property': &lt;class 'property'&gt;, 'quit': Use quit() or Ctrl-D (i.e. EOF) to exit, 'range': &lt;class 'range'&gt;, 'repr': &lt;built-in function repr&gt;, 'reversed': &lt;class 'reversed'&gt;, 'round': &lt;built-in function round&gt;, 'set': &lt;class 'set'&gt;, 'setattr': &lt;built-in function setattr&gt;, 'slice': &lt;class 'slice'&gt;, 'sorted': &lt;built-in function sorted&gt;, 'staticmethod': &lt;class 'staticmethod'&gt;, 'str': &lt;class 'str'&gt;, 'sum': &lt;built-in function sum&gt;, 'super': &lt;class 'super'&gt;, 'tuple': &lt;class 'tuple'&gt;, 'type': &lt;class 'type'&gt;, 'vars': &lt;built-in function vars&gt;, 'zip': &lt;class 'zip'&gt;}, '__cached__': '/builds/omniverse/kit/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui/__pycache__/__init__.cpython-310.pyc', '__doc__': '\nOmni::UI\n--------\n\nOmni::UI is Omniverse's UI toolkit for creating beautiful and flexible graphical user interfaces\nin the Kit extensions. Omni::UI provides the basic types necessary to create rich extensions with\na fluid and dynamic user interface in Omniverse Kit. It gives a layout system and includes\nwidgets for creating visual components, receiving user input, and creating data models. It allows\nuser interface components to be built around their behavior and enables a' declarative flavor of\ndescribing the layout of the application. Omni::UI gives a very flexible styling system that\nallows deep customizing the final look of the application. Typical Example --------------- Typical example to create a window with two buttons: ```code-block import omni.ui as ui _window_example = ui.Window("Example Window", width=300, height=300) with _window_example.frame: with ui.VStack(): ui.Button("click me") def move_me(window): window.setPosition(200, 200) def size_me(window): window.width = 300 window.height = 300 ui.Button("Move to (200,200)", clicked_fn=lambda w=self._window_example: move_me(w)) ui.Button("Set size (300,300)", clicked_fn=lambda w=self._window_example: size_me(w)) Detailed Documentation ---------------------- Omni::UI is shipped with the developer documentation that is written with Omni::UI. For detailed documentation, please see `omni.example.ui` extension. It has detailed descriptions of all the classes, best practices, and real-world usage examples. Layout ------ * Arrangement of elements * :class:`omni.ui.CollapsableFrame` * :class:`omni.ui.Frame` * :class:`omni.ui.HStack` * :class:`omni.ui.Placer` * :class:`omni.ui.ScrollingFrame` * :class:`omni.ui.Spacer` * :class:`omni.ui.VStack` * :class:`omni.ui.ZStack` * Lengths * :class:`omni.ui.Fraction` * :class:`omni.ui.Percent` * :class:`omni.ui.Pixel` Widgets ------- * Base Widgets ``` * :class:`omni.ui.Button` * :class:`omni.ui.Image` * :class:`omni.ui.Label` * Shapes * :class:`omni.ui.Circle` * :class:`omni.ui.Line` * :class:`omni.ui.Rectangle` * :class:`omni.ui.Triangle` * Menu * :class:`omni.ui.Menu` * :class:`omni.ui.MenuItem` * Model-View Widgets * :class:`omni.ui.AbstractItemModel` * :class:`omni.ui.AbstractValueModel` * :class:`omni.ui.CheckBox` * :class:`omni.ui.ColorWidget` * :class:`omni.ui.ComboBox` * :class:`omni.ui.RadioButton` * :class:`omni.ui.RadioCollection` * :class:`omni.ui.TreeView` * Model-View Fields * :class:`omni.ui.FloatField` * :class:`omni.ui.IntField` * :class:`omni.ui.MultiField` * :class:`omni.ui.StringField` * Model-View Drags and Sliders * :class:`omni.ui.FloatDrag` * :class:`omni.ui.FloatSlider` * :class:`omni.ui.IntDrag` * :class:`omni.ui.IntSlider` * Model-View ProgressBar * :class:`omni.ui.ProgressBar` * Windows * :class:`omni.ui.ToolBar` * :class:`omni.ui.Window` * :class:`omni.ui.Workspace` * Web * :class:`omni.ui.WebViewWidget` <em> { 'constant_utils': &lt;module 'omni.ui.constant_utils' from '/builds/omniverse/kit/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui/constant_utils.py'&gt;, 'dock_window_in_window': &lt;built-in method dock_window_in_window of PyCapsule object&gt;, 'extension': &lt;module 'omni.ui.extension' from '/builds/omniverse/kit/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui/extension.py'&gt;, 'get_custom_glyph_code': &lt;built-in method get_custom_glyph_code of PyCapsule object&gt;, 'get_main_window_height': &lt;built-in method get_main_window_height of PyCapsule object&gt;, 'get_main_window_width': &lt;built-in method get_main_window_width of PyCapsule object&gt;, 'omni': &lt;module 'omni' (&lt;_frozen_importlib_external._NamespaceLoader object&gt;)&gt;, 'set_menu_delegate': &lt;function set_menu_delegate&gt;, 'set_shade': &lt;function set_shade&gt;, 'singleton': &lt;module 'omni.ui.singleton' from '/builds/omniverse/kit/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui/singleton.py'&gt;, 'style': &lt;omni.ui._ui.Style object&gt;, 'style_utils': &lt;module 'omni.ui.style_utils' from '/builds/omniverse/kit/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui/style_utils.py'&gt;, 'url': &lt;omni.ui.url_utils.StringShade object&gt;, 'url_utils': &lt;module 'omni.ui.url_utils' from '/builds/omniverse/kit/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui/url_utils.py'&gt;, 'workspace_utils': &lt;module 'omni.ui.workspace_utils' from '/builds/omniverse/kit/kit/_build/linux-x86_64/release/exts/omni.ui/omni/ui/workspace_utils.py'&gt; } </em>
omni.ui.Alignment.md
# Alignment ## Class omni.ui.Alignment Bases: `pybind11_object` Members: - UNDEFINED - LEFT_TOP - LEFT_CENTER - LEFT_BOTTOM - CENTER_TOP - CENTER - CENTER_BOTTOM - RIGHT_TOP - RIGHT_CENTER - RIGHT_BOTTOM - LEFT - RIGHT - H_CENTER - TOP - BOTTOM - V_CENTER ### Methods - `__init__(self, value)` ### Attributes - `BOTTOM` - `CENTER` - `CENTER_BOTTOM` - `CENTER_TOP` - `H_CENTER` - `LEFT` - `LEFT_BOTTOM` - `LEFT_CENTER` - `LEFT_TOP` - `RIGHT` - `RIGHT_BOTTOM` - `RIGHT_CENTER` - `RIGHT_TOP` - `TOP` - `UNDEFINED` - `V_CENTER` <p> LEFT </p> <p> LEFT_BOTTOM </p> <p> LEFT_CENTER </p> <p> LEFT_TOP </p> <p> RIGHT </p> <p> RIGHT_BOTTOM </p> <p> RIGHT_CENTER </p> <p> RIGHT_TOP </p> <p> TOP </p> <p> UNDEFINED </p> <p> V_CENTER </p> <p> name </p> <p> value </p> <dl> <dt> __init__(self: omni.ui._ui.Alignment, value: int) -> None </dt> </dl> <dl> <dt> property name </dt> </dl>
omni.ui.ArrowHelper.md
# ArrowHelper ## Class: omni.ui.ArrowHelper The ArrowHelper widget provides a colored rectangle to display. ### Methods - `__init__(*args, **kwargs)` ### Attributes - `begin_arrow_height` - This property holds the height of the begin arrow. - `begin_arrow_type` - This property holds the type of the begin arrow can only be eNone or eRrrow. - `begin_arrow_width` - This property holds the width of the begin arrow. - `end_arrow_height` - This property holds the height of the end arrow. - `end_arrow_type` - This property holds the type of the end arrow can only be eNone or eRrrow. <p> This property holds the type of the end arrow can only be eNone or eRrrow. </p> <p> <code>end_arrow_width</code> </p> <p> This property holds the width of the end arrow. </p> <dl> <dt> <code>__init__(*args, **kwargs)</code> </dt> <dd></dd> </dl> <dl> <dt> <em>property</em> <code>begin_arrow_height</code> </dt> <dd> <p> This property holds the height of the begin arrow. </p> </dd> </dl> <dl> <dt> <em>property</em> <code>begin_arrow_type</code> </dt> <dd> <p> This property holds the type of the begin arrow can only be eNone or eRrrow. By default, the arrow type is eNone. </p> </dd> </dl> <dl> <dt> <em>property</em> <code>begin_arrow_width</code> </dt> <dd> <p> This property holds the width of the begin arrow. </p> </dd> </dl> <dl> <dt> <em>property</em> <code>end_arrow_height</code> </dt> <dd> <p> This property holds the height of the end arrow. </p> </dd> </dl> <dl> <dt> <em>property</em> <code>end_arrow_type</code> </dt> <dd> <p> This property holds the type of the end arrow can only be eNone or eRrrow. By default, the arrow type is eNone. </p> </dd> </dl> <dl> <dt> <em>property</em> <code>end_arrow_width</code> </dt> <dd> <p> This property holds the width of the end arrow. </p> </dd> </dl>
omni.ui.ArrowType.md
# ArrowType ## Overview The `ArrowType` class is a part of the `omni.ui` module, inheriting from `pybind11_object`. It defines two main members: `NONE` and `ARROW`. ### Members - **NONE** - **ARROW** ### Methods | Method | Description | |--------|-------------| | `__init__(self, value)` | Initializes the `ArrowType` object. | ### Attributes | Attribute | Description | |-----------|-------------| | `ARROW` | | | `NONE` | | | `name` | | | `value` | | ### `__init__` Method - **Parameters**: - `self`: The instance of the `ArrowType` class. - `value`: The value to initialize the `ArrowType` object. : int ) → None property name
omni.ui.Axis.md
# Axis ## Axis - Bases: `pybind11_object` ### Members: - None - X - Y - XY ### Methods | Method | Description | | --- | --- | | `__init__(self, value)` | | ### Attributes | Attribute | Description | | --- | --- | | `None` | | | `X` | | | `XY` | | | `Y` | | | `name` | | | `value` | | ## __init__ `__init__(self, value)` **omni.ui._ui.Axis**(self, value: int) -> None property name
omni.ui.BezierCurve.md
# BezierCurve ## BezierCurve ```python class omni.ui.BezierCurve ``` Smooth curve that can be scaled infinitely. ### Methods ```python __init__(self, **kwargs) ``` Initialize the curve. ```python call_mouse_hovered_fn(self, arg0) ``` Sets the function that will be called when the user uses mouse enter/leave on the line. ```python has_mouse_hovered_fn(self) ``` Sets the function that will be called when the user uses mouse enter/leave on the line. ```python set_mouse_hovered_fn(self, fn) ``` Sets the function that will be called when the user uses mouse enter/leave on the line. ### Attributes ``` <p> end_tangent_height </p> <p> This property holds the Y coordinate of the end of the curve relative to the width bound of the curve. </p> <p> end_tangent_width </p> <p> This property holds the X coordinate of the end of the curve relative to the width bound of the curve. </p> <p> start_tangent_height </p> <p> This property holds the Y coordinate of the start of the curve relative to the width bound of the curve. </p> <p> start_tangent_width </p> <p> This property holds the X coordinate of the start of the curve relative to the width bound of the curve. </p> <dl> <dt> __init__ ( <em> self : omni.ui._ui.BezierCurve </em> , <em> **kwargs </em> ) <span> → None </span> </dt> <dd> <p> Initialize the curve. </p> <blockquote> <div> <dl> <dt> kwargs dict </dt> <dd> <p> See below </p> </dd> </dl> </div> </blockquote> <p> ### Keyword Arguments: </p> <p> start_tangent_width: This property holds the X coordinate of the start of the curve relative to the width bound of the curve. </p> <p> start_tangent_height: This property holds the Y coordinate of the start of the curve relative to the width bound of the curve. </p> <p> end_tangent_width: This property holds the X coordinate of the end of the curve relative to the width bound of the curve. </p> <p> end_tangent_height: This property holds the Y coordinate of the end of the curve relative to the width bound of the curve. </p> <p> set_mouse_hovered_fn: Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered) </p> <blockquote> <div> <dl> <dt> width ui.Length </dt> <dd> <p> This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. </p> </dd> <dt> height ui.Length </dt> <dd> <p> This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. </p> </dd> <dt> name str </dt> <dd> <p> The name of the widget that user can set. </p> </dd> <dt> style_type_name_override str </dt> <dd> <p> By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. </p> </dd> <dt> identifier str </dt> <dd> <p> An optional identifier of the widget we can use to refer to it in queries. </p> </dd> <dt> visible bool </dt> <dd> <p> This property holds whether the widget is visible. </p> </dd> <dt> visibleMin float </dt> <dd> <p> If the current zoom factor and DPI is less than this value, the widget is not visible. </p> </dd> <dt> visibleMax float </dt> <dd> <p> If the current zoom factor and DPI is bigger than this value, the widget is not visible. </p> </dd> <dt> tooltip str </dt> <dd> <p> Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style </p> </dd> <dt> tooltip_fn Callable </dt> <dd> <p> Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. </p> </dd> </dl> </div> </blockquote> </dd> </dl> ### Properties - **tooltip_offset_x** *(float)* - Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. - **tooltip_offset_y** *(float)* - Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. - **enabled** *(bool)* - This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. - **selected** *(bool)* - This property holds a flag that specifies the widget has to use eSelected state of the style. - **checked** *(bool)* - This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. - **dragging** *(bool)* - This property holds if the widget is being dragged. - **opaque_for_mouse_events** *(bool)* - If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either - **skip_draw_when_clipped** *(bool)* - The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. - **mouse_moved_fn** *(Callable)* - Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) - **mouse_pressed_fn** *(Callable)* - Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. - **mouse_released_fn** *(Callable)* - Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) - **mouse_double_clicked_fn** *(Callable)* - Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) - **mouse_wheel_fn** *(Callable)* - Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) - **mouse_hovered_fn** *(Callable)* - Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) - **drag_fn** *(Callable)* - Specify that this Widget is draggable, and set the callback that is attached to the drag operation. - **accept_drop_fn** *(Callable)* - Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. - **drop_fn** *(Callable)* - Specify that this Widget accepts drops and set the callback to the drop operation. - **computed_content_size_changed_fn** *(Callable)* - Called when the size of the widget is changed. - **anchor_position** - This property holds the parametric value of the curve anchor. - **anchor_alignment** - This property holds the Alignment of the curve anchor. - **set_anchor_fn** *(Callable)* - Sets the function that will be called for the curve anchor. - **invalidate_anchor** - Function that causes the anchor frame to be redrawn. - **get_closest_parametric_position** - Function that returns the closest parametric T value to a given x,y position. ``` ### Methods - **call_mouse_hovered_fn** - Description of the method. ### omni.ui.BezierCurve.call_mouse_hovered_fn ```python def call_mouse_hovered_fn(self: omni.ui._ui.BezierCurve, arg0: bool) -> None ``` Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered) ### omni.ui.BezierCurve.has_mouse_hovered_fn ```python def has_mouse_hovered_fn(self: omni.ui._ui.BezierCurve) -> bool ``` Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered) ### omni.ui.BezierCurve.set_mouse_hovered_fn ```python def set_mouse_hovered_fn(self: omni.ui._ui.BezierCurve, fn: Callable[[bool], None]) -> None ``` Sets the function that will be called when the user use mouse enter/leave on the line. It’s the override to prevent Widget from the bounding box logic. The function specification is: void onMouseHovered(bool hovered) ### omni.ui.BezierCurve.end_tangent_height ``` property end_tangent_height ``` This property holds the Y coordinate of the end of the curve relative to the width bound of the curve. ### omni.ui.BezierCurve.end_tangent_width ``` property end_tangent_width ``` This property holds the X coordinate of the end of the curve relative to the width bound of the curve. ### omni.ui.BezierCurve.start_tangent_height ``` property start_tangent_height ``` This property holds the Y coordinate of the start of the curve relative to the width bound of the curve. ### omni.ui.BezierCurve.start_tangent_width ``` property start_tangent_width ``` This property holds the X coordinate of the start of the curve relative to the width bound of the curve. <section> <div> <div> <section> <dl class="class"> <dt> <em> <span class="pre"> start_tangent_width </span> </em> </dt> <dd> <p> This property holds the X coordinate of the start of the curve relative to the width bound of the curve. </p> </dd> </dl> </section> </div> </div> <footer> <hr/> </footer> </div> </section>
omni.ui.Button.md
# Button ## Button The Button widget provides a command button. The command button, is perhaps the most commonly used widget in any graphical user interface. Click a button to execute a command. It is rectangular and typically displays a text label describing its action. ### Methods - **__init__(self[, text])** - Construct a button with a text on it. ### Attributes - **image_height** - This property holds the height of the image widget. - **image_url** - This property holds the button's optional image URL. - **image_width** - This property holds the width of the image widget. - **spacing** - Sets a non-stretchable space in points between image and text. - **text** - The text displayed on the button. __init__(self: omni.ui._ui.Button, text: str = '', **kwargs) -> None  Construct a button with a text on it. ### Arguments: - `text :` - The text for the button to use. - `kwargs` - See below ### Keyword Arguments: - `text` - This property holds the button’s text. - `image_url` - This property holds the button’s optional image URL. - `image_width` - This property holds the width of the image widget. Do not use this function to find the width of the image. - `image_height` - This property holds the height of the image widget. Do not use this function to find the height of the image. - `spacing` - Sets a non-stretchable space in points between image and text. - `clicked_fn` - Sets the function that will be called when when the button is activated (i.e., pressed down then released while the mouse cursor is inside the button). - `width` - This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. - `height` - This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. - `name` - The name of the widget that user can set. - `style_type_name_override` - By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. - `identifier` - An optional identifier of the widget we can use to refer to it in queries. - `visible` - This property holds whether the widget is visible. - `visibleMin` - If the current zoom factor and DPI is less than this value, the widget is not visible. - `visibleMax` - If the current zoom factor and DPI is bigger than this value, the widget is not visible. - `tooltip` - Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style - `tooltip_fn` - Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. - `tooltip_offset_x` <dl> <dt> `tooltip_offset_x <span class="classifier"> float` </span> </dt> <dd> <p> Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. </p> </dd> <dt> `tooltip_offset_y <span class="classifier"> float` </span> </dt> <dd> <p> Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. </p> </dd> <dt> `enabled <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. </p> </dd> <dt> `selected <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds a flag that specifies the widget has to use eSelected state of the style. </p> </dd> <dt> `checked <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. </p> </dd> <dt> `dragging <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds if the widget is being dragged. </p> </dd> <dt> `opaque_for_mouse_events <span class="classifier"> bool` </span> </dt> <dd> <p> If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either </p> </dd> <dt> `skip_draw_when_clipped <span class="classifier"> bool` </span> </dt> <dd> <p> The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. </p> </dd> <dt> `mouse_moved_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) </p> </dd> <dt> `mouse_pressed_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. </p> </dd> <dt> `mouse_released_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_double_clicked_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_wheel_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_hovered_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) </p> </dd> <dt> `drag_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget is draggable, and set the callback that is attached to the drag operation. </p> </dd> <dt> `accept_drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. </p> </dd> <dt> `drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget accepts drops and set the callback to the drop operation. </p> </dd> <dt> `computed_content_size_changed_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Called when the size of the widget is changed. </p> </dd> </dl> ### image_width This property holds the width of the image widget. Do not use this function to find the width of the image. ### spacing Sets a non-stretchable space in points between image and text. ### text This property holds the button’s text.
omni.ui.ByteImageProvider.md
# ByteImageProvider ## ByteImageProvider ```python class omni.ui.ByteImageProvider ``` Bases: ```python ImageProvider ``` doc ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | Overloaded function. | | `set_bytes_data(self, bytes, sizes, format, ...)` | Sets Python sequence as byte data. | | `set_bytes_data_from_gpu(self, gpu_bytes, ...)` | Sets byte data from a copy of gpu memory at gpuBytes. | | `set_data(self, arg0, arg1)` | [DEPRECATED FUNCTION] | | `set_data_array(self, arg0, arg1)` | | | `set_raw_bytes_data(self, raw_bytes, sizes, ...)` | | <p> Sets byte data that the image provider will turn raw pointer array into an image. </p> <p class="rubric"> Attributes </p> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.ByteImageProvider.__init__"> <span class="sig-name descname"> <span class="pre"> __init__ </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="o"> <span class="pre"> * </span> </span> <span class="n"> <span class="pre"> args </span> </span> </em> , <em class="sig-param"> <span class="o"> <span class="pre"> ** </span> </span> <span class="n"> <span class="pre"> kwargs </span> </span> </em> <span class="sig-paren"> ) </span> </dt> <dd> <p> Overloaded function. </p> <ol class="arabic simple"> <li> <p> __init__(self: omni.ui._ui.ByteImageProvider) -&gt; None </p> </li> </ol> <p> doc </p> <ol class="arabic simple" start="2"> <li> <p> __init__(self: omni.ui._ui.ByteImageProvider, bytes: sequence, sizes: List[int], format: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat = &lt;TextureFormat.???: 0&gt;, stride: int = -1) -&gt; None </p> </li> </ol> <p> doc </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.ByteImageProvider.set_bytes_data"> <span class="sig-name descname"> <span class="pre"> set_bytes_data </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="pre"> self: </span> <span class="pre"> omni.ui._ui.ByteImageProvider, </span> <span class="pre"> bytes: </span> <span class="pre"> sequence, </span> <span class="pre"> sizes: </span> <span class="pre"> List[int], </span> <span class="pre"> format: </span> <span class="pre"> omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat </span> <span class="pre"> = </span> <span class="pre"> &lt;TextureFormat.???: </span> <span class="pre"> 0&gt;, </span> <span class="pre"> stride: </span> <span class="pre"> int </span> <span class="pre"> = </span> <span class="pre"> -1 </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Sets Python sequence as byte data. The image provider will recognize flattened color values, or sequence within sequence and convert it into an image. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.ByteImageProvider.set_bytes_data_from_gpu"> <span class="sig-name descname"> <span class="pre"> set_bytes_data_from_gpu </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="pre"> self: </span> <span class="pre"> omni.ui._ui.ByteImageProvider, </span> <span class="pre"> gpu_bytes: </span> <span class="pre"> int, </span> <span class="pre"> sizes: </span> <span class="pre"> List[int], </span> <span class="pre"> format: </span> <span class="pre"> omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat </span> <span class="pre"> = </span> <span class="pre"> &lt;TextureFormat.RGBA8_UNORM: </span> <span class="pre"> 11&gt;, </span> <span class="pre"> stride: </span> <span class="pre"> int </span> <span class="pre"> = </span> <span class="pre"> -1 </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Sets byte data from a copy of gpu memory at gpuBytes. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.ByteImageProvider.set_data"> <span class="sig-name descname"> <span class="pre"> set_data </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <a class="reference internal" href="#omni.ui.ByteImageProvider" title="omni.ui._ui.ByteImageProvider"> <span class="pre"> omni.ui._ui.ByteImageProvider </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg0 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> List </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> int </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg1 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> List </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> int </span> <span class="p"> </span> </span> </span> </em> </dt> <dd> </dl> ### omni.ui.ByteImageProvider.set_data - [DEPRECATED FUNCTION] ### omni.ui.ByteImageProvider.set_data_array - `set_data_array(self: omni.ui._ui.ByteImageProvider, arg0: numpy.ndarray[numpy.uint8], arg1: List[int]) -> None` ### omni.ui.ByteImageProvider.set_raw_bytes_data - `set_raw_bytes_data(self: omni.ui._ui.ByteImageProvider, raw_bytes: capsule, sizes: List[int], format: omni.gpu_foundation_factory._gpu_foundation_factory.TextureFormat = <TextureFormat.RGBA8_UNORM: 11>, stride: int = -1) -> None` - Sets byte data that the image provider will turn raw pointer array into an image.
omni.ui.CanvasFrame.md
# CanvasFrame ## CanvasFrame ``` ```markdown Bases: [omni.ui.Frame](omni.ui.Frame.html#omni.ui.Frame) CanvasFrame is the widget that allows the user to pan and zoom its children with a mouse. It has the layout that can be infinitely moved in any direction. ### Methods - **__init__(self, **kwargs)** - Constructs CanvasFrame. - **screen_to_canvas(self, x, y)** - Transforms screen-space coordinates to canvas-space - **screen_to_canvas_x(self, x)** - Transforms screen-space X to canvas-space X. - **screen_to_canvas_y(self, y)** - Transforms screen-space Y to canvas-space Y. - **set_pan_key_shortcut(self, mouse_button, ...)** - Specify the mouse button and key to pan the canvas. - **set_pan_x_changed_fn(self, ...)** - (Function details not provided in the HTML snippet) | Method | Description | | --- | --- | | `set_pan_x_changed_fn(self, fn)` | The horizontal offset of the child item. | | `set_pan_y_changed_fn(self, fn)` | The vertical offset of the child item. | | `set_zoom_changed_fn(self, fn)` | The zoom level of the child item. | | `set_zoom_key_shortcut(self, mouse_button, ...)` | Specify the mouse button and key to zoom the canvas. | ### Attributes | Attribute | Description | | --- | --- | | `compatibility` | This boolean property controls the behavior of CanvasFrame. | | `draggable` | Provides a convenient way to make the content draggable and zoomable. | | `pan_x` | The horizontal offset of the child item. | | `pan_y` | The vertical offset of the child item. | | `smooth_zoom` | When true, zoom is smooth like in Bifrost even if the user is using mouse wheen that doesn't provide smooth scrolling. | | `zoom` | The zoom level of the child item. | | `zoom_max` | The zoom maximum of the child item. | | `zoom_min` | The zoom minimum of the child item. | ### omni.ui.CanvasFrame.__init__ `__init__(self, **kwargs) -> None` Constructs CanvasFrame. #### Keyword Arguments: - `kwargs` dict: See below - `pan_x` - The horizontal offset of the child item. - `pan_y` - The vertical offset of the child item. - `zoom` - The zoom minimum of the child item. - `zoom_min` - The zoom maximum of the child item. - `zoom_max` - The zoom level of the child item. - `compatibility` - This boolean property controls the behavior of CanvasFrame. When set to true, the widget will function in the old way. When set to false, the widget will use a newer and faster implementation. This variable is included as a transition period to ensure that the update does not break any existing functionality. Please be aware that the old behavior may be deprecated in the future, so it is recommended to set this variable to false once you have thoroughly tested the new implementation. - `pan_x_changed_fn` - The horizontal offset of the child item. - `pan_y_changed_fn` - The vertical offset of the child item. - `zoom_changed_fn` - The zoom level of the child item. - `draggable` - Provides a convenient way to make the content draggable and zoomable. - `horizontal_clipping` - When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for horizontal direction. - `vertical_clipping` - When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for vertical direction. - `separate_window` - A special mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows. - `raster_policy` - Determine how the content of the frame should be rasterized. - `build_fn` - Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. - `width` (ui.Length) - This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. - `height` (ui.Length) - This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. - `name` (str) - The name of the widget that user can set. - `style_type_name_override` (str) - By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. - `identifier` (str) - An optional identifier of the widget we can use to refer to it in queries. - `visible` (bool) - This property holds whether the widget is visible. - `visibleMin` (float) - If the current zoom factor and DPI is less than this value, the widget is not visible. - `visibleMax` (float) - If the current zoom factor and DPI is bigger than this value, the widget is not visible. - `tooltip` (str) - Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style - `tooltip_fn` (Callable) - Set dynamic tooltip that will be created dynamically the first time it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. - `tooltip_offset_x` (float) - Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non-zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. - `tooltip_offset_y` (float) - Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non-zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. <dl> <dt>`tooltip_offset_y` <span class="classifier"> float` </span> </dt> <dd> <p> Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. </p> </dd> <dt>`enabled` <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. </p> </dd> <dt>`selected` <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds a flag that specifies the widget has to use eSelected state of the style. </p> </dd> <dt>`checked` <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. </p> </dd> <dt>`dragging` <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds if the widget is being dragged. </p> </dd> <dt>`opaque_for_mouse_events` <span class="classifier"> bool` </span> </dt> <dd> <p> If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either </p> </dd> <dt>`skip_draw_when_clipped` <span class="classifier"> bool` </span> </dt> <dd> <p> The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. </p> </dd> <dt>`mouse_moved_fn` <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) </p> </dd> <dt>`mouse_pressed_fn` <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. </p> </dd> <dt>`mouse_released_fn` <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt>`mouse_double_clicked_fn` <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt>`mouse_wheel_fn` <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt>`mouse_hovered_fn` <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) </p> </dd> <dt>`drag_fn` <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget is draggable, and set the callback that is attached to the drag operation. </p> </dd> <dt>`accept_drop_fn` <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. </p> </dd> <dt>`drop_fn` <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget accepts drops and set the callback to the drop operation. </p> </dd> <dt>`computed_content_size_changed_fn` <span class="classifier"> Callable` </span> </dt> <dd> <p> Called when the size of the widget is changed. </p> </dd> </dl> Tuple [ float , float ] Transforms screen-space coordinates to canvas-space screen_to_canvas_x(self: omni.ui._ui.CanvasFrame, x: float) -> float Transforms screen-space X to canvas-space X. screen_to_canvas_y(self: omni.ui._ui.CanvasFrame, y: float) -> float Transforms screen-space Y to canvas-space Y. set_pan_key_shortcut(self: omni.ui._ui.CanvasFrame, mouse_button: int, key_flag: int) -> None Specify the mouse button and key to pan the canvas. set_pan_x_changed_fn(self: omni.ui._ui.CanvasFrame, fn: Callable[[float]]) The horizontal offset of the child item. The vertical offset of the child item. The zoom level of the child item. The zoom level of the child item. Specify the mouse button and key to zoom the canvas. This boolean property controls the behavior of CanvasFrame. When set to true, the widget will function in the old way. When set to false, the widget will use a newer and faster implementation. This variable is included as a transition period to ensure that the update does not break any existing functionality. Please be aware that the old behavior may be deprecated in the future, so it is recommended to set this variable to false once you have thoroughly tested the new implementation. Provides a convenient way to make the content draggable and zoomable. The horizontal offset of the child item. The vertical offset of the child item. When true, zoom is smooth like in Bifrost even if the user is using mouse wheen that doesn’t provide smooth scrolling. The zoom level of the child item. The zoom maximum of the child item. The zoom minimum of the child item.
omni.ui.CheckBox.md
# CheckBox ## CheckBox A CheckBox is an option button that can be switched on (checked) or off (unchecked). Checkboxes are typically used to represent features in an application that can be enabled or disabled without affecting others. The checkbox is implemented using the model-view pattern. The model is the central component of this system. It is the application’s dynamic data structure independent of the widget. It directly manages the data, logic, and rules of the checkbox. If the model is not specified, the simple one is created automatically when the object is constructed. ### Methods | Method | Description | |--------|-------------| | `__init__(self[, model])` | CheckBox with specified model. | ### Attributes | Attribute | Description | |-----------|-------------| ## CheckBox.__init__ `__init__(self: omni.ui._ui.CheckBox, model: omni.ui._ui.AbstractValueModel = None)` ### CheckBox with specified model. If model is not specified, it’s using the default one. **kwargs (dict) - See below ### Keyword Arguments: - `width (ui.Length)` - This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. - `height (ui.Length)` - This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. - `name (str)` - The name of the widget that user can set. - `style_type_name_override (str)` - By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. - `identifier (str)` - An optional identifier of the widget we can use to refer to it in queries. - `visible (bool)` - This property holds whether the widget is visible. - `visibleMin (float)` - If the current zoom factor and DPI is less than this value, the widget is not visible. - `visibleMax (float)` - If the current zoom factor and DPI is bigger than this value, the widget is not visible. - `tooltip (str)` - Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style - `tooltip_fn (Callable)` - Set dynamic tooltip that will be created dynamically the first time it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. - `tooltip_offset_x (float)` - Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non-zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. - `tooltip_offset_y (float)` - Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non-zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. - `enabled (bool)` - This property holds whether the widget is enabled. In general, an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. - `selected (bool)` - This property holds a flag that specifies the widget has to use eSelected state of the style. - `checked (bool)` - This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. - `dragging (bool)` - This property holds if the widget is being dragged. - `opaque_for_mouse_events (bool)` - If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either - `skip_draw_when_clipped (bool)` - The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. - `mouse_moved_fn (Callable)` - Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) - `mouse_pressed_fn (Callable)` - Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. <dl> <dt> `mouse_released_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_double_clicked_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_wheel_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_hovered_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) </p> </dd> <dt> `drag_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget is draggable, and set the callback that is attached to the drag operation. </p> </dd> <dt> `accept_drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. </p> </dd> <dt> `drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget accepts drops and set the callback to the drop operation. </p> </dd> <dt> `computed_content_size_changed_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Called when the size of the widget is changed. </p> </dd> </dl>
omni.ui.Circle.md
# Circle ## Circle The Circle widget provides a colored circle to display. ### Methods | Method | Description | |--------|-------------| | `__init__(self, **kwargs)` | Constructs Circle. | ### Attributes | Attribute | Description | |-----------|-------------| | `alignment` | This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. | | `arc` | This property is the way to draw a half or a quarter of the circle. | | `radius` | This property holds the radius of the circle when the fill policy is eFixed or eFixedCrop. | | `size_policy` | Define what happens when the source image has a different size than the item. | <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.Circle </span> </span> </em> , <em class="sig-param"> <span class="o"> <span class="pre"> ** </span> </span> <span class="n"> <span class="pre"> kwargs </span> </span> </em> ) <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> <dd> <p> Constructs Circle. </p> <blockquote> <div> <dl class="simple"> <dt> `kwargs <span class="classifier"> dict` </span> </dt> <dd> <p> See below </p> </dd> </dl> </div> </blockquote> <p> ### Keyword Arguments: </p> <blockquote> <div> <dl class="simple"> <dt> `alignment :` </dt> <dd> <p> This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the circle is centered. </p> </dd> <dt> `radius :` </dt> <dd> <p> This property holds the radius of the circle when the fill policy is eFixed or eFixedCrop. By default, the circle radius is 0. </p> </dd> <dt> `arc :` </dt> <dd> <p> This property is the way to draw a half or a quarter of the circle. When it’s eLeft, only left side of the circle is rendered. When it’s eLeftTop, only left top quarter is rendered. </p> </dd> <dt> `size_policy :` </dt> <dd> <p> Define what happens when the source image has a different size than the item. </p> </dd> <dt> `width <span class="classifier"> ui.Length` </span> </dt> <dd> <p> This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. </p> </dd> <dt> `height <span class="classifier"> ui.Length` </span> </dt> <dd> <p> This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. </p> </dd> <dt> `name <span class="classifier"> str` </span> </dt> <dd> <p> The name of the widget that user can set. </p> </dd> <dt> `style_type_name_override <span class="classifier"> str` </span> </dt> <dd> <p> By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. </p> </dd> <dt> `identifier <span class="classifier"> str` </span> </dt> <dd> <p> An optional identifier of the widget we can use to refer to it in queries. </p> </dd> <dt> `visible <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds whether the widget is visible. </p> </dd> <dt> `visibleMin <span class="classifier"> float` </span> </dt> <dd> <p> If the current zoom factor and DPI is less than this value, the widget is not visible. </p> </dd> <dt> `visibleMax <span class="classifier"> float` </span> </dt> <dd> <p> If the current zoom factor and DPI is bigger than this value, the widget is not visible. </p> </dd> <dt> `tooltip <span class="classifier"> str` </span> </dt> <dd> <p> Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style </p> </dd> <dt> `tooltip_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. </p> </dd> <dt> `tooltip_offset_x <span class="classifier"> float` </span> </dt> <dd> <p> Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. </p> </dd> <dt> `tooltip_offset_y <span class="classifier"> float` </span> </dt> <dd> <p> Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. </p> </dd> <dt> `enabled <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. </p> </dd> <dt> `selected <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds a flag that specifies the widget has to use eSelected state of the style. </p> </dd> <dt> `checked <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. </p> </dd> <dt> `dragging <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds if the widget is being dragged. </p> </dd> <dt> `opaque_for_mouse_events bool If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either skip_draw_when_clipped bool The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. mouse_moved_fn Callable Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) mouse_pressed_fn Callable Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. mouse_released_fn Callable Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) mouse_double_clicked_fn Callable Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) mouse_wheel_fn Callable Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) mouse_hovered_fn Callable Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) drag_fn Callable Specify that this Widget is draggable, and set the callback that is attached to the drag operation. accept_drop_fn Callable Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. drop_fn Callable Specify that this Widget accepts drops and set the callback to the drop operation. computed_content_size_changed_fn Callable Called when the size of the widget is changed. alignment This property holds the alignment of the circle when the fill policy is ePreserveAspectFit or ePreserveAspectCrop. By default, the circle is centered. arc This property is the way to draw a half or a quarter of the circle. When it’s eLeft, only left side of the circle is rendered. When it’s eLeftTop, only left top quarter is rendered. radius This property holds the radius of the circle when the fill policy is eFixed or eFixedCrop. By default, the circle radius is 0. size_policy Define what happens when the source image has a different size than the item.
omni.ui.CircleSizePolicy.md
# CircleSizePolicy ## CircleSizePolicy - **Bases:** `pybind11_object` - **Description:** Define what happens when the source image has a different size than the item. - **Members:** - STRETCH - FIXED ### Methods | Method | Description | |--------|-------------| | `__init__(self, value)` | | ### Attributes | Attribute | Description | |-----------|-------------| | `FIXED` | | | `STRETCH` | | | `name` | | | `value` | | ### `__init__` Method - **Parameters:** - `self`: `omni.ui._ui.CircleSizePolicy` ``` <em class="sig-param"> <span class="n"> <span class="pre"> value </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> name </span> </span>
omni.ui.Classes.md
# omni.ui Classes ## Classes Summary: | Class | Description | |-------|-------------| | [AbstractField](omni.ui/omni.ui.AbstractField.html) | The abstract widget that is base for any field, which is a one-line text editor. | | [AbstractItem](omni.ui/omni.ui.AbstractItem.html) | The object that is associated with the data entity of the AbstractItemModel. | | [AbstractItemDelegate](omni.ui/omni.ui.AbstractItemDelegate.html) | AbstractItemDelegate is used to generate widgets that display and edit data items from a model. | | [AbstractItemModel](omni.ui/omni.ui.AbstractItemModel.html) | The central component of the item widget. It is the application’s dynamic data structure, independent of the user interface, and it directly manages the nested data. It follows closely model-view pattern. It’s abstract, and it defines the standard interface to be able to interoperate with the components of the model-view architecture. It is not supposed to be instantiated directly. Instead, the user should subclass it to create a new model. | | [AbstractMultiField](omni.ui/omni.ui.AbstractMultiField.html) | AbstractMultiField is the abstract class that has everything to create a custom widget per model item. | | [AbstractSlider](omni.ui/omni.ui.AbstractSlider.html) | The abstract widget that is base for drags and sliders. | | [AbstractValueModel](omni.ui/omni.ui.AbstractValueModel.html) | | | [Alignment](omni.ui/omni.ui.Alignment.html) | Members: | | [ArrowHelper](omni.ui/omni.ui.ArrowHelper.html) | The ArrowHelper widget provides a colored rectangle to display. | | [ArrowType](omni.ui/omni.ui.ArrowType.html) | Members: | | Widget Name | Description | |-------------|-------------| | Axis | Members: | | BezierCurve | Smooth curve that can be scaled infinitely. | | Button | The Button widget provides a command button. | | ByteImageProvider | doc | | CanvasFrame | CanvasFrame is the widget that allows the user to pan and zoom its children with a mouse. It has the layout that can be infinitely moved in any direction. | | CheckBox | A CheckBox is an option button that can be switched on (checked) or off (unchecked). Checkboxes are typically used to represent features in an application that can be enabled or disabled without affecting others. | | Circle | The Circle widget provides a colored circle to display. | | CircleSizePolicy | Define what happens when the source image has a different size than the item. | | CollapsableFrame | CollapsableFrame is a frame widget that can hide or show its content. It has two states expanded and collapsed. When it’s collapsed, it looks like a button. If it’s expanded, it looks like a button and a frame with the content. It’s handy to group properties, and temporarily hide them to get more space for something else. | | ColorStore | A singleton that stores all the UI Style color properties of omni.ui. | | ColorWidget | The ColorWidget widget is a button that displays the color from the item model and can open a picker window to change the color. | | ComboBox | The ComboBox widget is a combined button and a drop-down list. | | Container | Base class for all UI containers. Container can hold one or many other :class:`omni.ui.Widget` s | | CornerFlag | Members: | | Direction | Members: | | DockPolicy | Members: | | DockPosition | Members: | | DockPreference | Members: | | DockSpace | The DockSpace class represents Dock Space for the OS Window. | | DynamicTextureProvider | doc | | Ellipse | Constructs Ellipse. | | FillPolicy | Members: | | FloatDrag | | - FloatDrag - The drag widget that looks like a field but it’s possible to change the value with dragging. - FloatField - The FloatField widget is a one-line text editor with a string model. - FloatSlider - The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into a float value within the legal range. - FloatStore - A singleton that stores all the UI Style float properties of omni.ui. - FocusPolicy - Members: - FontStyle - Supported font styles. - Fraction - Fraction length is made to take the space of the parent widget, divides it up into a row of boxes, and makes each child widget fill one box. - Frame - The Frame is a widget that can hold one child widget. - FreeBezierCurve - Smooth curve that can be scaled infinitely. - FreeCircle - The Circle widget provides a colored circle to display. - FreeEllipse - The Ellipse widget provides a colored ellipse to display. - FreeLine - The Line widget provides a colored line to display. - FreeRectangle - The Rectangle widget provides a colored rectangle to display. - FreeTriangle - The Triangle widget provides a colored triangle to display. - Grid - Grid is a container that arranges its child views in a grid. The grid vertical/horizontal direction is the direction the grid size growing with creating more children. - HGrid - Shortcut for Grid{eLeftToRight}. The grid grows from left to right with the widgets placed. - HStack - Shortcut for Stack{eLeftToRight}. The widgets are placed in a row, with suitable sizes. - Image - The Image widget displays an image. - ImageProvider - ImageProvider class, the goal of this class is to provide ImGui reference for the image to be rendered. - ImageWithProvider - The Image widget displays an image. - Inspector - Inspector is the helper to check the internal state of the widget. It’s not recommended to use it for the routine UI. - IntDrag - The drag widget that looks like a field but it’s possible to change the value with dragging. IntField ======== The IntField widget is a one-line text editor with a string model. IntSlider --------- The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into an integer value within the legal range. InvisibleButton --------------- The InvisibleButton widget provides a transparent command button. ItemModelHelper --------------- The ItemModelHelper class provides the basic functionality for item widget classes. IwpFillPolicy -------------- Members: Label ----- The Label widget provides a text to display. Length ------ OMNI.UI has several different units for expressing a length. Line ---- The Line widget provides a colored line to display. MainWindow ---------- The MainWindow class represents Main Window for the Application, draw optional MainMenuBar and StatusBar. Menu ---- The Menu class provides a menu widget for use in menu bars, context menus, and other popup menus. MenuBar ------- The MenuBar class provides a MenuBar at the top of the Window, could also be the MainMenuBar of the MainWindow. MenuDelegate ------------ MenuDelegate is used to generate widgets that represent the menu item. MenuHelper ---------- The helper class for the menu that draws the menu line. MenuItem -------- A MenuItem represents the items the Menu consists of. MenuItemCollection ------------------- The MenuItemCollection is the menu that unchecks children when one of them is checked. MultiFloatDragField -------------------- MultiFloatDragField is the widget that has a sub widget (FloatDrag) per model item. MultiFloatField ---------------- MultiFloatField is the widget that has a sub widget (FloatField) per model item. MultiIntDragField ------------------ MultiIntDragField is the widget that has a sub widget (IntDrag) per model item. MultiIntField -------------- MultiIntField is the widget that has a sub widget (IntField) per model item. MultiStringField ----------------- MultiStringField is the widget that has a sub widget (StringField) per model item. OffsetLine ---------- The free widget is the widget that is independent of the layout. It draws the line stuck to the bounds of other widgets. - **Percent** - Percent is the length in percents from the parent widget. - **Pixel** - Pixel length is exact length in pixels. - **Placer** - The Placer class place a single widget to a particular position based on the offet. - **Plot** - The Plot widget provides a line/histogram to display. - **ProgressBar** - A progressbar is a classic widget for showing the progress of an operation. - **RadioButton** - RadioButton is the widget that allows the user to choose only one of a predefined set of mutually exclusive options. - **RadioCollection** - Radio Collection is a class that groups RadioButtons and coordinates their state. - **RasterImageProvider** - doc - **RasterPolicy** - Used to set the rasterization behaviour. - **Rectangle** - The Rectangle widget provides a colored rectangle to display. - **ScrollBarPolicy** - Members: - **ScrollingFrame** - The ScrollingFrame class provides the ability to scroll onto another widget. - **Separator** - The Separator class provides blank space. - **ShadowFlag** - Members: - **Shape** - The Shape widget provides a base class for all the Shape Widget. Currently implemented are Rectangle, Circle, Triangle, Line, Ellipse and BezierCurve. - **ShapeAnchorHelper** - The ShapeAnchorHelper provides common functionality for Shape Anchors. - **SimpleBoolModel** - A very simple bool model. - **SimpleFloatModel** - A very simple double model. - **SimpleIntModel** - A very simple Int model. - **SimpleStringModel** - A very simple value model that holds a single string. - **SliderDrawMode** - Members: - **Spacer** - The Spacer class provides blank space. - **Stack** - | Widget Name | Description | |-------------|-------------| | Stack | The Stack class lines up child widgets horizontally, vertically or sorted in a Z-order. | | StringField | The StringField widget is a one-line text editor with a string model. | | StringStore | A singleton that stores all the UI Style string properties of omni.ui. | | Style | A singleton that controls the global style of the session. | | TextureFormat | Members: | | ToolBar | The ToolBar class represents a window in the underlying windowing system that as some fixed size property. | | ToolBarAxis | Members: | | ToolButton | ToolButton is functionally similar to Button, but provides a model that determines if the button is checked. This button toggles between checked (on) and unchecked (off) when the user clicks it. | | TreeView | TreeView is a widget that presents a hierarchical view of information. Each item can have a number of subitems. An indentation often visualizes this in a list. An item can be expanded to reveal subitems, if any exist, and collapsed to hide subitems. | | Triangle | The Triangle widget provides a colored triangle to display. | | Type | Members: | | UIPreferencesExtension | | | UIntDrag | | | UIntSlider | The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into an integer value within the legal range. | | UnitType | Unit types. | | VGrid | Shortcut for Grid{eTopToBottom}. The grid grows from top to bottom with the widgets placed. | | VStack | Shortcut for Stack{eTopToBottom}. The widgets are placed in a column, with suitable sizes. | | ValueModelHelper | The ValueModelHelper class provides the basic functionality for value widget classes. ValueModelHelper class is the base class for every standard widget that uses a AbstractValueModel. ValueModelHelper is an abstract class and itself cannot be instantiated. It provides a standard interface for interoperating with models. | | VectorImageProvider | doc | | Widget | The Widget class is the base class of all user interface objects. | | WidgetMouseDropEvent | Holds the data which is sent when a drag and drop action is completed. | | Window | | The Window class represents a window in the underlying windowing system. WindowHandle is a handle object to control any of the windows in Kit. It can be created any time, and if it’s destroyed, the source window doesn’t disappear. Workspace object provides access to the windows in Kit. Shortcut for Stack{eBackToFront}. The widgets are placed sorted in a Z-order in top right corner with suitable sizes.
omni.ui.CollapsableFrame.md
# CollapsableFrame CollapsableFrame is a frame widget that can hide or show its content. It has two states expanded and collapsed. When it’s collapsed, it looks like a button. If it’s expanded, it looks like a button and a frame with the content. It’s handy to group properties, and temporarily hide them to get more space for something else. ## Methods - `__init__(self[, title])` - Constructs CollapsableFrame. - `call_build_header_fn(self, arg0, arg1)` - Set dynamic header that will be created dynamically when it is needed. - `has_build_header_fn(self)` - Set dynamic header that will be created dynamically when it is needed. - `set_build_header_fn(self, fn)` - Set dynamic header that will be created dynamically when it is needed. - `set_collapsed_changed_fn(self, fn)` - The state of the CollapsableFrame. ## Attributes | | | | ------ | --------------------------------------------------------------- | | alignment | This property holds the alignment of the label in the default header. | | collapsed | The state of the CollapsableFrame. | | title | The header text. | ## omni.ui.CollapsableFrame.\_\_init\_\_ Constructs CollapsableFrame. ### Arguments: - `text :` The text for the caption of the frame. - `kwargs dict` See below ### Keyword Arguments: - `collapsed` The state of the CollapsableFrame. - `title` The header text. - `alignment` This property holds the alignment of the label in the default header. By default, the contents of the label are left-aligned and vertically-centered. - `build_header_fn` Set dynamic header that will be created dynamically when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. - `collapsed_changed_fn` The state of the CollapsableFrame. - `horizontal_clipping` When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for horizontal direction. - `vertical_clipping` When the content of the frame is bigger than the frame the exceeding part is not drawn if the clipping is on. It only works for vertical direction. - `separate_window` A special mode where the child is placed to the transparent borderless window. We need it to be able to place the UI to the exact stacking order between other windows. - `raster_policy` Determine how the content of the frame should be rasterized. - `build_fn` Set the callback that will be called once the frame is visible and the content of the callback will override the frame child. It’s useful for lazy load. - `width ui.Length` This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. - `height` <span class="classifier"> ui.Length` </span> </dt> <dd> <p> This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. </p> </dd> <dt> `name <span class="classifier"> str` </span> </dt> <dd> <p> The name of the widget that user can set. </p> </dd> <dt> `style_type_name_override <span class="classifier"> str` </span> </dt> <dd> <p> By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. </p> </dd> <dt> `identifier <span class="classifier"> str` </span> </dt> <dd> <p> An optional identifier of the widget we can use to refer to it in queries. </p> </dd> <dt> `visible <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds whether the widget is visible. </p> </dd> <dt> `visibleMin <span class="classifier"> float` </span> </dt> <dd> <p> If the current zoom factor and DPI is less than this value, the widget is not visible. </p> </dd> <dt> `visibleMax <span class="classifier"> float` </span> </dt> <dd> <p> If the current zoom factor and DPI is bigger than this value, the widget is not visible. </p> </dd> <dt> `tooltip <span class="classifier"> str` </span> </dt> <dd> <p> Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style </p> </dd> <dt> `tooltip_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. </p> </dd> <dt> `tooltip_offset_x <span class="classifier"> float` </span> </dt> <dd> <p> Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. </p> </dd> <dt> `tooltip_offset_y <span class="classifier"> float` </span> </dt> <dd> <p> Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. </p> </dd> <dt> `enabled <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. </p> </dd> <dt> `selected <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds a flag that specifies the widget has to use eSelected state of the style. </p> </dd> <dt> `checked <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. </p> </dd> <dt> `dragging <span class="classifier"> bool` </span> </dt> <dd> <p> This property holds if the widget is being dragged. </p> </dd> <dt> `opaque_for_mouse_events <span class="classifier"> bool` </span> </dt> <dd> <p> If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either </p> </dd> <dt> `skip_draw_when_clipped <span class="classifier"> bool` </span> </dt> <dd> <p> The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. </p> </dd> <dt> `mouse_moved_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) </p> </dd> <dt> `mouse_pressed_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. </p> </dd> <dt> `mouse_released_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_double_clicked_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_wheel_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_hovered_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) <dl> <dt> `drag_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget is draggable, and set the callback that is attached to the drag operation. </p> </dd> <dt> `accept_drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. </p> </dd> <dt> `drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget accepts drops and set the callback to the drop operation. </p> </dd> <dt> `computed_content_size_changed_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Called when the size of the widget is changed. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.CollapsableFrame.call_build_header_fn"> <span class="sig-name descname"> <span class="pre"> call_build_header_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <a class="reference internal" href="#omni.ui.CollapsableFrame" title="omni.ui._ui.CollapsableFrame"> <span class="pre"> omni.ui._ui.CollapsableFrame </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg0 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> bool </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> arg1 </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> str </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.CollapsableFrame.has_build_header_fn"> <span class="sig-name descname"> <span class="pre"> has_build_header_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <a class="reference internal" href="#omni.ui.CollapsableFrame" title="omni.ui._ui.CollapsableFrame"> <span class="pre"> omni.ui._ui.CollapsableFrame </span> </a> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> bool </span> </span> </span> </dt> <dd> <p> Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.CollapsableFrame.set_build_header_fn"> <span class="sig-name descname"> <span class="pre"> set_build_header_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <a class="reference internal" href="#omni.ui.CollapsableFrame" title="omni.ui._ui.CollapsableFrame"> <span class="pre"> omni.ui._ui.CollapsableFrame </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> fn </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> Callable </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> bool </span> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <span class="pre"> str </span> <span class="p"> <span class="pre"> ] </span> </span> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <span class="pre"> None </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.CollapsableFrame.set_collapsed_changed_fn"> <span class="sig-name descname"> <span class="pre"> set_collapsed_changed_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <a class="reference internal" href="#omni.ui.CollapsableFrame" title="omni.ui._ui.CollapsableFrame"> <span class="pre"> omni.ui._ui.CollapsableFrame </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> fn </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> Callable </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> bool </span> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <span class="pre"> str </span> <span class="p"> <span class="pre"> ] </span> </span> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <span class="pre"> None </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Set dynamic header that will be created dynamiclly when it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.CollapsableFrame.set_collapsed_changed_fn"> <span class="sig-name descname"> <span class="pre"> set_collapsed_changed_fn </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.CollapsableFrame </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> fn </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> Callable </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> bool </span> <span class="p"> <span class="pre"> ] </span> </span> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <span class="pre"> None </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> The state of the CollapsableFrame. </p> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.ui.CollapsableFrame.alignment"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> alignment </span> </span> </dt> <dd> <p> This property holds the alignment of the label in the default header. By default, the contents of the label are left-aligned and vertically-centered. </p> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.ui.CollapsableFrame.collapsed"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> collapsed </span> </span> </dt> <dd> <p> The state of the CollapsableFrame. </p> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.ui.CollapsableFrame.title"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> title </span> </span> </dt> <dd> <p> The header text. </p> </dd> </dl>
omni.ui.ColorStore.md
# ColorStore ## Methods - `__init__(*args, **kwargs)` - `find(name)` - Return the index of the color with specific name. - `store(name, color)` - Save the color by name. ## omni.ui.ColorStore.find Return the index of the color with specific name. ## omni.ui.ColorStore.store Save the color by name.
omni.ui.ColorWidget.md
# ColorWidget The ColorWidget widget is a button that displays the color from the item model and can open a picker window to change the color. ## Methods - `__init__(*args, **kwargs)` - Overloaded function. ## Attributes ## __init__ - `__init__(*args, **kwargs)` - Overloaded function. - `__init__(self: omni.ui._ui.ColorWidget, **kwargs) -> None` - `__init__(self: omni.ui._ui.ColorWidget, arg0: omni.ui._ui.AbstractItemModel, **kwargs) -> None` - `__init__(self: omni.ui._ui.ColorWidget, arg0: float, arg1: float, arg2: float, **kwargs) -> None` - `__init__(self: omni.ui._ui.ColorWidget, arg0: float, arg1: float, arg2: float, arg3: float, **kwargs) -> None` - Construct ColorWidget. ### Keyword Arguments: - `width` (ui.Length): This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. - `height` (ui.Length): This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. - `name` (str): The name of the widget that user can set. - `style_type_name_override` (str): By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. - `identifier` (str): An optional identifier of the widget we can use to refer to it in queries. - `visible` (bool): This property holds whether the widget is visible. - `visibleMin` (float): If the current zoom factor and DPI is less than this value, the widget is not visible. - `visibleMax` (float): If the current zoom factor and DPI is bigger than this value, the widget is not visible. - `tooltip` (str): Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style. - `tooltip_fn` (Callable): Set dynamic tooltip that will be created dynamically the first time it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. - `tooltip_offset_x` (float): Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non-zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. - `tooltip_offset_y` (float): Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non-zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. - `enabled` (bool): This property holds whether the widget is enabled. In general, an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. - `selected` (bool): This property holds a flag that specifies the widget has to use eSelected state of the style. - `checked` (bool): This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. - `dragging` (bool): This property holds if the widget is being dragged. - `opaque_for_mouse_events` (bool): If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either. - `skip_draw_when_clipped` (bool): The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. - `mouse_moved_fn` (Callable): Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier). - `mouse_pressed_fn` (Callable): Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. - `mouse_released_fn` (Callable): Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier). - `mouse_double_clicked_fn` (Callable): Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier). <dl> <dt> `mouse_wheel_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_hovered_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) </p> </dd> <dt> `drag_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget is draggable, and set the callback that is attached to the drag operation. </p> </dd> <dt> `accept_drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. </p> </dd> <dt> `drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget accepts drops and set the callback to the drop operation. </p> </dd> <dt> `computed_content_size_changed_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Called when the size of the widget is changed. </p> </dd> </dl>
omni.ui.color_utils.AbstractShade.md
# AbstractShade ## AbstractShade ```python class omni.ui.color_utils.AbstractShade ``` The implementation of shades for custom style parameter type. The user has to reimplement methods _store and _find to set/get the value in the specific store. ### Methods | Method | Description | |--------|-------------| | `__init__()` | | | `set_shade(name=None)` | Set the default shade. | | `shade(default=None)` | Save the given shade, pick the color and apply it to ui.ColorStore. | ```python def __init__(): pass ``` ```python def set_shade(name=None): """Set the default shade.""" pass ``` ```python def shade(default=None): """Save the given shade, pick the color and apply it to ui.ColorStore.""" pass ``` <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.color_utils.AbstractShade.set_shade"> <span class="sig-name descname"> <span class="pre"> set_shade </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> shade </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> Optional </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> str </span> <span class="p"> <span class="pre"> ] </span> </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> None </span> </span> </em> <span class="sig-paren"> ) </span> </dt> <dd> <p> Set the default shade. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.color_utils.AbstractShade.shade"> <span class="sig-name descname"> <span class="pre"> shade </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> default </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> Optional </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> Any </span> <span class="p"> <span class="pre"> ] </span> </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> None </span> </span> </em> , <em class="sig-param"> <span class="o"> <span class="pre"> ** </span> </span> <span class="n"> <span class="pre"> kwargs </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> str </span> </span> </span> </dt> <dd> <p> Save the given shade, pick the color and apply it to ui.ColorStore. </p> </dd> </dl>
omni.ui.color_utils.Classes.md
# omni.ui.color_utils Classes ## Classes Summary: | Class Name | Description | |------------|-------------| | [AbstractShade](omni.ui.color_utils/omni.ui.color_utils.AbstractShade.html) | The implementation of shades for custom style parameter type. | | [ColorShade](omni.ui.color_utils/omni.ui.color_utils.ColorShade.html) | |
omni.ui.color_utils.ColorShade.md
# ColorShade ## ColorShade ### omni.ui.color_utils.ColorShade alias of `getinstance`
omni.ui.color_utils.Functions.md
# omni.ui.color_utils Functions ## Functions Summary: | Function | Description | |----------|-------------| | [Singleton](omni.ui.color_utils/omni.ui.color_utils.Singleton.html) | A singleton decorator |
omni.ui.color_utils.md
# omni.ui.color_utils ## Classes Summary - **AbstractShade** - The implementation of shades for custom style parameter type. - **ColorShade** ## Functions Summary - **Singleton** - A singleton decorator
omni.ui.color_utils.Singleton.md
# Singleton ## Singleton ```python omni.ui.color_utils.Singleton(class_) ``` A singleton decorator ```
omni.ui.ComboBox.md
# ComboBox ## ComboBox The ComboBox widget is a combined button and a drop-down list. A combo box is a selection widget that displays the current item and can pop up a list of selectable items. The ComboBox is implemented using the model-view pattern. The model is the central component of this system. The root of the item model should contain the index of currently selected items, and the children of the root include all the items of the combo box. ### Methods - **__init__(self, *args, **kwargs)** - Construct ComboBox. ### Attributes ``` Construct ComboBox. ### Arguments: > - `model :` > - The model that determines if the button is checked. > - `kwargs` > - See below ### Keyword Arguments: > - `arrow_only : bool` > - Determines if it’s necessary to hide the text of the ComboBox. > - `width : ui.Length` > - This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. > - `height : ui.Length` > - This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. > - `name : str` > - The name of the widget that user can set. > - `style_type_name_override : str` > - By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. > - `identifier : str` > - An optional identifier of the widget we can use to refer to it in queries. > - `visible : bool` > - This property holds whether the widget is visible. > - `visibleMin : float` > - If the current zoom factor and DPI is less than this value, the widget is not visible. > - `visibleMax : float` > - If the current zoom factor and DPI is bigger than this value, the widget is not visible. > - `tooltip : str` > - Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style > - `tooltip_fn : Callable` > - Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. > - `tooltip_offset_x : float` > - Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. > - `tooltip_offset_y : float` > - Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. > - `enabled : bool` > - This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. > - `selected : bool` > - This property holds a flag that specifies the widget has to use eSelected state of the style. > - `checked : bool` > - This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. > - `dragging : bool` > - This property holds if the widget is being dragged. > - `opaque_for_mouse_events : bool` > - If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either > - `skip_draw_when_clipped : bool` > - The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. > - `mouse_moved_fn : Callable` > - Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) > - `mouse_pressed_fn : Callable` > - Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. > - `mouse_released_fn : Callable` > - Sets the function that will be called when the user releases the mouse button inside the widget. The function should be like this: void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. <dl> <dt> <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_double_clicked_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_wheel_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_hovered_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) </p> </dd> <dt> `drag_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget is draggable, and set the callback that is attached to the drag operation. </p> </dd> <dt> `accept_drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. </p> </dd> <dt> `drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget accepts drops and set the callback to the drop operation. </p> </dd> <dt> `computed_content_size_changed_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Called when the size of the widget is changed. </p> </dd> </dl>
omni.ui.constant_utils.AbstractShade.md
# AbstractShade ## AbstractShade ```python class omni.ui.constant_utils.AbstractShade(object) ``` The implementation of shades for custom style parameter type. The user has to reimplement methods _store and _find to set/get the value in the specific store. ### Methods | Method | Description | |-----------------------|-----------------------------------------------------------------------------| | `__init__()` | | | `set_shade(name)` | Set the default shade. | | `shade(default)` | Save the given shade, pick the color and apply it to ui.ColorStore. | ```python def __init__(self): pass ``` ```python def set_shade(self, name): Set the default shade. ``` ```python def shade(self, default): Save the given shade, pick the color and apply it to ui.ColorStore. ``` ## AbstractShade Methods ### set_shade ```python def set_shade(default: Optional[str] = None) ``` Set the default shade. ### shade ```python def shade(default: Optional[Any] = None, **kwargs) -> str ``` Save the given shade, pick the color and apply it to ui.ColorStore. ```
omni.ui.constant_utils.Classes.md
# omni.ui.constant_utils Classes ## Classes Summary: | Class | Description | | --- | --- | | [AbstractShade](#) | The implementation of shades for custom style parameter type. | | [FloatShade](#) | |
omni.ui.constant_utils.FloatShade.md
# FloatShade ## FloatShade ### omni.ui.constant_utils.FloatShade alias of `getinstance`
omni.ui.constant_utils.Functions.md
# omni.ui.constant_utils Functions ## Functions Summary: | Function | Description | |----------|-------------| | [Singleton](omni.ui.constant_utils/omni.ui.constant_utils.Singleton.html) | A singleton decorator |
omni.ui.constant_utils.md
# omni.ui.constant_utils ## Classes Summary - **AbstractShade** - The implementation of shades for custom style parameter type. - **FloatShade** - (No description provided) ## Functions Summary - **Singleton** - A singleton decorator
omni.ui.Container.md
# Container ## Class: omni.ui.Container Base class for all UI containers. Container can hold one or many other `omni.ui.Widget`s. ### Methods - `__init__(*args, **kwargs)` - `add_child(self, arg0)` - Adds widget to this container in a manner specific to the container. - `clear(self)` - Removes the container items from the container. ### Attributes None listed. ### omni.ui.Container.add_child - **Method**: add_child - **Parameters**: - self: omni.ui._ui.Container - arg0: omni.ui._ui.Widget - **Returns**: None - **Description**: Adds widget to this container in a manner specific to the container. If it’s allowed to have one sub-widget only, it will be overwriten. ### omni.ui.Container.clear - **Method**: clear - **Parameters**: - self: omni.ui._ui.Container - **Returns**: None - **Description**: Removes the container items from the container.
omni.ui.CornerFlag.md
# CornerFlag ## CornerFlag ``` class omni.ui.CornerFlag ``` Bases: ``` pybind11_object ``` Members: - NONE - TOP_LEFT - TOP_RIGHT - BOTTOM_LEFT - BOTTOM_RIGHT - TOP - BOTTOM - LEFT - RIGHT - ALL ### Methods - `__init__(self, value)` ### Attributes - `ALL` - `BOTTOM` - `BOTTOM_LEFT` - `BOTTOM_RIGHT` - `LEFT` - `NONE` - `RIGHT` - `TOP` - `TOP_LEFT` - `TOP_RIGHT` <p> RIGHT </p> <p> TOP </p> <p> TOP_LEFT </p> <p> TOP_RIGHT </p> <p> name </p> <p> value </p> <dl> <dt> __init__ ( self : omni.ui._ui.CornerFlag , value : int ) → None </dt> </dl> <dl> <dt> property name </dt> </dl>
omni.ui.Direction.md
# Direction ## omni.ui.Direction - Bases: `pybind11_object` ### Members - LEFT_TO_RIGHT - RIGHT_TO_LEFT - TOP_TO_BOTTOM - BOTTOM_TO_TOP - BACK_TO_FRONT - FRONT_TO_BACK ### Methods | Method | Description | |--------|-------------| | `__init__(self, value)` | | ### Attributes | Attribute | Description | |-----------|-------------| | `BACK_TO_FRONT` | | | `BOTTOM_TO_TOP` | | | `FRONT_TO_BACK` | | | `LEFT_TO_RIGHT` | | | `RIGHT_TO_LEFT` | | | `TOP_TO_BOTTOM` | | | name | value | | ---- | ----- | | value | | __init__(self: omni.ui._ui.Direction, value: int) -> None property name
omni.ui.DockPolicy.md
# DockPolicy ## Class ```python class omni.ui.DockPolicy ``` ### Members ``` DO_NOTHING CURRENT_WINDOW_IS_ACTIVE TARGET_WINDOW_IS_ACTIVE ``` ### Methods ``` __init__(self, value) ``` ### Attributes ``` CURRENT_WINDOW_IS_ACTIVE DO_NOTHING TARGET_WINDOW_IS_ACTIVE name value ``` ``` omni.ui._ui.DockPolicy , value : int ) → None property name
omni.ui.DockPosition.md
# DockPosition ## omni.ui.DockPosition - **Bases:** `pybind11_object` ### Members - RIGHT - LEFT - TOP - BOTTOM - SAME ### Methods - `__init__(self, value)` ### Attributes - `BOTTOM` - `LEFT` - `RIGHT` - `SAME` - `TOP` - `name` - `value` <dl class="py method"> <dt class="sig sig-object py" id="omni.ui.DockPosition.__init__"> <span class="sig-name descname"> <span class="pre"> __init__ </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.ui._ui.DockPosition </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> value </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> <a class="headerlink" href="#omni.ui.DockPosition.__init__" title="Permalink to this definition">  </a> </dt> <dd> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.ui.DockPosition.name"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> name </span> </span> <a class="headerlink" href="#omni.ui.DockPosition.name" title="Permalink to this definition">  </a> </dt> <dd> </dd> </dl>
omni.ui.DockPreference.md
# DockPreference ## Class omni.ui.DockPreference Bases: `pybind11_object` Members: - DISABLED - MAIN - RIGHT - LEFT - RIGHT_TOP - RIGHT_BOTTOM - LEFT_BOTTOM ### Methods | Method | Description | |--------|-------------| | `__init__(self, value)` | | ### Attributes | Attribute | Description | |-----------|-------------| | `DISABLED` | | | `LEFT` | | | `LEFT_BOTTOM` | | | `MAIN` | | | `RIGHT` | | | `RIGHT_BOTTOM` | | | `RIGHT_TOP` | | | Column 1 | Column 2 | |----------|----------| | name | | | value | | ### __init__ ```python __init__(self: omni.ui._ui.DockPreference, value: int) -> None ``` ### name ``` property name ```
omni.ui.DockSpace.md
# DockSpace ## DockSpace The DockSpace class represents Dock Space for the OS Window. ### Methods | Method | Description | |--------|-------------| | `__init__(self, arg0, **kwargs)` | Construct the main window, add it to the underlying windowing system, and makes it appear. | ### Attributes | Attribute | Description | |-----------|-------------| | `dock_frame` | This represents Styling opportunity for the Window background. | #### `__init__(self, arg0, **kwargs)` Construct the main window, add it to the underlying windowing system, and makes it appear. <p> Construct the main window, add it to the underlying windowing system, and makes it appear. </p> <blockquote> <div> <dl class="simple"> <dt> `kwargs <span class="classifier"> dict` </span> </dt> <dd> <p> See below </p> </dd> </dl> </div> </blockquote> <p> ### Keyword Arguments: </p> <dl class="py property"> <dt class="sig sig-object py" id="omni.ui.DockSpace.dock_frame"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> dock_frame </span> </span> </dt> <dd> <p> This represents Styling opportunity for the Window background. </p> </dd> </dl>
omni.ui.dock_window_in_window.md
# dock_window_in_window ## dock_window_in_window ``` ```python omni.ui.dock_window_in_window(arg0: str, arg1: str, arg2: omni.ui._ui.DockPosition, arg3: float) -> bool ``` place a named window in a specific docking position based on a target window name. We will find the target window dock node and insert this named window in it, either by splitting on ratio or on top if the window is not found false is returned, otherwise true.
omni.ui.DynamicTextureProvider.md
# DynamicTextureProvider ## DynamicTextureProvider ```python class omni.ui.DynamicTextureProvider ``` Bases: `ByteImageProvider` doc ### Methods | Method | Description | |--------|-------------| | `__init__(self, arg0)` | doc | ### Attributes | Attribute | Description | |-----------|-------------| ```python def __init__(self, arg0: str) -> None: # doc ``` ```
omni.ui.Ellipse.md
# Ellipse ## Ellipse ### omni.ui.Ellipse **Bases:** [Shape](omni.ui.Shape.html#omni.ui.Shape) Constructs Ellipse. #### Keyword Arguments: - `width (ui.Length)`: This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. - `height (ui.Length)`: This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. - `name (str)`: The name of the widget that user can set. - `style_type_name_override (str)`: By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. - `identifier (str)`: An optional identifier of the widget we can use to refer to it in queries. - `visible (bool)`: This property holds whether the widget is visible. - `visibleMin (float)`: If the current zoom factor and DPI is less than this value, the widget is not visible. - `visibleMax (float)`: If the current zoom factor and DPI is bigger than this value, the widget is not visible. - `tooltip (str)`: Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style. - `tooltip_fn (Callable)`: Set dynamic tooltip that will be created dynamically the first time it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. ### Properties - `tooltip_offset_x` - float - Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. - `tooltip_offset_y` - float - Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. - `enabled` - bool - This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. - `selected` - bool - This property holds a flag that specifies the widget has to use eSelected state of the style. - `checked` - bool - This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. - `dragging` - bool - This property holds if the widget is being dragged. - `opaque_for_mouse_events` - bool - If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either - `skip_draw_when_clipped` - bool - The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. - `mouse_moved_fn` - Callable - Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) - `mouse_pressed_fn` - Callable - Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. - `mouse_released_fn` - Callable - Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) - `mouse_double_clicked_fn` - Callable - Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) - `mouse_wheel_fn` - Callable - Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) - `mouse_hovered_fn` - Callable - Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) - `drag_fn` - Callable - Specify that this Widget is draggable, and set the callback that is attached to the drag operation. - `accept_drop_fn` - Callable - Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. - `drop_fn` - Callable - Specify that this Widget accepts drops and set the callback to the drop operation. - `computed_content_size_changed_fn` - Callable - Called when the size of the widget is changed. ``` ### Methods - `__init__(self, **kwargs)` - ### Attributes omni.ui._ui.Ellipse(**kwargs) → None
omni.ui.extension.Classes.md
# omni.ui.extension Classes ## Classes Summary: - [UIPreferencesExtension](omni.ui.extension/omni.ui.extension.UIPreferencesExtension.html)
omni.ui.extension.UIPreferencesExtension.md
# UIPreferencesExtension ## UIPreferencesExtension ```python class omni.ui.extension.UIPreferencesExtension ``` **Bases:** `IExt` **Methods** | Method | Description | |--------------|-------------| | `on_shutdown()` | | | `on_startup(ext_id)` | | ```python def __init__(self: omni.ext._extensions.IExt) -> None: ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```
omni.ui.FillPolicy.md
# FillPolicy ## Overview FillPolicy is a class that inherits from `pybind11_object`. It includes the following members: - **STRETCH** - **PRESERVE_ASPECT_FIT** - **PRESERVE_ASPECT_CROP** ### Methods - **`__init__`**(self, value) ### Attributes - **`PRESERVE_ASPECT_CROP`** - **`PRESERVE_ASPECT_FIT`** - **`STRETCH`** - **`name`** - **`value`** omni.ui._ui.FillPolicy( value : int ) -> None property name
omni.ui.FloatDrag.md
# FloatDrag ## FloatDrag The drag widget that looks like a field but it’s possible to change the value with dragging. ### Methods | Method | Description | |--------|-------------| | `__init__(self[, model])` | Construct FloatDrag. | ### Attributes | Attribute | Description | |-----------|-------------| Construct FloatDrag. > `kwargs > dict` See below ### Keyword Arguments: > `min > float` This property holds the slider’s minimum value. > `max > float` This property holds the slider’s maximum value. > `step > float` This property controls the stepping speed on the drag. > `format > str` This property overrides automatic formatting if needed. > `precision > uint32_t` This property holds the slider value’s float precision. > `width > ui.Length` This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. > `height > ui.Length` This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. > `name > str` The name of the widget that user can set. > `style_type_name_override > str` By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. > `identifier > str` An optional identifier of the widget we can use to refer to it in queries. > `visible > bool` This property holds whether the widget is visible. > `visibleMin > float` If the current zoom factor and DPI is less than this value, the widget is not visible. > `visibleMax > float` If the current zoom factor and DPI is bigger than this value, the widget is not visible. > `tooltip > str` Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style > `tooltip_fn > Callable` Set dynamic tooltip that will be created dynamically the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. > `tooltip_offset_x > float` Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. > `tooltip_offset_y > float` Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. > `enabled > bool` This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. > `selected > bool` This property holds a flag that specifies the widget has to use eSelected state of the style. > `checked > bool` This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. > `dragging > bool` This property holds if the widget is being dragged. > `opaque_for_mouse_events > bool` If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either > `skip_draw_when_clipped > bool` The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. > `mouse_moved_fn > Callable` <dl> <dt> `mouse_moved_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) </p> </dd> <dt> `mouse_pressed_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. </p> </dd> <dt> `mouse_released_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_double_clicked_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_wheel_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) </p> </dd> <dt> `mouse_hovered_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) </p> </dd> <dt> `drag_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget is draggable, and set the callback that is attached to the drag operation. </p> </dd> <dt> `accept_drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. </p> </dd> <dt> `drop_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Specify that this Widget accepts drops and set the callback to the drop operation. </p> </dd> <dt> `computed_content_size_changed_fn <span class="classifier"> Callable` </span> </dt> <dd> <p> Called when the size of the widget is changed. </p> </dd> </dl>
omni.ui.FloatSlider.md
# FloatSlider ## Class: omni.ui.FloatSlider **Bases:** [AbstractSlider](omni.ui.AbstractSlider.html#omni.ui.AbstractSlider) The slider is the classic widget for controlling a bounded value. It lets the user move a slider handle along a horizontal groove and translates the handle’s position into a float value within the legal range. ### Methods - **__init__(self[, model])** - Construct FloatSlider. ### Attributes - **format** - This property overrides automatic formatting if needed. - **max** - This property holds the slider's maximum value. - **min** - This property holds the slider's minimum value. - **precision** - This property holds the slider value's float precision. - **step** - This property holds the slider's step size. | Property | Type | Description | |----------|------|-------------| | `step` | float | This property controls the stepping speed on the drag. | ### __init__ ```python __init__(self: omni.ui._ui.FloatSlider, model: omni.ui._ui.AbstractValueModel = None, **kwargs) -> None ``` Construct FloatSlider. #### Keyword Arguments: ```markdown | Argument | Type | Description | |----------|------|-------------| | `min` | float | This property holds the slider’s minimum value. | | `max` | float | This property holds the slider’s maximum value. | | `step` | float | This property controls the stepping speed on the drag. | | `format` | str | This property overrides automatic formatting if needed. | | `precision` | uint32_t | This property holds the slider value’s float precision. | | `width` | ui.Length | This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. | | `height` | ui.Length | This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. | | `name` | str | The name of the widget that user can set. | | `style_type_name_override` | str | By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. | | `identifier` | str | An optional identifier of the widget we can use to refer to it in queries. | | `visible` | bool | This property holds whether the widget is visible. | | `visibleMin` | float | If the current zoom factor and DPI is less than this value, the widget is not visible. | | `visibleMax` | float | If the current zoom factor and DPI is bigger than this value, the widget is not visible. | | `tooltip` | str | Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style | | `tooltip_fn` | Callable | Set dynamic tooltip that will be created dynamically the first time it is needed. The function is called inside a ui.Frame scope that the widget will be parented correctly. | | `tooltip_offset_x` | float | Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non-zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. | | `tooltip_offset_y` | float | Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non-zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. | ``` ### Properties #### `tooltip_y_offset` - **Type:** `float` - **Description:** Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. #### `enabled` - **Type:** `bool` - **Description:** This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. #### `selected` - **Type:** `bool` - **Description:** This property holds a flag that specifies the widget has to use eSelected state of the style. #### `checked` - **Type:** `bool` - **Description:** This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. #### `dragging` - **Type:** `bool` - **Description:** This property holds if the widget is being dragged. #### `opaque_for_mouse_events` - **Type:** `bool` - **Description:** If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either #### `skip_draw_when_clipped` - **Type:** `bool` - **Description:** The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. #### `mouse_moved_fn` - **Type:** `Callable` - **Description:** Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) #### `mouse_pressed_fn` - **Type:** `Callable` - **Description:** Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. #### `mouse_released_fn` - **Type:** `Callable` - **Description:** Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) #### `mouse_double_clicked_fn` - **Type:** `Callable` - **Description:** Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) #### `mouse_wheel_fn` - **Type:** `Callable` - **Description:** Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) #### `mouse_hovered_fn` - **Type:** `Callable` - **Description:** Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) #### `drag_fn` - **Type:** `Callable` - **Description:** Specify that this Widget is draggable, and set the callback that is attached to the drag operation. #### `accept_drop_fn` - **Type:** `Callable` - **Description:** Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. #### `drop_fn` - **Type:** `Callable` - **Description:** Specify that this Widget accepts drops and set the callback to the drop operation. #### `computed_content_size_changed_fn` - **Type:** `Callable` - **Description:** Called when the size of the widget is changed. ### `format` - **Description:** This property overrides automatic formatting if needed. ### `max` - **Description:** This property holds the slider’s maximum value. ### `min` - **Description:** This property holds the slider’s minimum value. ### precision This property holds the slider value’s float precision. ### step This property controls the stepping speed on the drag.
omni.ui.FloatStore.md
# FloatStore ## FloatStore - **Bases:** `pybind11_object` - **Description:** A singleton that stores all the UI Style float properties of omni.ui. ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | | | `find(name)` | Return the index of the color with specific name. | | `store(name, value)` | Save the color by name. | #### `__init__(*args, **kwargs)` #### `find(name)` - **Description:** Return the index of the color with specific name. #### `store(name, value)` - **Description:** Save the color by name. ## omni.ui.FloatStore.find **static** `find(name: str) -> float` Return the index of the color with specific name. ## omni.ui.FloatStore.store **static** `store(name: str, value: float) -> None` Save the color by name.
omni.ui.FocusPolicy.md
# FocusPolicy ## FocusPolicy Bases: `pybind11_object` Members: - DEFAULT - FOCUS_ON_LEFT_MOUSE_DOWN - FOCUS_ON_ANY_MOUSE_DOWN - FOCUS_ON_HOVER ### Methods | Method | Description | |--------|-------------| | `__init__(self, value)` | | ### Attributes | Attribute | Description | |-----------|-------------| | `DEFAULT` | | | `FOCUS_ON_ANY_MOUSE_DOWN` | | | `FOCUS_ON_HOVER` | | | `FOCUS_ON_LEFT_MOUSE_DOWN` | | | `name` | | | `value` | | ( **self** : omni.ui._ui.FocusPolicy , **value** : int ) → None **property** **name**
omni.ui.FontStyle.md
# FontStyle ## FontStyle Supported font styles. Members: - NONE - NORMAL - LARGE - SMALL - EXTRA_LARGE - XXL - XXXL - EXTRA_SMALL - XXS - XXXS - ULTRA ### Methods - `__init__(self, value)` ### Attributes - `EXTRA_LARGE` - `EXTRA_SMALL` - `LARGE` - `NONE` - `NORMAL` - `SMALL` | ULTRA | | --- | | XXL | | XXS | | XXXL | | XXXS | | name | | value | __init__(self: omni.ui._ui.FontStyle, value: int) -> None property name