file_path
stringlengths
5
148
content
stringlengths
0
526k
omni.graph.core.IBundleFactory.md
# IBundleFactory ## IBundleFactory - **Bases:** `_IBundleFactory` - **Interface to create new bundles** ### Methods - `__init__(*args, **kwargs)` - **Overloaded function.** - `create()` - **Creates an interface object for bundle factories** - `create_bundle(self, context, path)` - **Create bundle at given path.** - `create_bundles(self, context, paths)` - **Create bundles at given paths.** - `get_bundle(*args, **kwargs)` - **Overloaded function.** - `get_bundles(*args, **kwargs)` - **Overloaded function.** <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.graph.core._omni_graph_core.IBundleFactory, arg0: omni.core._core.IObject) -> None </p> </li> <li> <p> __init__(self: omni.graph.core._omni_graph_core.IBundleFactory) -> None </p> </li> </ol> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IBundleFactory.create"> <em class="property"> <span class="pre"> static </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> create </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"> omni::core::Api&lt;omni::graph::core::IBundleFactory2_abi&gt; </span> </span> </span> </dt> <dd> <p> Creates an interface object for bundle factories </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> Created instance of bundle factory. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> omni.graph.core.IBundleFactory2 </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IBundleFactory.create_bundle"> <span class="sig-name descname"> <span class="pre"> create_bundle </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self: </span> <span class="pre"> omni.graph.core._omni_graph_core.IBundleFactory </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> context: </span> <span class="pre"> omni::graph::core::Py_GraphContext </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> path: </span> <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"> <a class="reference internal" href="omni.graph.core.IBundle2.html#omni.graph.core.IBundle2" title="omni.graph.core._omni_graph_core.IBundle2"> <span class="pre"> omni.graph.core._omni_graph_core.IBundle2 </span> </a> </span> </span> </dt> <dd> <p> Create bundle at given path. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> context </strong> ( <em> omni.graph.core.GraphContext </em> ) – The context where bundles are created. </p> </li> <li> <p> <strong> path </strong> ( <em> str </em> ) – Location for new bundle. </p> </li> </ul> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> Bundle instance. </p> </dd> <dt class="field-odd"> Return type </dt> <dd class="field-odd"> <p> omni.graph.core.IBundle2 </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IBundleFactory.create_bundles"> <span class="sig-name descname"> <span class="pre"> create_bundles </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="pre"> self: </span> <span class="pre"> omni.graph.core._omni_graph_core.IBundleFactory, </span> <span class="pre"> context: </span> <span class="pre"> omni::graph::core::Py_GraphContext, </span> <span class="pre"> paths: </span> <span class="pre"> List[str] </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"> List </span> <span class="p"> <span class="pre"> [ </span> </span> <a class="reference internal" href="omni.graph.core.IBundle2.html#omni.graph.core.IBundle2" title="omni.graph.core._omni_graph_core.IBundle2"> <span class="pre"> omni.graph.core._omni_graph_core.IBundle2 </span> </a> <span class="p"> <span class="pre"> ] </span> </span> </span> </span> </dt> <dd> <p> Create bundles at given paths. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> context </strong> ( <em> omni.graph.core.GraphContext </em> ) – The context where bundles are created. </p> </li> <li> <p> <strong> paths </strong> ( <em> List[str] </em> ) – Locations for new bundles. </p> </li> </ul> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> List of bundle instances. </p> </dd> <dt class="field-odd"> Return type </dt> <dd class="field-odd"> <p> List[omni.graph.core.IBundle2] </p> </dd> </dl> </dd> </dl> <em> omni.graph.core.GraphContext </em> ) – The context where bundles are created. <strong> paths </strong> ( <em> list </em> <em> [ </em> <em> str </em> <em> ] </em> ) – Locations for new bundles. Returns A list of bundle instances. Return type list[ omni.graph.core.IBundle2 ] get_bundle( *args, **kwargs ) Overloaded function. 1. get_bundle(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundle: omni.graph.core._omni_graph_core.IBundle2) -> omni.graph.core._omni_graph_core.IBundle2 2. get_bundle(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.IConstBundle2 DEPRECATED - no conversion is required get_bundles( *args, **kwargs ) Overloaded function. 1. get_bundles(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.IConstBundle2] 2. get_bundles(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundles: List[omni.graph.core._omni_graph_core.IBundle2]) -> List[omni.graph.core._omni_graph_core.IBundle2] DEPRECATED - no conversion is required
omni.graph.core.IBundleFactory2.md
# IBundleFactory2 IBundleFactory version 2. The version 2 allows to retrieve instances of IBundle instances from paths. ## Methods | Method | Description | | ------ | ----------- | | `__init__(*args, **kwargs)` | Overloaded function. | | `get_bundle_from_path(self, arg0, arg1)` | Get read write IBundle interface from path. | | `get_const_bundle_from_path(self, arg0, arg1)` | Get read only IBundle interface from path. | ### `__init__(*args, **kwargs)` Overloaded function. 1. `__init__(self: omni.graph.core._omni_graph_core.IBundleFactory2, arg0: omni.core._core.IObject) -> None` 2. `__init__(self: omni.graph.core._omni_graph_core.IBundleFactory2) -> None` ### `get_bundle_from_path(self, arg0, arg1)` Get read write IBundle interface from path. ### `get_const_bundle_from_path(self, arg0, arg1)` Get read only IBundle interface from path. ## get_bundle_from_path Get read write IBundle interface from path. ### Parameters - **context** (omni.graph.core.GraphContext) – The context where bundles belong to. - **path** (str) – Location of the bundle. ### Returns - Bundle instance. ### Return type - omni.graph.core.IBundle2 ## get_const_bundle_from_path Get read only IBundle interface from path. ### Args - context (omni.graph.core.GraphContext): The context where bundles belong to. - path (str): Location of the bundle. ### Returns - omni.graph.core.IConstBundle2: Bundle instance.
omni.graph.core.IBundleFactory_omni.graph.core.IBundleFactory.md
# IBundleFactory ## IBundleFactory - Bases: `_IBundleFactory` - Interface to create new bundles ### Methods - `__init__(*args, **kwargs)` - Overloaded function. - `create()` - Creates an interface object for bundle factories - `create_bundle(self, context, path)` - Create bundle at given path. - `create_bundles(self, context, paths)` - Create bundles at given paths. - `get_bundle(*args, **kwargs)` - Overloaded function. - `get_bundles(*args, **kwargs)` - Overloaded function. <span class="pre">__init__</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> Overloaded function. 1. __init__(self: omni.graph.core._omni_graph_core.IBundleFactory, arg0: omni.core._core.IObject) -> None 2. __init__(self: omni.graph.core._omni_graph_core.IBundleFactory) -> None <span class="pre">static</span> <span class="sig-name descname"><span class="pre">create</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">omni::core::Api&lt;omni::graph::core::IBundleFactory2_abi&gt;</span></span></span> Creates an interface object for bundle factories - Returns: Created instance of bundle factory. - Return type: omni.graph.core.IBundleFactory2 <span class="sig-name descname"><span class="pre">create_bundle</span></span> <span class="sig-paren">(</span> <em class="sig-param"><span class="n"><span class="pre">self:</span><span class="pre">omni.graph.core._omni_graph_core.IBundleFactory</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">context:</span><span class="pre">omni::graph::core::Py_GraphContext</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path:</span><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"><a class="reference internal" href="omni.graph.core.IBundle2.html#omni.graph.core.IBundle2" title="omni.graph.core._omni_graph_core.IBundle2"><span class="pre">omni.graph.core._omni_graph_core.IBundle2</span></a></span></span> Create bundle at given path. - Parameters: - context (omni.graph.core.GraphContext) – The context where bundles are created. - path (str) – Location for new bundle. - Returns: Bundle instance. - Return type: omni.graph.core.IBundle2 <span class="sig-name descname"><span class="pre">create_bundles</span></span> <span class="sig-paren">(</span> <em class="sig-param"><span class="pre">self:</span><span class="pre">omni.graph.core._omni_graph_core.IBundleFactory,</span><span class="pre">context:</span><span class="pre">omni::graph::core::Py_GraphContext,</span><span class="pre">paths:</span><span class="pre">List[str]</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">List</span><span class="p"><span class="pre">[</span></span><a class="reference internal" href="omni.graph.core.IBundle2.html#omni.graph.core.IBundle2" title="omni.graph.core._omni_graph_core.IBundle2"><span class="pre">omni.graph.core._omni_graph_core.IBundle2</span></a><span class="p"><span class="pre">]</span></span></span></span> Create bundles at given paths. - Parameters: - context (omni.graph.core.GraphContext) – The context where bundles are created. - paths (List[str]) – Locations for new bundles. - Returns: List of bundle instances. - Return type: List[omni.graph.core.IBundle2] <em> omni.graph.core.GraphContext </em> ) – The context where bundles are created. <strong> paths </strong> ( <em> list </em> <em> [ </em> <em> str </em> <em> ] </em> ) – Locations for new bundles. Returns A list of bundle instances. Return type list[ omni.graph.core.IBundle2 ] get_bundle( *args , **kwargs ) Overloaded function. 1. get_bundle(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundle: omni.graph.core._omni_graph_core.IBundle2) -> omni.graph.core._omni_graph_core.IBundle2 2. get_bundle(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.IConstBundle2 DEPRECATED - no conversion is required get_bundles( *args , **kwargs ) Overloaded function. 1. get_bundles(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.IConstBundle2] 2. get_bundles(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundles: List[omni.graph.core._omni_graph_core.IBundle2]) -> List[omni.graph.core._omni_graph_core.IBundle2] DEPRECATED - no conversion is required
omni.graph.core.IConstBundle2.md
# IConstBundle2 ## IConstBundle2 - Bases: `_IConstBundle2` - Provide read only access to recursive bundles. ### Methods - `__init__(*args, **kwargs)` - Overloaded function. - `add_attribute(self, type, name)` - DEPRECATED - use create_attribute() instead. - `add_attributes(self, types, names)` - DEPRECATED - use create_attributes() instead. - `clear(self)` - DEPRECATED - use clear_contents() instead - `get_attribute_by_name(*args, **kwargs)` - Overloaded function. - `get_attribute_count(self)` - Get the number of attributes in this bundle - `get_attribute_data(self)` - Get the data of an attribute by name - `get_attribute_data(self[, write])` - DEPRECATED - use get_attributes() instead - `get_attribute_data_count(self)` - DEPRECATED - use get_attribute_count() instead - `get_attribute_metadata_by_name(self, *args, **kwargs)` - Overloaded function. - `get_attribute_metadata_count(self, attribute)` - Gets the number of metadata fields in an attribute within the bundle - `get_attribute_metadata_names(self, attribute)` - Get names of all metadata fields in the attribute. - `get_attribute_metadata_types(self, attribute)` - Get types of all metadata fields in the attribute. - `get_attribute_names(self)` - Get the names of all attributes in this bundle. - `get_attribute_names_and_types(self)` - DEPRECATED - use get_attribute_names() or get_attribute_types() instead - `get_attribute_types(self)` - Get the types of all attributes in this bundle. - `get_attributes(self)` - Get all attributes in this bundle. - `get_attributes_by_name(self, names)` - Searches for attributes in this bundle by using attribute names. - `get_bundle_metadata_by_name(self, *args, **kwargs)` - Overloaded function. - `get_bundle_metadata_count(self)` - Get the number of metadata entries - `get_bundle_metadata_names(self)` - Get the names of all metadata fields in this bundle. - `get_bundle_metadata_types(self)` - Get types of all metadata fields in this bundle. - `get_child_bundle(self, index)` - Get the child bundle by index. - `get_child_bundle_by_name(self, path)` - Lookup for child under specified path. - `get_child_bundle_count(self)` - Get the number of child bundles - `get_child_bundles(self)` - Get all child bundle handles in this bundle. - `get_child_bundles_by_name(self, names)` - Lookup for children under specified names. - `get_context(self)` - Get the context used by this bundle - `get_metadata_storage(self)` - Get access to metadata storage that contains all metadata information - `get_name(self)` - Get the name of the bundle - `get_parent_bundle(self)` - Get the parent bundle - `get_path(self)` - Get the path to this bundle - `get_prim_path(self)` - DEPRECATED - use get_path() instead - `insert_attribute(self, attribute_to_copy, name)` - DEPRECATED - use copy_attribute() instead - `insert_bundle(self, bundle_to_copy)` - DEPRECATED - use copy_bundle() instead. - `is_read_only(self)` - Returns if this interface is read-only. - `is_valid(self)` - Returns if this interface is valid. | Method | Description | |--------|-------------| | (self) | DEPRECATED - use bool cast instead | | (self, name) | DEPRECATED - use remove_attribute_by_name() instead. | | (self, names) | DEPRECATED - use remove_attributes_by_name() instead. | ### Attributes | Attribute | Description | |-----------|-------------| | valid | | ### Methods #### __init__(*args, **kwargs) Overloaded function. 1. __init__(self: omni.graph.core._omni_graph_core.IConstBundle2, arg0: omni.core._core.IObject) -> None 2. __init__(self: omni.graph.core._omni_graph_core.IConstBundle2) -> None #### add_attribute(self: omni.graph.core._omni_graph_core.IConstBundle2, type: omni::graph::core::Py_Type, name: str) -> omni::graph::core::Py_AttributeData DEPRECATED - use create_attribute() instead. #### add_attributes(self: omni.graph.core._omni_graph_core.IConstBundle2, types: List[omni::graph::core::Py_Type], names: List[str]) -> None DEPRECATED - use create_attributes() instead. #### clear(self: omni.graph.core._omni_graph_core.IConstBundle2) -> None DEPRECATED - use clear_contents() instead #### get_attribute_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str) -> omni::graph::core::Py_AttributeData ### get_attribute_by_name Overloaded function. 1. get_attribute_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str, readOnly: bool) -> omni::graph::core::Py_AttributeData DEPRECATED - use get_attribute_by_name(name) instead 2. get_attribute_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str) -> omni::graph::core::Py_AttributeData Searches for attribute in this bundle by using attribute name. Args: - name (str): Attribute name to search for. Returns: - omni.graph.core.AttributeData: An attribute. If attribute is not found then invalid attribute is returned. ``` ```markdown ### get_attribute_count Get the number of attributes in this bundle Returns: - Number of attributes in this bundle. - Return type: int ``` ```markdown ### get_attribute_data DEPRECATED - use get_attributes() instead ``` ```markdown ### get_attribute_data_count DEPRECATED - use get_attribute_count() instead ``` ```markdown ### get_attribute_metadata_by_name ### get_attribute_metadata_by_name Overloaded function. 1. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, attribute: str, field_names: List[str]) -> List[omni::graph::core::Py_AttributeData] - Search for metadata fields for the attribute by using field names. - Args: - attribute (str): Name of the attribute. - field_names (list[str]): Attribute metadata fields to be searched for. - Returns: - list[omni.graph.core.AttributeData]: Array of metadata fields in the attribute. 2. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, attribute: str, field_name: str) -> omni::graph::core::Py_AttributeData - Search for metadata field for the attribute by using field name. - Args: - attribute (str): Name of the attribute. - field_name (str): Attribute metadata field to be searched for. - Returns: - omni.graph.core.AttributeData: Metadata fields in the attribute. ### get_attribute_metadata_count Gets the number of metadata fields in an attribute within the bundle - Parameters: - attribute (str): Name of the attribute to count metadata for. - Returns: - Number of metadata fields in the attribute. - Return type: - int ### get_attribute_metadata_names Get names of all metadata fields in the attribute. - Parameters: - attribute (str): Name of the attribute. - Returns: - Array of names in the attribute. - Return type: - list[str] ## omni.graph.core.IConstBundle2.get_attribute_metadata_types ### Description Get types of all metadata fields in the attribute. #### Parameters - **attribute** (string) – Name of the attribute. #### Returns - Array of types in the attribute. #### Return type - list[omni.graph.core.Type] ## omni.graph.core.IConstBundle2.get_attribute_names ### Description Get the names of all attributes in this bundle. #### Returns - A list of the names. #### Return type - list[str] ## omni.graph.core.IConstBundle2.get_attribute_names_and_types ### Description DEPRECATED - use get_attribute_names() or get_attribute_types() instead ## omni.graph.core.IConstBundle2.get_attribute_types ### Description Get the types of all attributes in this bundle. #### Returns - A list of the types. #### Return type - list[omni.graph.core.Type] ## omni.graph.core.IConstBundle2.get_attributes ### Description ## get_attributes Get all attributes in this bundle. ### Returns - A list of all attributes in this bundle. ### Return type - list[omni.graph.core.AttributeData] ## get_attributes_by_name Searches for attributes in this bundle by using attribute names. ### Parameters - **names** (list[str]) – Attribute names to search for. ### Returns - A list of found attributes. ### Return type - list[omni.graph.core.AttributeData] ## get_bundle_metadata_by_name Overloaded function. 1. get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, field_names: List[str]) -> List[omni::graph::core::Py_AttributeData] - Search for field handles in this bundle by using field names. - Args: - field_names (list[str]): Bundle metadata fields to be searched for. - Returns: - list[omni.graph.core.AttributeData]: Metadata fields in this bundle. 2. get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, field_name: str) -> omni::graph::core::Py_AttributeData - Search for field handle in this bundle by using field name. - Args: - field_name (str): Bundle metadata fields to be searched for. - Returns: - omni.graph.core.AttributeData: Metadata field in this bundle. ### get_bundle_metadata_count ```python get_bundle_metadata_count(self: omni.graph.core._omni_graph_core.IConstBundle2) -> int ``` Get the number of metadata entries **Returns:** - Number of metadata fields in this bundle. - Return type: int ### get_bundle_metadata_names ```python get_bundle_metadata_names(self: omni.graph.core._omni_graph_core.IConstBundle2) -> List[str] ``` Get the names of all metadata fields in this bundle. **Returns:** - Array of names in this bundle. - Return type: list[str] ### get_bundle_metadata_types ```python get_bundle_metadata_types(self: omni.graph.core._omni_graph_core.IConstBundle2) -> List[omni::graph::core::Py_Type] ``` Get the types of all metadata fields in this bundle. **Returns:** - Array of types in this bundle. - Return type: list[omni.graph.core.Type] ### get_child_bundle ```python get_child_bundle(self: omni.graph.core._omni_graph_core.IConstBundle2, index: int) -> omni.graph.core._omni_graph_core.IConstBundle2 ``` Get the child bundle by index. **Parameters:** - **index** (int) – Child bundle index in range [0, child_bundle_count). ### Returns - Child bundle under the index. If bundle index is out of range, then invalid bundle is returned. ### Return type - omni.graph.core.IConstBundle2 ### get_child_bundle_by_name - Lookup for child under specified path. - **Parameters** - **path** (str) – Path to child bundle in this bundle. - **Returns** - Child bundle in this bundle. If child does not exist under the path, then invalid bundle is returned. - **Return type** - omni.graph.core.IConstBundle2 ### get_child_bundle_count - Get the number of child bundles - **Returns** - Number of child bundles in this bundle. - **Return type** - int ### get_child_bundles - Get all child bundle handles in this bundle. - **Returns** - A list of all child bundles in this bundle. - **Return type** - list[omni.graph.core.IConstBundle2] **get_child_bundles_by_name**(self: omni.graph.core._omni_graph_core.IConstBundle2, names: List[str]) → List[omni.graph.core._omni_graph_core.IConstBundle2]  - **Description**: Lookup for children under specified names. - **Parameters**: - **names** (list[str]) – Names to child bundles in this bundle. - **Returns**: - A list of found child bundles in this bundle. - **Return type**: list[omni.graph.core.IConstBundle2] **get_context**(self: omni.graph.core._omni_graph_core.IConstBundle2) → omni::graph::core::Py_GraphContext  - **Description**: Get the context used by this bundle - **Returns**: - The context of this bundle. - **Return type**: omni.graph.core.GraphContext **get_metadata_storage**(self: omni.graph.core._omni_graph_core.IConstBundle2) → omni.graph.core._omni_graph_core.IConstBundle2  - **Description**: Get access to metadata storage that contains all metadata information - **Returns**: - List of bundles with the metadata information - **Return type**: list[omni.graph.core.IBundle2] **get_name**(self: omni.graph.core._omni_graph_core.IConstBundle2) → omni.graph.core._omni_graph_core.IConstBundle2  - **Description**: [Description for get_name method] - **Returns**: - [Return description] - **Return type**: [Return type] ## omni.graph.core.IConstBundle2.get_name - **Description**: Get the name of the bundle - **Returns**: - **Description**: The name of this bundle. - **Type**: str ## omni.graph.core.IConstBundle2.get_parent_bundle - **Description**: Get the parent bundle - **Returns**: - **Description**: The parent of this bundle, or invalid bundle if there is no parent. - **Type**: omni.graph.core.IConstBundle2 ## omni.graph.core.IConstBundle2.get_path - **Description**: Get the path to this bundle - **Returns**: - **Description**: The path to this bundle. - **Type**: str ## omni.graph.core.IConstBundle2.get_prim_path - **Description**: DEPRECATED - use get_path() instead ## omni.graph.core.IConstBundle2.insert_attribute - **Description**: DEPRECATED - use copy_attribute() instead - **Parameters**: - **self**: omni.graph.core._omni_graph_core.IConstBundle2 - **attribute_to_copy**: omni::graph::core::Py_AttributeData - **name**: str - **Returns**: omni::graph::core::Py_AttributeData ### insert_bundle(self: omni.graph.core._omni_graph_core.IConstBundle2, bundle_to_copy: omni.graph.core._omni_graph_core.IConstBundle2) → None  DEPRECATED - use copy_bundle() instead. ### is_read_only(self: omni.graph.core._omni_graph_core.IConstBundle2) → bool  Returns if this interface is read-only. ### is_valid(self: omni.graph.core._omni_graph_core.IConstBundle2) → bool  DEPRECATED - use bool cast instead ### remove_attribute(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str) → None  DEPRECATED - use remove_attribute_by_name() instead. ### remove_attributes(self: omni.graph.core._omni_graph_core.IConstBundle2, names: List[str]) → None  DEPRECATED - use remove_attributes_by_names() instead. <dl class="function"> <dt id="omni.graph.core.IConstBundle2.remove_attributes"> <span class="sig-prename descclassname">omni.graph.core.IConstBundle2.</span> <span class="sig-name descname">remove_attributes</span> <span class="sig-param"> <span class="pre">self</span> </span> <span class="sig-param"> <span class="pre">attributes</span> </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>DEPRECATED - use remove_attributes_by_name() instead.</p> </dd> </dl>
omni.graph.core.IConstBundle2_omni.graph.core.IConstBundle2.md
# IConstBundle2 ## IConstBundle2 ``` Bases: `_IConstBundle2` Provide read only access to recursive bundles. ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | Overloaded function. | | `add_attribute(self, type, name)` | DEPRECATED - use create_attribute() instead. | | `add_attributes(self, types, names)` | DEPRECATED - use create_attributes() instead. | | `clear(self)` | DEPRECATED - use clear_contents() instead | | `get_attribute_by_name(*args, **kwargs)` | Overloaded function. | | `get_attribute_count(self)` | Get the number of attributes in this bundle | | `get_attribute_data(self)` | | - `get_attribute_data(self[, write])` - DEPRECATED - use get_attributes() instead - `get_attribute_data_count(self)` - DEPRECATED - use get_attribute_count() instead - `get_attribute_metadata_by_name(self, *args, **kwargs)` - Overloaded function. - `get_attribute_metadata_count(self, attribute)` - Gets the number of metadata fields in an attribute within the bundle - `get_attribute_metadata_names(self, attribute)` - Get names of all metadata fields in the attribute. - `get_attribute_metadata_types(self, attribute)` - Get types of all metadata fields in the attribute. - `get_attribute_names(self)` - Get the names of all attributes in this bundle. - `get_attribute_names_and_types(self)` - DEPRECATED - use get_attribute_names() or get_attribute_types() instead - `get_attribute_types(self)` - Get the types of all attributes in this bundle. - `get_attributes(self)` - Get all attributes in this bundle. - `get_attributes_by_name(self, names)` - Searches for attributes in this bundle by using attribute names. - `get_bundle_metadata_by_name(self, *args, **kwargs)` - Overloaded function. - `get_bundle_metadata_count(self)` - Get the number of metadata entries - `get_bundle_metadata_names(self)` - Get the names of all metadata fields in this bundle. - `get_bundle_metadata_types(self)` - Get types of all metadata fields in this bundle. - `get_child_bundle(self, index)` - Get the child bundle by index. - `get_child_bundle_by_name(self, path)` - Lookup for child under specified path. - `get_child_bundle_count(self)` - Get the number of child bundles - `get_child_bundles(self)` - Get all child bundle handles in this bundle. - `get_child_bundles_by_name(self, names)` - Lookup for children under specified names. - `get_context(self)` - Get the context used by this bundle - `get_metadata_storage(self)` - Get access to metadata storage that contains all metadata information - `get_name(self)` - Get the name of the bundle - `get_parent_bundle(self)` - Get the parent bundle - `get_path(self)` - Get the path to this bundle - `get_prim_path(self)` - DEPRECATED - use get_path() instead - `insert_attribute(self, attribute_to_copy, name)` - DEPRECATED - use copy_attribute() instead - `insert_bundle(self, bundle_to_copy)` - DEPRECATED - use copy_bundle() instead. - `is_read_only(self)` - Returns if this interface is read-only. - `is_valid(self)` - Check if the interface is valid. | Method | Description | |--------|-------------| | `remove_attribute(self)` | DEPRECATED - use bool cast instead | | `remove_attribute(self, name)` | DEPRECATED - use remove_attribute_by_name() instead. | | `remove_attributes(self, names)` | DEPRECATED - use remove_attributes_by_name() instead. | ### Attributes | Attribute | Description | |-----------|-------------| | `valid` | | ### Methods #### `__init__(self, *args, **kwargs)` Overloaded function. 1. `__init__(self: omni.graph.core._omni_graph_core.IConstBundle2, arg0: omni.core._core.IObject) -> None` 2. `__init__(self: omni.graph.core._omni_graph_core.IConstBundle2) -> None` #### `add_attribute(self, type: omni::graph::core::Py_Type, name: str)` DEPRECATED - use create_attribute() instead. #### `add_attributes(self, types: List[omni::graph::core::Py_Type], names: List[str])` DEPRECATED - use create_attributes() instead. #### `clear(self)` DEPRECATED - use clear_contents() instead #### `get_attribute_by_name(self, name)` <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IConstBundle2.get_attribute_by_name"> <span class="sig-name descname"><span class="pre">get_attribute_by_name</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.graph.core.IConstBundle2" title="omni.graph.core._omni_graph_core.IConstBundle2"><span class="pre">omni.graph.core._omni_graph_core.IConstBundle2</span></a></span> </em> , <em class="sig-param"> <span class="n"><span class="pre">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">readOnly</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> <a class="headerlink" href="#omni.graph.core.IConstBundle2.get_attribute_by_name" title="Permalink to this definition"></a> </dt> <dd> <p>Overloaded function.</p> <ol class="arabic simple"> <li> <p>get_attribute_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str, readOnly: bool) -&gt; omni::graph::core::Py_AttributeData</p> </li> </ol> <p>DEPRECATED - use get_attribute_by_name(name) instead</p> <ol class="arabic" start="2"> <li> <p>get_attribute_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str) -&gt; omni::graph::core::Py_AttributeData</p> <blockquote> <div> <p>Searches for attribute in this bundle by using attribute name.</p> <dl class="simple"> <dt>Args:</dt> <dd> <p>name (str): Attribute name to search for.</p> </dd> <dt>Returns:</dt> <dd> <p>omni.graph.core.AttributeData: An attribute. If attribute is not found then invalid attribute is returned.</p> </dd> </dl> </div> </blockquote> </li> </ol> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IConstBundle2.get_attribute_count"> <span class="sig-name descname"><span class="pre">get_attribute_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"><a class="reference internal" href="#omni.graph.core.IConstBundle2" title="omni.graph.core._omni_graph_core.IConstBundle2"><span class="pre">omni.graph.core._omni_graph_core.IConstBundle2</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">int</span></span> </span> <a class="headerlink" href="#omni.graph.core.IConstBundle2.get_attribute_count" title="Permalink to this definition"></a> </dt> <dd> <p>Get the number of attributes in this bundle</p> <dl class="field-list simple"> <dt class="field-odd">Returns</dt> <dd class="field-odd"> <p>Number of attributes in this bundle.</p> </dd> <dt class="field-even">Return type</dt> <dd class="field-even"> <p>int</p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IConstBundle2.get_attribute_data"> <span class="sig-name descname"><span class="pre">get_attribute_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.graph.core.IConstBundle2" title="omni.graph.core._omni_graph_core.IConstBundle2"><span class="pre">omni.graph.core._omni_graph_core.IConstBundle2</span></a></span> </em> , <em class="sig-param"> <span class="n"><span class="pre">write</span></span> <span class="p"><span class="pre">:</span></span> <span class="w"></span> <span class="n"><span class="pre">bool</span></span> <span class="w"></span> <span class="o"><span class="pre">=</span></span> <span class="w"></span> <span class="default_value"><span class="pre">False</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">list</span></span> </span> <a class="headerlink" href="#omni.graph.core.IConstBundle2.get_attribute_data" title="Permalink to this definition"></a> </dt> <dd> <p>DEPRECATED - use get_attributes() instead</p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IConstBundle2.get_attribute_data_count"> <span class="sig-name descname"><span class="pre">get_attribute_data_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"><a class="reference internal" href="#omni.graph.core.IConstBundle2" title="omni.graph.core._omni_graph_core.IConstBundle2"><span class="pre">omni.graph.core._omni_graph_core.IConstBundle2</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">int</span></span> </span> <a class="headerlink" href="#omni.graph.core.IConstBundle2.get_attribute_data_count" title="Permalink to this definition"></a> </dt> <dd> <p>DEPRECATED - use get_attribute_count() instead</p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IConstBundle2.get_attribute_metadata_by_name"> <span class="sig-name descname"><span class="pre">get_attribute_metadata_by_name</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> <a class="headerlink" href="#omni.graph.core.IConstBundle2.get_attribute_metadata_by_name" title="Permalink to this definition"></a> </dt> <dd> <p>DEPRECATED - use get_attribute_metadata_by_name(name) instead</p> </dd> </dl> ### get_attribute_metadata_by_name Overloaded function. 1. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, attribute: str, field_names: List[str]) -> List[omni::graph::core::Py_AttributeData] - Search for metadata fields for the attribute by using field names. - Args: - attribute (str): Name of the attribute. - field_names (list[str]): Attribute metadata fields to be searched for. - Returns: - list[omni.graph.core.AttributeData]: Array of metadata fields in the attribute. 2. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, attribute: str, field_name: str) -> omni::graph::core::Py_AttributeData - Search for metadata field for the attribute by using field name. - Args: - attribute (str): Name of the attribute. - field_name (str): Attribute metadata field to be searched for. - Returns: - omni.graph.core.AttributeData: Metadata fields in the attribute. ### get_attribute_metadata_count Gets the number of metadata fields in an attribute within the bundle - Parameters: - attribute (str): Name of the attribute to count metadata for. - Returns: - Number of metadata fields in the attribute. - Return type: - int ### get_attribute_metadata_names Get names of all metadata fields in the attribute. - Parameters: - attribute (str): Name of the attribute. - Returns: - Array of names in the attribute. - Return type: - list[str] ### get_attribute_metadata_types Get types of all metadata fields in the attribute. **Parameters** - **attribute** (string) – Name of the attribute. **Returns** - Array of types in the attribute. **Return type** - list[omni.graph.core.Type] ### get_attribute_names Get the names of all attributes in this bundle. **Returns** - A list of the names. **Return type** - list[str] ### get_attribute_names_and_types DEPRECATED - use get_attribute_names() or get_attribute_types() instead ### get_attribute_types Get the types of all attributes in this bundle. **Returns** - A list of the types. **Return type** - list[omni.graph.core.Type] ## Methods ### get_attributes ```python def get_attributes(self: omni.graph.core._omni_graph_core.IConstBundle2) -> List[omni::graph::core::Py_AttributeData]: ``` Get all attributes in this bundle. **Returns:** A list of all attributes in this bundle. **Return type:** list[omni.graph.core.AttributeData] ### get_attributes_by_name ```python def get_attributes_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, names: List[str]) -> List[omni::graph::core::Py_AttributeData]: ``` Searches for attributes in this bundle by using attribute names. **Parameters:** - **names** (list[str]) – Attribute names to search for. **Returns:** A list of found attributes. **Return type:** list[omni.graph.core.AttributeData] ### get_bundle_metadata_by_name ```python def get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, *args, **kwargs) -> None: ``` Overloaded function. 1. ```python def get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, field_names: List[str]) -> List[omni::graph::core::Py_AttributeData]: ``` Search for field handles in this bundle by using field names. **Args:** - field_names (list[str]): Bundle metadata fields to be searched for. **Returns:** list[omni.graph.core.AttributeData]: Metadata fields in this bundle. 2. ```python def get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, field_name: str) -> omni::graph::core::Py_AttributeData: ``` Search for field handle in this bundle by using field name. **Args:** - field_name (str): Bundle metadata fields to be searched for. **Returns:** omni.graph.core.AttributeData: Metadata field in this bundle. ``` ### get_bundle_metadata_count ```python def get_bundle_metadata_count(self: omni.graph.core._omni_graph_core.IConstBundle2) -> int: ``` Get the count of metadata in this bundle. **Returns:** int: The number of metadata in this bundle. ``` ### get_bundle_metadata_count ```python get_bundle_metadata_count(self: omni.graph.core._omni_graph_core.IConstBundle2) -> int ``` Get the number of metadata entries **Returns** - Number of metadata fields in this bundle. - Return type: int ### get_bundle_metadata_names ```python get_bundle_metadata_names(self: omni.graph.core._omni_graph_core.IConstBundle2) -> List[str] ``` Get the names of all metadata fields in this bundle. **Returns** - Array of names in this bundle. - Return type: list[str] ### get_bundle_metadata_types ```python get_bundle_metadata_types(self: omni.graph.core._omni_graph_core.IConstBundle2) -> List[omni::graph::core::Py_Type] ``` Get the types of all metadata fields in this bundle. **Returns** - Array of types in this bundle. - Return type: list[omni.graph.core.Type] ### get_child_bundle ```python get_child_bundle(self: omni.graph.core._omni_graph_core.IConstBundle2, index: int) -> omni.graph.core._omni_graph_core.IConstBundle2 ``` Get the child bundle by index. **Parameters** - **index** (int) – Child bundle index in range [0, child_bundle_count). ### Returns - **Child bundle under the index. If bundle index is out of range, then invalid bundle is returned.** ### Return type - **omni.graph.core.IConstBundle2** ### get_child_bundle_by_name - **get_child_bundle_by_name(self: omni.graph.core.IConstBundle2, path: str) -> omni.graph.core.IConstBundle2** - **Lookup for child under specified path.** #### Parameters - **path (str) – Path to child bundle in this bundle.** #### Returns - **Child bundle in this bundle. If child does not exist under the path, then invalid bundle is returned.** #### Return type - **omni.graph.core.IConstBundle2** ### get_child_bundle_count - **get_child_bundle_count(self: omni.graph.core.IConstBundle2) -> int** - **Get the number of child bundles** #### Returns - **Number of child bundles in this bundle.** #### Return type - **int** ### get_child_bundles - **get_child_bundles(self: omni.graph.core.IConstBundle2) -> List[omni.graph.core.IConstBundle2]** - **Get all child bundle handles in this bundle.** #### Returns - **A list of all child bundles in this bundle.** #### Return type - **list[omni.graph.core.IConstBundle2]** ### get_child_bundles_by_name - **get_child_bundles_by_name(self: omni.graph.core.IConstBundle2, name: str) -> List[omni.graph.core.IConstBundle2]** - **Get child bundles by name.** #### Parameters - **name (str) – Name of the child bundles to retrieve.** #### Returns - **A list of child bundles with the specified name.** #### Return type - **list[omni.graph.core.IConstBundle2]** ### get_child_bundles_by_name - **Parameters** - **names** (list[str]) – Names to child bundles in this bundle. - **Returns** - A list of found child bundles in this bundle. - **Return type** - list[omni.graph.core.IConstBundle2] ### get_context - **Returns** - The context of this bundle. - **Return type** - omni.graph.core.GraphContext ### get_metadata_storage - **Returns** - List of bundles with the metadata information - **Return type** - list[omni.graph.core.IBundle2] ### get_name - **Returns** - The name of this bundle. - **Return type** - str ### omni.graph.core.IConstBundle2.get_name - **Description**: Get the name of the bundle - **Returns**: The name of this bundle. - **Return type**: str ### omni.graph.core.IConstBundle2.get_parent_bundle - **Description**: Get the parent bundle - **Returns**: The parent of this bundle, or invalid bundle if there is no parent. - **Return type**: omni.graph.core.IConstBundle2 ### omni.graph.core.IConstBundle2.get_path - **Description**: Get the path to this bundle - **Returns**: The path to this bundle. - **Return type**: str ### omni.graph.core.IConstBundle2.get_prim_path - **Description**: DEPRECATED - use get_path() instead ### omni.graph.core.IConstBundle2.insert_attribute - **Description**: DEPRECATED - use copy_attribute() instead - **Parameters**: - self: omni.graph.core._omni_graph_core.IConstBundle2 - attribute_to_copy: omni::graph::core::Py_AttributeData - name: str - **Returns**: omni::graph::core::Py_AttributeData ### insert_bundle(self: omni.graph.core._omni_graph_core.IConstBundle2, bundle_to_copy: omni.graph.core._omni_graph_core.IConstBundle2) -> None  DEPRECATED - use copy_bundle() instead. ### is_read_only(self: omni.graph.core._omni_graph_core.IConstBundle2) -> bool  Returns if this interface is read-only. ### is_valid(self: omni.graph.core._omni_graph_core.IConstBundle2) -> bool  DEPRECATED - use bool cast instead ### remove_attribute(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str) -> None  DEPRECATED - use remove_attribute_by_name() instead. ### remove_attributes(self: omni.graph.core._omni_graph_core.IConstBundle2, names: List[str]) -> None  <dl class="function"> <dt id="omni.graph.core.IConstBundle2.remove_attributes"> <span class="sig-prename">omni.graph.core.IConstBundle2.</span> <span class="sig-name">remove_attributes</span> <span class="sig-param"> <span class="sig-param-icon"> ( </span> <span class="sig-param-typehint"> <span class="pre"> const_attributes: List[str] </span> </span> <span class="sig-param-icon"> ) </span> </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> DEPRECATED - use remove_attributes_by_name() instead. </p> </dd> </dl>
omni.graph.core.INodeCategories.md
# INodeCategories ## Methods - `__init__(*args, **kwargs)` - Overloaded function. - `define_category(self, category_name, ...)` - Define a new category - `get_all_categories()` - Get the list of available categories and their descriptions. - `get_node_categories(node_id)` - Return the list of categories that have been applied to the node. - `get_node_type_categories(node_type_id)` - Return the list of categories that have been applied to the node type. - `remove_category(self, category_name)` - Remove an existing category, mainly to manage the ones created by a node type for itself ## Attributes ### category_count ### __init__ Overloaded function. 1. __init__(self: omni.graph.core._omni_graph_core.INodeCategories, arg0: omni.core._core.IObject) -> None 2. __init__(self: omni.graph.core._omni_graph_core.INodeCategories) -> None ### define_category Define a new category @param[in] categoryName Name of the new category @param[in] categoryDescription Description of the category @return false if there was already a category with the given name ### get_all_categories Get the list of available categories and their descriptions. Returns: Dictionary with categories as a name:description dictionary if it succeeded, else None Return type: dict[str,str] ### get_node_categories Return the list of categories that have been applied to the node. Parameters: - **node_id** (str | Node) – The node, or path to the node, whose categories are to be found ## get_node_type_categories - **Parameters:** - **node_type_id** (str | NodeType) – The node type, or name of the node type, whose categories are to be found - **Returns:** - A list of category names applied to the node type if it succeeded, else None - **Return type:** list[str] ## remove_category - **Description:** Remove an existing category, mainly to manage the ones created by a node type for itself - **Parameters:** - **categoryName** Name of the category to remove - **Returns:** false if there was no category with the given name
omni.graph.core.INodeTypeForwarding.md
# INodeTypeForwarding ## INodeTypeForwarding ```python class omni.graph.core.INodeTypeForwarding(_INodeTypeForwarding) ``` @brief Interface that creates a forward on a request for a node type to a different node type There are a couple of different common use cases for needing a forward: - Node type gets renamed - Node type moves from one extension to another The node type forward specifies the unique node type name so if extension omni.my.extension has a node whose type is specified as “MyNode” then the forward must be from “omni.my.extension.MyNode”. The forwarding is version-based as well, where the version is a minimum number required for forwarding, the usual node version update mechanism not withstanding. For example, if you set up a forward from “omni.nodes.MyNode” version 2 to “omni.my_nodes.MyNode” version 3 then any larger version number is forwarded to the same location: - omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3) - omni.nodes.MyNode(3) -> omni.my_nodes.MyNode(3) - omni.nodes.MyNode(4) -> omni.my_nodes.MyNode(3) The forwards can also have multiple versions forwarding to different locations, so if on top of the above forward you also add a forward from “omni.nodes.MyNode” version 3 to “omni.new_nodes.MyNode” version 4 then these become the example forward locations: - omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3) - omni.nodes.MyNode(3) -> omni.new_nodes.MyNode(4) - omni.nodes.MyNode(4) -> omni.new_nodes.MyNode(4) Version numbers lower than the first forward are left as-is - omni.nodes.MyNode(1) -> omni.nodes.MyNode(1) @note The usual mechanism of calling updateVersionNumber on a node is only applied after a forward so in the above cases requesting omni.nodes.MyNode(2) does not call updateVersionNumber(1,2) on your omni.nodes.MyNode implementation. Node type forwards are associative, so if A forwards to B and B forwards to C then when you request A you get C. Adding a new forward from omni.my_nodes.MyNode(3) to omni.new_nodes.MyNode(2) above yields this forwarding: - omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3) -> omni.new_nodes.MyNode(2) - omni.nodes.MyNode(3) -> omni.new_nodes.MyNode(4) - omni.nodes.MyNode(4) -> omni.new_nodes.MyNode(4) ## Methods - `__init__(*args, **kwargs)` - Overloaded function. - `define_forward(self, forward_name, ...)` - @brief Define a new node type forward. - `find_forward(self, forward_name, ...)` - @brief Find a node type forward. | Method | Description | |--------|-------------| | `find_forward(forward_name, forward_version)` | Find a node type name replacement corresponding to the given node type forward name and version. | | `get_forwarding()` | Get the list of available node type forwarding. | | `remove_forward(self, forward_name, ...)` | @brief Remove an existing node type forward. | | `remove_forwarded_type(self, referenced_name, ...)` | @brief Remove forwards referencing a given node type name. | ### Attributes | Attribute | Description | |-----------|-------------| | `forward_count` | | ### Methods #### `__init__(*args, **kwargs)` Overloaded function. 1. `__init__(self: omni.graph.core._omni_graph_core.INodeTypeForwarding, arg0: omni.core._core.IObject) -> None` 2. `__init__(self: omni.graph.core._omni_graph_core.INodeTypeForwarding) -> None` #### `define_forward(self, forward_name: str, forward_version: int, replacement_name: str, replacement_version: int, replacement_extension_id: str) -> bool` @brief Define a new node type forward. It is allowed to have the same forwardName to be defined more than once, however the “forwardVersion” must be different from any existing ones. Later “forwardVersion” numbers will supersede earlier ones in this case. For example if you have these two forwards set up: - OldNode,1 -> BetterNode,1,omni.better.extension - OldNode,2 -> MuchBetterNode,1,omni.much_better.extension then when version 1 of “OldNode” is requested it will treat it as if you requested “BetterNode”, but when versions 2 or later are requested it will instead treat it as if you requested “MuchBetterNode”. These can be chained together: - OldNode,1 -> BetterNode,1,omni.better.extension - BetterNode,1 -> MuchBetterNode,1,omni.much_better.extension @param[in] forwardName Name to be replaced @param[in] forwardVersion The first version of the forward name to be replaced @param[in] replacementName Node type name that replaces the forwarded name @param[in] replacementVersion Version of the node type that replaces the forwarded name @param[in] extensionId Extension ID in which the replacement node type can be found @return false if there was already an forward with the given name and initial version number ## find_forward Find a node type name replacement corresponding to the given node type forward name and version. ### Parameters - **forward_name** – Name of the node type forward to look up - **forward_version** – Version number of the node type forward being looked up ### Returns Matching forward as (new_name, new_version, new_extension) if one was found, else None. e.g. find_forward(“OldNode”, 2) -> (“NewNode”, 1, “omni.my.extension”) ### Return type tuple[str,int,str] | None ### Raises **ValueError** – if there was no forward for the given name/version combination ## get_forwarding Get the list of available node type forwarding. ### Returns Dictionary of all defined forwarding as (forwarded_name, forwarded_version): (new_name, new_version, new_extension) if it succeeded, else None. e.g. {(“OldNode”, 2): (“NewNode”, 1, “omni.my.extension”)} ### Return type dict[tuple[str,str], tuple[str,int,str]] | None ### Raises **ValueError** – if retrieval of the forwarding failed ## remove_forward Remove a node type forward. ### Parameters - **self** – omni.graph.core._omni_graph_core.INodeTypeForwarding - **forward_name** – str - **forward_version** – int ### Returns bool ## Description ### Remove an existing node type forward @brief Remove an existing node type forward. Since an forwardName + forwardVersion combination is unique there is no need to pass in the replacement information. Only the forward with the matching version is removed. Any others with the same name remain untouched. @param[in] forwardName Forward to be removed @param[in] forwardVersion The version at which the forward is to be removed @return false if there was already an forward with the given name and initial version number ### Remove forwards referencing a given node type name @brief Remove forwards referencing a given node type name. @param[in] referencedName Forward to be removed @param[in] referencedVersion The version at which the forward is to be removed @return number of forwards to the given type that were removed
omni.graph.core.INodeTypeForwarding2.md
# INodeTypeForwarding2 ## INodeTypeForwarding2 ```python class omni.graph.core.INodeTypeForwarding2 ``` - Bases: `_INodeTypeForwarding2` - @brief Interface that creates a forward on a request for a node type to a different node type - There are a couple of different common use cases for needing a forward: - Node type gets renamed - Node type moves from one extension to another - The node type forward specifies the unique node type name so if extension omni.my.extension has a node whose type is specified as “MyNode” then the forward must be from “omni.my.extension.MyNode”. - The forwarding is version-based as well, where the version is a minimum number required for forwarding, the usual node version update mechanism not withstanding. For example, if you set up a forward from “omni.nodes.MyNode” version 2 to “omni.my_nodes.MyNode” version 3 then any larger version number is forwarded to the same location: - omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3) - omni.nodes.MyNode(3) -> omni.my_nodes.MyNode(3) - omni.nodes.MyNode(4) -> omni.my_nodes.MyNode(3) - The forwards can also have multiple versions forwarding to different locations, so if on top of the above forward you also add a forward from “omni.nodes.MyNode” version 3 to “omni.new_nodes.MyNode” version 4 then these become the example forward locations: - omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3) - omni.nodes.MyNode(3) -> omni.new_nodes.MyNode(4) - omni.nodes.MyNode(4) -> omni.new_nodes.MyNode(4) - Version numbers lower than the first forward are left as-is - omni.nodes.MyNode(1) -> omni.nodes.MyNode(1) - @note The usual mechanism of calling updateVersionNumber on a node is only applied after a forward so in the above cases requesting omni.nodes.MyNode(2) does not call updateVersionNumber(1,2) on your omni.nodes.MyNode implementation. - Node type forwards are associative, so if A forwards to B and B forwards to C then when you request A you get C. Adding a new forward from omni.my_nodes.MyNode(3) to omni.new_nodes.MyNode(2) above yields this forwarding: - omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3) -> omni.new_nodes.MyNode(2) - omni.nodes.MyNode(3) -> omni.new_nodes.MyNode(4) - omni.nodes.MyNode(4) -> omni.new_nodes.MyNode(4) ### Methods - `__init__(*args, **kwargs)` - Overloaded function. - `inspect(self, inspector)` - Runs the inspector on the scheduling hints. ### Attributes ``` ## Methods ### __init__ Overloaded function. 1. __init__(self: omni.graph.core._omni_graph_core.INodeTypeForwarding2, arg0: omni.core._core.IObject) -> None 2. __init__(self: omni.graph.core._omni_graph_core.INodeTypeForwarding2) -> None ### inspect Runs the inspector on the scheduling hints. @param[in] inspector The inspector class @return true if the inspection ran successfully, false if the inspection type is not supported
omni.graph.core.in_compute.md
# in_compute ## in_compute Mark block of code executed at runtime. Optimizations can apply like setting values without undo support. This function is a context manager. Example: ```python with omni.graph.in_compute(): exec(state._code_object) ``` ### Yields - **None** – Just used to mark a compute section ```
omni.graph.core.IPrimView.md
# IPrimView ## IPrimView PrimView is an interface that provides a view to a set of prims for use with OmniGraph instancing. The prim view provides both a list of prims, and a layout of which prims can be treated as consecutive data in fabric ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | Overloaded function. | ### Attributes | Attribute | Description | |-----------|-------------| | `paths` | Returns the list of prim paths as a flat list. | | `prim_count` | | | `segments` | Returns the property paths as a list of lists of segments. | #### `__init__(*args, **kwargs)` ``` ## Overloaded function 1. `__init__(self: omni.graph.core._omni_graph_core.IPrimView, arg0: omni.core._core.IObject) -> None` 2. `__init__(self: omni.graph.core._omni_graph_core.IPrimView) -> None` ### paths property paths Returns the list of prim paths as a flat list. ### segments property segments Returns the property paths as a list of lists of segments. If the prim view supports ordering prims by bucket, then each sublist represents the prims in a single bucket, in the order they appear in the bucket. The order of the buckets is arbitrary, but stable between calls where the buckets have not been updated
omni.graph.core.ISchedulingHints.md
# ISchedulingHints ## ISchedulingHints - **Bases:** `_ISchedulingHints` - **Description:** Interface to the list of scheduling hints that can be applied to a node type ### Methods - `__init__(*args, **kwargs)` - Overloaded function. - `get_data_access(self, data_type)` - Get the type of access the node has for a given data type - `inspect(self, inspector)` - Runs the inspector on the scheduling hints. - `set_data_access(self, data_type, new_access_type)` - Set the flag describing how a node accesses particular data in its compute _abi (defaults to no access). ### Attributes - `compute_rule` - `thread_safety` ### __init__ ( *args , **kwargs ) Overloaded function. 1. __init__(self: omni.graph.core._omni_graph_core.ISchedulingHints, arg0: omni.core._core.IObject) -> None 2. __init__(self: omni.graph.core._omni_graph_core.ISchedulingHints) -> None ### get_data_access ( self: omni.graph.core._omni_graph_core._ISchedulingHints , data_type: omni.graph.core._omni_graph_core.eAccessLocation ) → omni.graph.core._omni_graph_core.eAccessType Get the type of access the node has for a given data type @param[in] dataType Type of data for which access type is being modified @returns Value of the access type flag ### inspect ( self: omni.graph.core._omni_graph_core.ISchedulingHints , inspector: omni::core::Api<omni::inspect::IInspector_abi> ) → bool Runs the inspector on the scheduling hints. @param[in] inspector The inspector class @return true if the inspection ran successfully, false if the inspection type is not supported ### set_data_access ( self: omni.graph.core._omni_graph_core._ISchedulingHints , data_type: omni.graph.core._omni_graph_core.eAccessLocation , new_access_type: omni.graph.core._omni_graph_core.eAccessType ) → None Set the flag describing how a node accesses particular data in its compute _abi (defaults to no access). Setting any of these flags will, in most cases, automatically mark the node as “not threadsafe”. One current exception to this is allowing a node to be both threadsafe and a writer to USD, since such behavior can be achieved if delayed writebacks (e.g. “registerForUSDWriteBack”) are utilized in the node’s compute method. @param[in] dataType Type of data for which access type is being modified @param[in] newAccessType New value of the access type flag
omni.graph.core.ISchedulingHints2.md
# ISchedulingHints2 ## ISchedulingHints2 - Bases: `_ISchedulingHints2` - Interface extension for ISchedulingHints that adds a new “pure” hint ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | Overloaded function. | ### Attributes | Attribute | Description | |-----------|-------------| | `purity_status` | | ### `__init__` - Overloaded function. - `__init__(self: omni.graph.core._omni_graph_core.ISchedulingHints2, arg0: omni.core._core.IObject) -> None` - `__init__(self: omni.graph.core._omni_graph_core.ISchedulingHints2) -> None` - `__init__(self: omni.graph.core._omni_graph_core.ISchedulingHints2, arg0: omni.graph.core._omni_graph_core.ISchedulingHints) -> None`
omni.graph.core.ISchedulingHints_omni.graph.core.ISchedulingHints.md
# ISchedulingHints ## ISchedulingHints - **Bases:** `_ISchedulingHints` - **Description:** Interface to the list of scheduling hints that can be applied to a node type ### Methods - `__init__(*args, **kwargs)` - **Description:** Overloaded function. - `get_data_access(self, data_type)` - **Description:** Get the type of access the node has for a given data type - `inspect(self, inspector)` - **Description:** Runs the inspector on the scheduling hints. - `set_data_access(self, data_type, new_access_type)` - **Description:** Set the flag describing how a node accesses particular data in its compute _abi (defaults to no access). ### Attributes - `compute_rule` - `thread_safety` __init__ ( *args , **kwargs ) Overloaded function. 1. __init__(self: omni.graph.core._omni_graph_core.ISchedulingHints, arg0: omni.core._core.IObject) -> None 2. __init__(self: omni.graph.core._omni_graph_core.ISchedulingHints) -> None get_data_access ( self: omni.graph.core._omni_graph_core._ISchedulingHints , data_type: omni.graph.core._omni_graph_core.eAccessLocation ) → omni.graph.core._omni_graph_core.eAccessType Get the type of access the node has for a given data type @param[in] dataType Type of data for which access type is being modified @returns Value of the access type flag inspect ( self: omni.graph.core._omni_graph_core.ISchedulingHints , inspector: omni::core::Api<omni::inspect::IInspector_abi> ) → bool Runs the inspector on the scheduling hints. @param[in] inspector The inspector class @return true if the inspection ran successfully, false if the inspection type is not supported set_data_access ( self: omni.graph.core._omni_graph_core._ISchedulingHints , data_type: omni.graph.core._omni_graph_core.eAccessLocation , new_access_type: omni.graph.core._omni_graph_core.eAccessType ) → None Set the flag describing how a node accesses particular data in its compute _abi (defaults to no access). Setting any of these flags will, in most cases, automatically mark the node as “not threadsafe”. One current exception to this is allowing a node to be both threadsafe and a writer to USD, since such behavior can be achieved if delayed writebacks (e.g. “registerForUSDWriteBack”) are utilized in the node’s compute method. @param[in] dataType Type of data for which access type is being modified @param[in] newAccessType New value of the access type flag # 标题(根据实际的HTML标题级别确定) ## 子标题(如果有) ### 更小的子标题(如果有) **加粗文本**(如果有) *斜体文本*(如果有) > 引用文本(如果有) 无序列表(如果有): - 列表项1 - 列表项2 有序列表(如果有): 1. 列表项1 2. 列表项2 代码块(如果有): ``` 代码内容 ``` 段落(如果有): 这里是段落内容。 分割线(如果有): --- 脚注(如果有): [文本信息](#)(注意:链接被替换为Markdown格式的占位符,实际不包含URL) 图片(如果有): ![图片描述](#)(注意:图片链接被删除,只保留描述文本)
omni.graph.core.is_attribute_plain_data.md
# is_attribute_plain_data  ## is_attribute_plain_data Is the given attribute numeric or string data? ### Parameters - **attrib** – The attribute in question ### Returns - True if the given attribute is numeric or string data ### Return type - bool
omni.graph.core.is_global_graph_prim.md
# is_global_graph_prim ## is_global_graph_prim ```python omni.graph.core.is_global_graph_prim(prim_path: str) -> bool ``` Determines if the prim path passed in represents a prim that is backing a global graph **Parameters:** - **prim_path** (str) – The path to the prim in question **Returns:** - True if the prim path represents a prim that is backing a global graph, False otherwise **Return type:** - bool ```
omni.graph.core.is_in_compute.md
# is_in_compute ## is_in_compute ```python omni.graph.core.is_in_compute() -> bool ``` Mark entry of OmniGraph runtime computation. **Returns:** - True if compute is currently underway **Return type:** - bool ```
omni.graph.core.IVariable.md
# IVariable ## IVariable ### Bases: - `_IVariable` ### Description: Object that contains a value that is local to a graph, available from anywhere in the graph ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | Overloaded function. | | `get(self, graph_context, instance_path)` | Get the value of a variable | | `get_array(self, graph_context, ...)` | Get the value of an array variable | | `set(self, graph_context, value, instance_path)` | Sets the value of a variable | | `set_type(self, variable_type)` | Changes the type of a variable. | ### Attributes | Attribute | Description | |-----------|-------------| | `category` | | | Property | Description | |----------|-------------| | `display_name` | | | `name` | | | `scope` | | | `source_path` | | | `tooltip` | | | `type` | Gets the data type of the variable. | | `valid` | | ### `__init__(*args, **kwargs)` Overloaded function. 1. `__init__(self: omni.graph.core._omni_graph_core.IVariable, arg0: omni.core._core.IObject) -> None` 2. `__init__(self: omni.graph.core._omni_graph_core.IVariable) -> None` ### `get(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, instance_path: str = None) -> object` Get the value of a variable - Parameters: - `graph_context` (omni.graph.core.GraphContext) – The GraphContext object to get the variable value from. - `instance_path` (str) – Optional path to the prim instance to fetch the variable value for. By default this will fetch the variable value from the graph prim. - Returns: - Value of the variable - Return type: - Any ### `get_array(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, get_for_write: bool = False, reserved_element_count: int = ...) -> ...` ### omni.graph.core.IVariable.get_array **Description:** Get the value of an array variable **Parameters:** - **graph_context** (omni.graph.core.GraphContext) – The GraphContext object to get the variable value from. - **get_for_write** (bool) – Should the data be retrieved for writing? - **reserved_element_count** (int) – If the data is to be retrieved for writing, preallocate this many elements - **instance_path** (str) – Optional path to the prim instance to fetch the variable value for. By default this will fetch the variable value from the graph prim. **Returns:** Value of the array variable **Return type:** Any ### omni.graph.core.IVariable.set **Description:** Sets the value of a variable **Parameters:** - **graph_context** (omni.graph.core.GraphContext) – The GraphContext object to store the variable value. - **on_gpu** (bool) – Is the data to be set on the GPU? - **instance_path** (str) – Optional path to the prim instance to set the variable value on. By default this will set the variable value on the graph prim. **Returns:** True if the value was successfully set **Return type:** bool ### omni.graph.core.IVariable.set_type **Description:** Changes the type of a variable. Changing the type of a variable may remove the variable’s default value. **Parameters:** - **variable_type** (omni::graph::core::Py_Type) – The new type for the variable. **Returns:** True if the type was successfully changed **Return type:** bool <dl class="py property"> <dt class="sig sig-object py" id="omni.graph.core.IVariable.type"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> type </span> </span> <a class="headerlink" href="#omni.graph.core.IVariable.type" title="Permalink to this definition"> &#x2021; </a> </dt> <dd> <p> Gets the data type of the variable. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The data type of the variable. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> omni.graph.core.Type </p> </dd> </dl> </dd> </dl>
omni.graph.core.IVariable_omni.graph.core.IVariable.md
# IVariable ## IVariable Object that contains a value that is local to a graph, available from anywhere in the graph ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | Overloaded function. | | `get(self, graph_context, instance_path)` | Get the value of a variable | | `get_array(self, graph_context, ...)` | Get the value of an array variable | | `set(self, graph_context, value, instance_path)` | Sets the value of a variable | | `set_type(self, variable_type)` | Changes the type of a variable. | ### Attributes | Attribute | Description | |-----------|-------------| | `category` | | | display_name | | --- | | name | | scope | | source_path | | tooltip | | [type](#omni.graph.core.IVariable.type) | | valid | ### __init__ ```python __init__(*args, **kwargs) ``` - Overloaded function. - __init__(self: omni.graph.core._omni_graph_core.IVariable, arg0: omni.core._core.IObject) -> None - __init__(self: omni.graph.core._omni_graph_core.IVariable) -> None ### get ```python get(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, instance_path: str = None) -> object ``` - Get the value of a variable - Parameters: - graph_context (omni.graph.core.GraphContext) – The GraphContext object to get the variable value from. - instance_path (str) – Optional path to the prim instance to fetch the variable value for. By default this will fetch the variable value from the graph prim. - Returns: Value of the variable - Return type: Any ### get_array ```python get_array(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, get_for_write: bool = False, reserved_element_count: int = ...) -> ... ``` ### Get the value of an array variable #### Parameters - **graph_context** (`omni.graph.core.GraphContext`) – The GraphContext object to get the variable value from. - **get_for_write** (`bool`) – Should the data be retrieved for writing? - **reserved_element_count** (`int`) – If the data is to be retrieved for writing, preallocate this many elements - **instance_path** (`str`) – Optional path to the prim instance to fetch the variable value for. By default this will fetch the variable value from the graph prim. #### Returns - Value of the array variable #### Return type - Any ### Sets the value of a variable #### Parameters - **graph_context** (`omni.graph.core.GraphContext`) – The GraphContext object to store the variable value. - **on_gpu** (`bool`) – Is the data to be set on the GPU? - **instance_path** (`str`) – Optional path to the prim instance to set the variable value on. By default this will set the variable value on the graph prim. #### Returns - True if the value was successfully set #### Return type - bool ### Changes the type of a variable. Changing the type of a variable may remove the variable’s default value. #### Parameters - **variable_type** (`omni.graph.core.Type`) – The new type for the variable. <dl class="field-list simple"> <dt class="field-odd"> Type </dt> <dd class="field-odd"> <p> ( <a class="reference internal" href="omni.graph.core.Type.html#omni.graph.core.Type" title="omni.graph.core.Type"> <em> omni.graph.core.Type </em> </a> ) – The type to switch the variable to. </p> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> True if the type was successfully changed. </p> </dd> <dt class="field-odd"> Return type </dt> <dd class="field-odd"> <p> bool </p> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.graph.core.IVariable.type"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> type </span> </span> </dt> <dd> <p> Gets the data type of the variable. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The data type of the variable. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> omni.graph.core.Type </p> </dd> </dl> </dd> </dl>
omni.graph.core.md
# omni.graph.core ## Submodules Summary: | Module | Description | |--------|-------------| | [omni.graph.core.typing](./omni.graph.core.typing.html) | OmniGraph submodule that handles all of the OmniGraph API typing information. | ## Classes Summary: | Class | Description | |-------|-------------| | [Attribute](omni.graph.core/omni.graph.core.Attribute.html) | An attribute, defining a data type and value that belongs to a node | | [AttributeData](omni.graph.core/omni.graph.core.AttributeData.html) | Reference to data defining an attribute’s value | | [AttributeDataValueHelper](omni.graph.core/omni.graph.core.AttributeDataValueHelper.html) | Class to manage getting and setting of omni.graph.core.AttributeData values. | | [AttributePortType](omni.graph.core/omni.graph.core.AttributePortType.html) | Port side of the attribute on its node | | [AttributeRole](omni.graph.core/omni.graph.core.AttributeRole.html) | Interpretation applied to the attribute data | | [AttributeType](omni.graph.core/omni.graph.core.AttributeType.html) | Utilities for operating with the attribute data type class omni.graph.core.Type and related types | | [AttributeValueHelper](omni.graph.core/omni.graph.core.AttributeValueHelper.html) | Class to manage getting and setting of Attribute values. | | [BaseDataType](omni.graph.core/omni.graph.core.BaseDataType.html) | Basic data type for attribute data | | [BucketId](omni.graph.core/omni.graph.core.BucketId.html) | internal Use only, and obsolete: This type was only useful for writing back to USD, which cannot be achieved anymore through this type. | - **Bundle** - —– FOR USE BY GENERATED CODE ONLY —– - **BundleChangeType** - Enumeration representing the type of change that occurred in a bundle. - **BundleChanges** - —– FOR USE BY GENERATED CODE ONLY —– - **BundleContainer** - —– FOR USE BY GENERATED CODE ONLY —– - **BundleContents** - —– FOR USE BY GENERATED CODE ONLY —– - **BundleWriteBlock** - Creates a thread-local scope to ensure that each bundle - **ComputeGraph** - Main OmniGraph interface registered with the extension system - **ConnectionInfo** - Attribute and connection type in a given graph connection - **ConnectionType** - Type of connection - **Controller** - Class to provide a simple interface to a variety OmniGraph manipulation functions. - **DataView** - Helper class for getting and setting attribute data values. The setting operation is undoable. - **DataWrapper** - Wrapper around typed memory data. - **Database** - Base class for the generated database class for .ogn nodes (Python and C++ implementations) - **Device** - Device type for memory location of the data types - **Dtype** - Common base type for dtypes, defining the members each needs to populate - **DynamicAttributeAccess** - Base class for the generated classes that contain the access properties for all attributes. - **DynamicAttributeInterface** - Class providing a container for dynamic attribute access interfaces. - **ExecutionAttributeState** - Current execution state of an attribute [DEPRECATED: See omni.graph.action.IActionGraph] - **ExtendedAttributeType** - Extended attribute type, if any - **ExtensionInformation** - Class that manages information about the relationships between nodes and node types, and extensions - **FileFormatVersion** - Version number for the OmniGraph file format - **FunctionResult** - [内容被截断,请提供完整信息以便继续转换] - Interface extension for ISchedulingHints that adds a new “pure” hint - IVariable: Object that contains a value that is local to a graph, available from anywhere in the graph - MemoryType: Default memory location for an attribute or node’s data - Node: An element of execution within a graph, containing attributes and connected to other nodes - NodeController: Helper class that provides a simple interface to modifying the contents of a node - NodeEvent: Node modification event. - NodeType: Definition of a node’s interface and structure - NodeTypeConstructionError: Exception specific to caught errors in the node type construction process - ObjectLookup: Helper to extract OmniGraph types from various types of descriptions for them. - OmniGraphAttributeError: Exception to raise when an OmniGraph operation encountered an unrecognized or illegal attribute value - OmniGraphBindingError: Common base class for all non-exit exceptions. - OmniGraphError: Exception to raise when there is an error in an OmniGraph operation - OmniGraphInspector: Provides simple interfaces for inspection of OmniGraph objects - OmniGraphTypeError: Exception to raise when an OmniGraph operation encountered an unrecognized or illegal type - OmniGraphValueError: Exception to raise when an OmniGraph operation encountered an illegal value - PerNodeKeys: Set of key values for per-node data. - PtrToPtrKind: Memory type for the pointer to a GPU data array - ReadOnlyError: Exception to raise when there is a write operation on a read-only attribute (i.e. an input) - RuntimeAttribute: —– FOR USE BY GENERATED CODE ONLY —– - Settings: Class that packages up all of the OmniGraph settings handling into a common location. The settings themselves - Severity: Severity level of the log message - ThreadsafetyTestUtils: | Name | Description | |------|-------------| | ThreadsafetyTestUtils | Utilities for Running Threadsafety Unit Tests from Python Generators for OG nodes | | Type | Full definition of the data type owned by an attribute | | TypedValue | Class that encapsulates an arbitrary value with an explicit data type. This can be used when the | | WrappedArrayType | Enum for the type of array data returned from the get methods | | eAccessLocation | What type of non-attribute data does this node access | | eAccessType | How does the node access the data described by the enum eAccessLocation | | eComputeRule | How the node is allowed to be computed | | ePurityStatus | The purity of the node implementation. For some context, a “pure” node is | | eThreadSafety | How thread safe is the node during evaluation | | eVariableScope | Scope in which the variable has been made available | ### Functions Summary: | Name | Description | |------|-------------| | attribute_value_as_usd | Returns the value, converted into a type suitable for setting through the USD API compatible with | | create_node_type | Decorator to transform a Python function into an OmniGraph node type definition. | | data_shape_from_type | Return the dtype,shape information that corresponds to the given attribute type. | | developer_mode_active | Check to see if AutoNode developer mode is active on the given extension: | | get_graph_settings | Return the current settings for the graph. This is just a copy of the settings. Changing it will not | | get_kit_version | Returns the currently running version of Kit as a tuple of (major, minor) numbers. | | get_port_type_namespace | Returns a string representing the namespace attributes of the named port type reside in | | in_compute | Mark block of code executed at runtime. Optimizations can apply like setting values without undo support. | | is_attribute_plain_data | Is the given attribute numeric or string data? | | is_in_compute | Mark entry of OmniGraph runtime computation. | | python_value_as_usd | | - python_value_as_usd Converts the given python value to the equivalent USD value - resolve_base_coupled Resolves attribute types given a set of attributes, that can have differing tuple counts and/or array depth - resolve_fully_coupled Resolves attribute types given a set of attributes which are fully type coupled - traverse_downstream_graph Traverses the nodes downstream from the input nodes and apply the predicate on visited nodes - traverse_upstream_graph Traverses the nodes upstream from the input nodes and apply the predicate on visited nodes - acquire_interface acquire_interface(plugin_name: str = None, library_path: str = None) -> omni.graph.core._omni_graph_core.ComputeGraph - attach attach(stage_id: int, mps: float) -> None - create_prim_view_from_prims create_prim_view_from_prims(prims: list) -> omni.graph.core._omni_graph_core.IPrimView - create_prim_view_from_query create_prim_view_from_query(include: list, exclude: list = []) -> omni.graph.core._omni_graph_core.IPrimView - deregister_node_type deregister_node_type(name: str) -> bool - deregister_post_load_file_format_upgrade_callback deregister_post_load_file_format_upgrade_callback(postload_handle: int) -> None - deregister_pre_load_file_format_upgrade_callback deregister_pre_load_file_format_upgrade_callback(preload_handle: int) -> None - detach detach() -> None - get_all_graphs get_all_graphs() -> List[omni.graph.core._omni_graph_core.Graph] - get_all_graphs_and_subgraphs get_all_graphs_and_subgraphs() -> List[omni.graph.core._omni_graph_core.Graph] - get_bundle_tree_factory_interface get_bundle_tree_factory_interface() -> omni.graph.core._omni_graph_core.IBundleFactory - get_compute_cuda_device get_compute_cuda_device() -> int - get_compute_graph_contexts get_compute_graph_contexts() -> List[omni.graph.core._omni_graph_core.GraphContext] - get_global_orchestration_graphs get_global_orchestration_graphs() -> List[omni.graph.core._omni_graph_core.Graph] - get_global_orchestration_graphs_in_pipeline_stage get_global_orchestration_graphs_in_pipeline_stage(pipeline_stage: omni.graph.core._omni_graph_core.GraphPipelineStage) -> List[omni.graph.core._omni_graph_core.Graph] | 方法名 | 描述 | | --- | --- | | get_graph_by_path | get_graph_by_path(path: str) -> object | | get_graphs_in_pipeline_stage | get_graphs_in_pipeline_stage(pipeline_stage: omni.graph.core._omni_graph_core.GraphPipelineStage) -> List[omni.graph.core._omni_graph_core.Graph] | | get_node_by_path | get_node_by_path(path: str) -> object | | get_node_categories_interface | get_node_categories_interface() -> omni.graph.core._omni_graph_core.INodeCategories | | get_node_type | get_node_type(node_type_name: str) -> omni.graph.core._omni_graph_core.NodeType | | get_node_type_forwarding_interface | get_node_type_forwarding_interface() -> omni::core::Api&lt;omni::graph::core::unstable::INodeTypeForwarding_abi&gt; | | get_node_type_forwarding_interface2 | get_node_type_forwarding_interface2() -> omni::core::Api&lt;omni::graph::core::INodeTypeForwarding2_abi&gt; | | get_registered_nodes | get_registered_nodes() -> List[str] | | is_global_graph_prim | is_global_graph_prim(prim_path: str) -> bool | | on_shutdown | on_shutdown() -> None | | register_node_type | register_node_type(name: object, version: int) -> None | | register_post_load_file_format_upgrade_callback | register_post_load_file_format_upgrade_callback(callback: object) -> int | | register_pre_load_file_format_upgrade_callback | register_pre_load_file_format_upgrade_callback(callback: object) -> int | | register_python_node | register_python_node() -> None | | release_interface | release_interface(arg0: omni.graph.core._omni_graph_core.ComputeGraph) -> None | | set_test_failure | set_test_failure(has_failure: bool) -> None | | shutdown_compute_graph | shutdown_compute_graph() -> None | | test_failure_count | test_failure_count() -> int | | update | update(current_time: float, elapsed_time: float) -> None |
omni.graph.core.MemoryType.md
# MemoryType ## MemoryType - **Bases:** `pybind11_object` - **Description:** Default memory location for an attribute or node’s data - **Members:** - CPU : The memory is on the CPU by default - CUDA : The memory is on the GPU by default - ANY : The memory does not have any default device ### Methods | Method | Description | |--------|-------------| | `__init__(self, value)` | | ### Attributes | Attribute | Description | |-----------|-------------| | `ANY` | | | `CPU` | | | `CUDA` | | | `name` | | | `value` | | **omni.graph.core._omni_graph_core.MemoryType** , **value** : **int** ) → **None** **property** **name**
omni.graph.core.Node.md
# Node ## Class: omni.graph.core.Node An element of execution within a graph, containing attributes and connected to other nodes ### Methods - **__init__(*args, **kwargs)** - **clear_old_compute_messages(self)** - Clears all compute messages logged for the node prior to its most recent evaluation. - **create_attribute(self, attributeName, ...)** - Creates an attribute with the specified name, type, and port type and returns success state. - **deregister_on_connected_callback(self, callback)** - De-registers the on_connected callback to be invoked when attributes connect. - **deregister_on_disconnected_callback(self, ...)** - De-registers the on_disconnected callback to be invoked when attributes disconnect. - **deregister_on_path_changed_callback(self, ...)** - Deregisters the on_path_changed callback to be invoked when anything changes in the stage. <p> get_attribute (self, name) </p> <p> Given the name of an attribute returns an attribute object to it. </p> <p> get_attribute_exists (self, name) </p> <p> Given an attribute name, returns whether this attribute exists or not. </p> <p> get_attributes (self) </p> <p> Returns the list of attributes on this node. </p> <p> get_backing_bucket_id (self) </p> <p> This method was internal, and is now obsolete: it does not function anymore. </p> <p> get_compound_graph_instance (self) </p> <p> Returns a handle to the associated sub-graph, if the given node is a compound node. </p> <p> get_compute_count (self) </p> <p> Returns the number of instances on which this node's computation has been invoked. </p> <p> get_compute_messages (self, severity) </p> <p> Returns a list of the compute messages currently logged for the node at a specific severity. </p> <p> get_compute_vectorized_count (self) </p> <p> Returns the number of vectorized segments on which this node's computation has been invoked. </p> <p> get_event_stream (self) </p> <p> Get the event stream the node uses for notification of changes. </p> <p> get_graph (self) </p> <p> Get the graph to which this node belongs </p> <p> get_graph_instance_id (self[, instance]) </p> <p> <dl class="field-list simple"> <dt class="field-odd"> param instance </dt> <dd class="field-odd"> <p> an index that identify the graph instance for which a unique ID is requested </p> </dd> </dl> </p> <p> get_handle (self) </p> <p> Get an opaque handle to the node </p> <p> get_node_type (self) </p> <p> Gets the node type of this node </p> <p> get_prim_path (self) </p> <p> Returns the path to the prim currently backing the node. </p> <p> get_type_name (self) </p> - `get_type_name(self)` - Get the node type name - `get_wrapped_graph(self)` - Get the graph wrapped by this node - `increment_compute_count(self)` - Increments the node's compute counter. - `is_backed_by_usd(self)` - Check if the node is back by USD or not - `is_compound_node(self)` - Returns whether this node is a compound node. - `is_disabled(self)` - Check if the node is currently disabled - `is_valid(self)` - Check the validity of the node - `log_compute_message(self, severity, message)` - Logs a compute message of a given severity for the node. - `node_id(self)` - Returns a unique identifier value for this node. - `register_on_connected_callback(self, callback)` - Registers a callback to be invoked when the node has attributes connected. - `register_on_disconnected_callback(self, callback)` - Registers a callback to be invoked when the node has attributes disconnected. - `register_on_path_changed_callback(self, callback)` - Registers a callback to be invoked when a path changes in the stage. - `remove_attribute(self, attributeName)` - Removes an attribute with the specified name and type and returns success state. - `request_compute(self)` - Requests a compute of this node - `resolve_coupled_attributes(self, attributesArray)` - Resolves attribute types given a set of attributes which are fully type coupled. - `resolve_partially_coupled_attributes(self, attributesArray)` - Resolves attribute types given a set of attributes which are partially type coupled. | Method | Description | | --- | --- | | `resolve_partially_coupled_attributes(self, ...)` | Resolves attribute types given a set of attributes, that can have differing tuple counts and/or array depth, and differing but convertible base data type. | | `set_compute_incomplete(self)` | Informs the system that compute is incomplete for this frame. | | `set_disabled(self, disabled)` | Sets whether the node is disabled or not. | ### `__init__(self, *args, **kwargs)` ### `clear_old_compute_messages(self)` Clears all compute messages logged for the node prior to its most recent evaluation. Messages logged during the most recent evaluation remain untouched. Normally this will be called during graph evaluation so it is of little use unless you’re writing your own evaluation manager. **Returns:** - The number of messages that were deleted. - Return type: `int` ### `create_attribute(self, attributeName: str, attributeType: omni::graph::core::Py_Type, portType: omni.graph.core._omni_graph_core.AttributePortType = <AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT: 0>, value: object = None, extendedType: omni.graph.core._omni_graph_core.ExtendedAttributeType = <ExtendedAttributeType.EXTENDED_ATTR_TYPE_REGULAR: 0>, unionTypes: str = '')` Creates an attribute with the specified name, type, and port type and returns success state. **Parameters:** - `attributeName`: The name of the attribute. - `attributeType`: The type of the attribute. - `portType`: The type of the port (default is input). - `value`: The initial value of the attribute (default is None). - `extendedType`: The extended type of the attribute (default is regular). - `unionTypes`: Union types for the attribute (default is an empty string). **Returns:** - Success state: `bool` - **attributeName** (`str`) – Name of the attribute. - **attributeType** (`omni.graph.core.Type`) – Type of the attribute. - **portType** (`omni.graph.core.AttributePortType`) – The port type of the attribute, defaults to `omni.graph.core.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT` - **value** (`Any`) – The initial value to set on the attribute, default is None - **extendedType** (`omni.graph.core.ExtendedAttributeType`) – The extended type of the attribute, defaults to `omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_REGULAR` - **unionTypes** (`str`) – Comma-separated list of union types if the extended type is `omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION`, defaults to empty string for non-union types. ### Returns - True if the creation was successful, else False ### Return type - bool ### deregister_on_connected_callback ```python deregister_on_connected_callback(self: omni.graph.core._omni_graph_core.Node, callback: int) -> None ``` De-registers the on_connected callback to be invoked when attributes connect. #### Parameters - **callback** (`callable`) – The handle that was returned during the register_on_connected_callback call ### deregister_on_disconnected_callback ```python deregister_on_disconnected_callback(self: omni.graph.core._omni_graph_core.Node, callback: int) -> None ``` De-registers the on_disconnected callback to be invoked when attributes disconnect. #### Parameters - **callback** (`callable`) – The handle that was returned during the register_on_disconnected_callback call ### deregister_on_path_changed_callback ```python deregister_on_path_changed_callback(self: omni.graph.core._omni_graph_core.Node, callback: int) -> None ``` De-registers the on_path_changed callback to be invoked when the path changes. ``` ### deregister_on_path_changed_callback **Deprecated:** Deregisters the on_path_changed callback to be invoked when anything changes in the stage. **Parameters:** - **callback** (callable) – The handle that was returned during the register_on_path_changed_callback call ### get_attribute Given the name of an attribute returns an attribute object to it. **Parameters:** - **name** (str) – The name of the attribute **Returns:** - Attribute with the given name, or None if it does not exist on the node **Return type:** - omni.graph.core.Attribute ### get_attribute_exists Given an attribute name, returns whether this attribute exists or not. **Parameters:** - **name** (str) – The name of the attribute **Returns:** - True if the attribute exists on this node, else False **Return type:** - bool ### get_attributes **Returns:** - List of attributes omni.graph.core._omni_graph_core.Attribute ] Returns the list of attributes on this node. get_backing_bucket_id(self: omni.graph.core._omni_graph_core.Node) -> omni::fabric::BucketId This method was internal, and is now obsolete: it does not function anymore. In order to write back to USD, you can directly use the USD API. get_compound_graph_instance(self: omni.graph.core._omni_graph_core.Node) -> omni::graph::core::Py_Graph Returns a handle to the associated sub-graph, if the given node is a compound node. - Returns: The subgraph - Return type: omni.graph.core.Graph get_compute_count(self: omni.graph.core._omni_graph_core.Node) -> int Returns the number of instances on which this node’s computation has been invoked. The counter has a limited range and will eventually roll over to 0, so a higher count cannot be assumed to represent a more recent compute than an older one. - Returns: Number of instances this node’s computation has been invoked since the counter last rolled over to 0. - Return type: int get_compute_messages(self: omni.graph.core._omni_graph_core.Node, severity: omni::graph::core::ogn::Severity) -> List[str] Returns a list of the compute messages currently logged for the node at a specific severity. - Parameters: - severity: omni.graph.core.Severity ### Severity level of the message ### Returns The list of messages, may be empty. ### Return type list[str] ### Returns Number of vectorized segments on which this node’s computation has been invoked since the counter last rolled over to 0. ### Return type int ### Returns Event stream to monitor for node changes ### Return type carb.events.IEventStream ### Returns Graph associated with the current node. The returned graph will be invalid if the node is not valid. ### Return type omni.graph.core.Graph ### Returns Graph instance ID ### Parameters - `instance`: int = 18446744073709551614 ### get_graph_instance_id **Parameters** - **instance** (`int`) – an index that identify the graph instance for which a unique ID is requested - **instantiated** – Be aware that even if not - **graph** – the authoring **Returns** - A unique name that identifies the graph for the requested index. ### get_handle **Returns** - a unique handle to the node **Return type** - `int` ### get_node_type **Returns** - The node type from which this node was created. **Return type** - `omni.graph.core.NodeType` ### get_prim_path **Returns** - The path to the prim currently backing the node. ### get_type_name **Returns** - The type name of the node. ### get_wrapped_graph - **Description**: Get the graph wrapped by this node - **Returns**: The graph wrapped by the current node, if any. The returned graph will be invalid if the node does not wrap a graph or is invalid. - **Return type**: omni::graph::core::Py_Graph ### increment_compute_count - **Description**: Increments the node’s compute counter. This method is provided primarily for debugging and experimental uses and should not normally be used by end-users. - **Returns**: The new compute counter. This may be zero if the counter has just rolled over. - **Return type**: int ### is_backed_by_usd - **Description**: Check if the node is back by USD or not - **Returns**: True if the current node is by an USD prim on the stage. - **Return type**: bool ### is_compound_node - **Description**: Returns whether this node is a compound node. A compound node is a node that has a node type that is defined by an OmniGraph. - **Returns**: True if this node is a compound node, False otherwise. - **Return type**: bool ### is_disabled - **Description**: (Description not provided in the HTML snippet) - **Returns**: (Returns not provided in the HTML snippet) - **Return type**: (Return type not provided in the HTML snippet) ### is_disabled ```python def is_disabled(self: omni.graph.core._omni_graph_core.Node): → bool ``` Check if the node is currently disabled **Returns** - True if the node is disabled. **Return type** - bool --- ### is_valid ```python def is_valid(self: omni.graph.core._omni_graph_core.Node): → bool ``` Check the validity of the node **Returns** - True if the node is valid. **Return type** - bool --- ### log_compute_message ```python def log_compute_message(self: omni.graph.core._omni_graph_core.Node, severity: omni.graph.core.ogn.Severity, message: str): → bool ``` Logs a compute message of a given severity for the node. This method is intended to be used from within the compute() method of a node to alert the user to any problems or issues with the node’s most recent evaluation. They are accumulated until the next successful evaluation at which point they are cleared. If duplicate messages are logged, with the same severity level, only one is stored. **Parameters** - **severity** (omni.graph.core.Severity) – Severity level of the message. - **message** (str) – The message. **Returns** - True if the message has already been logged, else False **Return type** - bool --- ### node_id ```python def node_id(self: omni.graph.core._omni_graph_core.Node): → int ``` Returns a unique identifier value for this node. **Returns** - Unique identifier value for the node - not persistent through file save and load **Return type** - int ## register_on_connected_callback Registers a callback to be invoked when the node has attributes connected. The callback takes 2 parameters: the attributes from and attribute to of the connection. ### Parameters - **callback** (callable) – The callback function ### Returns - A handle that could be used for deregistration. ### Return type - int ## register_on_disconnected_callback Registers a callback to be invoked when the node has attributes disconnected. The callback takes 2 parameters: the attributes from and attribute to of the disconnection. ### Parameters - **callback** (callable) – The callback function ### Returns - A handle identifying the callback that can be used for deregistration. ## register_on_path_changed_callback Registers a callback to be invoked when a path changes in the stage. The callback takes 1 parameter: a list of the paths that were changed. [DEPRECATED] ### Parameters - **callback** (callable) – The callback function ### Returns - A handle identifying the callback that can be used for deregistration. ### omni.graph.core.Node.remove_attribute Removes an attribute with the specified name and type and returns success state. **Parameters** - **attributeName** (str) – Name of the attribute. **Returns** - True if the removal was successful, False if the attribute was not found **Return type** - bool ### omni.graph.core.Node.request_compute Requests a compute of this node **Returns** - True if the request was successful, False if there was an error **Return type** - bool ### omni.graph.core.Node.resolve_coupled_attributes Resolves attribute types given a set of attributes which are fully type coupled. For example if node ‘Increment’ has one input attribute ‘a’ and one output attribute ‘b’ and the types of ‘a’ and ‘b’ should always match. If the input is resolved then this function will resolve the output to the same type. It will also take into consideration available conversions on the input size. The type of the first (resolved) provided attribute will be used to resolve others or select appropriate conversions Note that input attribute types are never inferred from output attribute types. This function should only be called from the INodeType function ‘on_connection_type_resolve’ **Parameters** - **attributesArray** (list[omni.graph.core.Attribute]) – Array of attributes to be resolved as a coupled group **Returns** - True if successful, False otherwise, usually due to mismatched or missing resolved types **Return type** - bool ### resolve_partially_coupled_attributes ( self: omni.graph.core._omni_graph_core.Node, attributesArray: List[omni.graph.core._omni_graph_core.Attribute], tuplesArray: list, arraySizesArray: list, rolesArray: List[omni::fabric::AttributeRole] ) → bool Resolves attribute types given a set of attributes, that can have differing tuple counts and/or array depth, and differing but convertible base data type. The three input buffers are tied together, holding the attribute, the tuple count, and the array depth of the types to be coupled. This function will solve base type conversion by targeting the first provided type in the list, for all other ones that require it. For example if node ‘makeTuple2’ has two input attributes ‘a’ and ‘b’ and one output ‘c’ and we want to resolve any float connection to the types ‘a’:float, ‘b’:float, ‘c’:float[2] (convertible base types and different tuple counts) then the input buffers would contain: attrsBuf = [a, b, c] tuplesBuf = [1, 1, 2] arrayDepthsBuf = [0, 0, 0] rolesBuf = [AttributeRole::eNone, AttributeRole::eNone, AttributeRole::eNone] This is worth noting that ‘b’ could be of any type convertible to float. But since the first provided attribute is ‘a’, the type of ‘a’ will be used to propagate the type resolution. Note that input attribute types are never inferred from output attribute types. This function should only be called from the INodeType function ‘on_connection_type_resolve’ #### Parameters - **attributesArray** (list[omni.graph.core.Attribute]) – Array of attributes to be resolved as a coupled group - **tuplesArray** (list[int]) – Array of tuple count desired for each corresponding attribute. Any value of None indicates the found tuple count is to be used when resolving. - **arraySizesArray** (list[int]) – Array of array depth desired for each corresponding attribute. Any value of None indicates the found array depth is to be used when resolving. - **rolesArray** (list[omni.graph.core.AttributeRole]) – Array of role desired for each corresponding attribute. A value of AttributeRole::eUnknown indicates the found role is to be used when resolving. #### Returns True if successful, False otherwise, usually due to mismatched or missing resolved types #### Return type bool ### set_compute_incomplete ( self: omni.graph.core._omni_graph_core.Node ) → None Informs the system that compute is incomplete for this frame. In lazy evaluation systems, this node will be scheduled on the next frame since it still has more work to do. ### set_disabled ( self: omni.graph.core._omni_graph_core.Node, disabled: bool ) → None <dt> <em> <span class="n"> <span class="pre"> set_disabled </span> </span> <span class="sig-paren"> ( </span> <span class="n"> <span class="pre"> bool </span> </span> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </em> </dt> <dd> <p> Sets whether the node is disabled or not. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <p> <strong> disabled </strong> ( <em> bool </em> ) – True for disabled, False for not. </p> </dd> </dl> </dd>
omni.graph.core.NodeController.md
# NodeController ## Overview Helper class that provides a simple interface to modifying the contents of a node. ### Methods - **__init__(*args, **kwargs)** - Initializes the class with a particular configuration. - **create_attribute(*args, **kwargs)** - Create a new dynamic attribute on the node. - **promote_attribute(*args, **kwargs)** - Promotes an attribute on a node in a compound graph, making it accessible to the parenting compound node. - **remove_attribute(*args, **kwargs)** - Removes an existing dynamic attribute from a node. - **safe_node_name(node_type_name[, abbreviated])** - (Description not provided in the HTML content) Returns a USD-safe node name derived from the node_type_name ### __init__ Initializes the class with a particular configuration. The arguments are flexible so that classes can initialize only what they need for the calls they will be making. The argument is optional and there may be other arguments present that will be ignored **Parameters** - **undoable** (bool) – If True the operations performed with this instance of the class are to be added to the undo queue, else they are done immediately and forgotten ### create_attribute Create a new dynamic attribute on the node This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context. **Parameters** - **obj** – Either cls or self depending on how the function was called - **node** – Node on which to create the attribute (path or og.Node) - **attr_name** – Name of the new attribute, either with or without the port namespace - **attr_type** – Type of the new attribute, as an OGN type string or og.Type - **attr_port** – Port type of the new attribute, default is og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT - **attr_default** – The initial value to set on the attribute, default is None which means use the type’s default - **attr_extended_type** – The extended type of the attribute, default is og.ExtendedAttributeType.REGULAR. If the extended type is og.ExtendedAttributeType.UNION then this parameter will be a 2-tuple with the second element being a list or comma-separated string of union types - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten **Returns** - The newly created attribute, None if there was a problem creating it **Return type** - omni.graph.core.Attribute ### omni.graph.core.NodeController.promote_attribute **Promotes an attribute on a node in a compound graph, making it accessible to the parenting compound node.** This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context. **Parameters** - **obj** – Either cls or self depending on how the function was called - **src_spec** – Specification of the attribute to be promoted - **name** – The name of the promoted attribute. If not specified, the namespace prefix will be prepended based - **src_spec.** (on) – - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) **Returns** The attribute created on the compound node that connects to the attribute **Return type** og.Attribute **Raises** - **OmniGraphError** – If attribute could not be found, the attribute does not belong to a compound, or the promoted name already exists ### omni.graph.core.NodeController.remove_attribute **Removes an existing dynamic attribute from a node.** This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context. **Parameters** - **obj** – Either cls or self depending on how the function was called - **attribute** – Reference to the attribute to be removed - **node** – If the attribute reference is a string the node is used to find the attribute to be removed - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten **Raises** - **OmniGraphError** – if the attribute was not found or could not be removed ### omni.graph.core.NodeController.safe_node_name **Class method to ensure a node name is safe.** Parameters: - **node_type_name** (str) – The name of the node type. - **abbreviated** (bool) – If True, the name will be abbreviated. Default is False. Returns: - The safe node name. ## 定义标题 ### Returns a USD-safe node name derived from the node_type_name **Parameters** - **node_type_name** – Fully namespaced name of the node type (e.g. omni.graph.nodes.Clamp) - **abbreviated** – If True then remove the namespace, else just make the separators into underscores **Returns** - A safe node name that roughly corresponds to the given node type name **Return type** - str
omni.graph.core.NodeEvent.md
# NodeEvent ## NodeEvent ```python class omni.graph.core.NodeEvent ``` Bases: ```python pybind11_object ``` Node modification event. Members: - CREATE_ATTRIBUTE : Attribute was created - REMOVE_ATTRIBUTE : Attribute was removed - ATTRIBUTE_TYPE_RESOLVE : Extended attribute type was resolved ### Methods ```python __init__(self, value) ``` ### Attributes - ATTRIBUTE_TYPE_RESOLVE - CREATE_ATTRIBUTE - REMOVE_ATTRIBUTE - name - value ```python __init__(self, value) ``` : omni.graph.core._omni_graph_core.NodeEvent , value : int ) → None property name
omni.graph.core.NodeType.md
# NodeType ## Class ```python class omni.graph.core.NodeType ``` **Bases:** ```python pybind11_object ``` **Definition:** Definition of a node’s interface and structure ## Methods - **__init__(*args, **kwargs)** - **add_extended_input(self, name, type, ...)** - Adds an extended input type to this node type. - **add_extended_output(self, name, type, ...)** - Adds an extended output type to this node type. - **add_extended_state(self, name, type, ...)** - Adds an extended state type to this node type. - **add_input(self, name, type, is_required[, ...])** - Adds an input to this node type. - **add_output(self, name, type, is_required[, ...])** - Adds an output to this node type. - **add_state(self, name, type, is_required[, ...])** - Adds a state to this node type. - `add_state(self, name, type, is_required[, ...])` - Adds an state to this node type. - `defined_at_runtime(self)` - Checks to see if this node type was defined at runtime or at build time - `get_all_categories(self)` - Gets the node type's categories - `get_all_metadata(self)` - Gets the node type's metadata - `get_all_subnode_types(self)` - Finds all subnode types of the current node type. - `get_metadata(self, key)` - Returns the metadata value for the given key. - `get_metadata_count(self)` - Gets the number of metadata values set on the node type - `get_node_type(self)` - Get this node type's name - `get_path(self)` - Gets the path to the node type definition - `get_scheduling_hints(self)` - Gets the set of scheduling hints currently set on the node type. - `has_state(self)` - Checks to see if instantiations of the node type has internal state - `inspect(self, inspector)` - Runs the inspector on the node type - `is_compound_node_type(self)` - Checks to see if this node type defines a compound node type - `is_valid(self)` - Checks to see if this object is valid - `set_has_state(self, has_state)` - Sets the boolean indicating a node has state. - `set_metadata(self, key, value)` - Sets the metadata value for the given key. | Method Name | Description | |-------------|-------------| | `set_metadata(self, key, value)` | Sets the metadata value for the given key. | | `set_scheduling_hints(self, scheduling_hints)` | Modify the scheduling hints defined on the node type. | ### `__init__(self, *args, **kwargs)` ### `add_extended_input(self, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType)` Adds an extended input type to this node type. Every node of this node type would then have this input. **Parameters:** - **name** (str) – The name of the input. - **type** (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated. For example, "double,float". - **is_required** (bool) – Whether the input is required or not. - **extended_type** (omni.graph.core._omni_graph_core.ExtendedAttributeType) – The kind of extended attribute this is. e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION. ### `add_extended_output(self, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType)` Adds an extended output type to this node type. Every node of this node type would then have this output. **Parameters:** - **name** (str) – The name of the output. - **type** (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated. For example, "double,float". - **is_required** (bool) – Whether the output is required or not. - **extended_type** (omni.graph.core._omni_graph_core.ExtendedAttributeType) – The kind of extended attribute this is. e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION. ### add_extended_output ```add_extended_output``` (self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType) → None - **Description**: Adds an extended output type to this node type. Every node of this node type would then have this output. - **Parameters**: - **name** (str) – The name of the output - **type** (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated. For example, "double,float" - **is_required** (bool) – Whether the output is required or not - **extended_type** (omni.graph.core.ExtendedAttributeType) – The kind of extended attribute this is. e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION ### add_extended_state ```add_extended_state``` (self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType) → None - **Description**: Adds an extended state type to this node type. Every node of this node type would then have this state. - **Parameters**: - **name** (str) – The name of the state attribute - **type** (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated. For example, "double,float" - **is_required** (bool) – Whether the state attribute is required or not - **extended_type** (omni.graph.core.ExtendedAttributeType) – The kind of extended attribute this is. e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION - **omni.graph.core.ExtendedAttributeType** – The kind of extended attribute this is e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION ### add_input `add_input(self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, default_value: object = None) -> None` Adds an input to this node type. Every node of this node type would then have this input. **Parameters:** - **name** (str) – The name of the input - **type** (str) – The type name of the input - **is_required** (bool) – Whether the input is required or not - **default_value** (any) – Default value for the attribute if it is not explicitly set (None means no default) ### add_output `add_output(self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, default_value: object = None) -> None` Adds an output to this node type. Every node of this node type would then have this output. **Parameters:** - **name** (str) – The name of the output - **type** (str) – The type name of the output - **is_required** (bool) – Whether the output is required or not - **default_value** (any) – Default value for the attribute if it is not explicitly set (None means no default) ### add_output Adds an output to this node type. Every node of this node type would then have this output. #### Parameters - **name** (str) – The name of the output - **type** (str) – The type name of the output - **is_required** (bool) – Whether the output is required or not - **default_value** (any) – Default value for the attribute if it is not explicitly set (None means no default) ### add_state Adds an state to this node type. Every node of this node type would then have this state. #### Parameters - **name** (str) – The name of the state - **type** (str) – The type name of the state - **is_required** (bool) – Whether the state is required or not - **default_value** (any) – Default value for the attribute if it is not explicitly set (None means no default) ### defined_at_runtime Checks to see if this node type was defined at runtime or at build time #### Returns - True if this node type was defined at runtime. #### Return type - bool ## get_all_categories - **Description**: Gets the node type’s categories - **Parameters**: - `self` (omni.graph.core._omni_graph_core.NodeType) - **Returns**: - A list of all categories associated with this node type - **Return type**: list[str] ## get_all_metadata - **Description**: Gets the node type’s metadata - **Parameters**: - `self` (omni.graph.core._omni_graph_core.NodeType) - **Returns**: - A dictionary of name:value metadata on the node type - **Return type**: dict[str,str] ## get_all_subnode_types - **Description**: Finds all subnode types of the current node type. - **Parameters**: - `self` (omni.graph.core._omni_graph_core.NodeType) - **Returns**: - Dictionary of type_name:type_object for all subnode types of this one - **Return type**: dict[str, omni.graph.core.NodeType] ## get_metadata - **Description**: Returns the metadata value for the given key. - **Parameters**: - `self` (omni.graph.core._omni_graph_core.NodeType) - `key` (str) – The metadata keyword - **Returns**: - Metadata value for the given keyword, or None if it is not defined - **Return type**: str <dd class="field-odd"> <p> str | None </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.NodeType.get_metadata_count"> <span class="sig-name descname"> <span class="pre"> get_metadata_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"> omni.graph.core._omni_graph_core.NodeType </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> Gets the number of metadata values set on the node type </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The number of metadata values currently defined on the node type. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> int </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.NodeType.get_node_type"> <span class="sig-name descname"> <span class="pre"> get_node_type </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"> omni.graph.core._omni_graph_core.NodeType </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> Get this node type’s name </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The name of this node type. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.NodeType.get_path"> <span class="sig-name descname"> <span class="pre"> get_path </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"> omni.graph.core._omni_graph_core.NodeType </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> Gets the path to the node type definition </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The path to the node type prim. For compound node definitions, this is path on the stage to the OmniGraphSchema.CompoundNodeType_1 object that defines the compound. For other node types, the path returned is unique, but does not represent a valid Prim on the stage. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.NodeType.get_scheduling_hints"> <span class="sig-name descname"> <span class="pre"> get_scheduling_hints </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"> omni.graph.core._omni_graph_core.NodeType </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> omni.graph.core._omni_graph_core.ISchedulingHints </span> </span> </dt> <dd> <p> Gets the set of scheduling hints currently set on the node type. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The scheduling hints for this node type </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> omni.graph.core.ISchedulingHints </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.NodeType.has_state"> <span class="sig-name descname"> <span class="pre"> has_state </span> ### omni.graph.core.NodeType.has_state ```python has_state(self: omni.graph.core._omni_graph_core.NodeType) -> bool ``` Checks to see if instantiations of the node type has internal state **Returns** - True if nodes of this type will have internal state data, False if not. **Return type** - bool ### omni.graph.core.NodeType.inspect ```python inspect(self: omni.graph.core._omni_graph_core.NodeType, inspector: omni::core::Api<omni::inspect::IInspector_abi>) -> bool ``` Runs the inspector on the node type **Parameters** - **inspector** (omni.inspect.Inspector) – The inspector to run **Returns** - True if the inspector was successfully run on the node type, False if it is not supported **Return type** - bool ### omni.graph.core.NodeType.is_compound_node_type ```python is_compound_node_type(self: omni.graph.core._omni_graph_core.NodeType) -> bool ``` Checks to see if this node type defines a compound node type **Returns** - True if this node type is a compound node type, meaning its implementation is defined by an OmniGraph **Return type** - bool ### omni.graph.core.NodeType.is_valid ```python is_valid(self: omni.graph.core._omni_graph_core.NodeType) -> bool ``` Checks to see if this object is valid **Returns** - True if this node type object is valid. **Return type** - bool ### omni.graph.core.NodeType.set_has_state ```python set_has_state(self: omni.graph.core._omni_graph_core.NodeType) -> None ``` Sets whether the node type has state **Returns** - None **Return type** - None ### omni.graph.core.NodeType.set_has_state ```python set_has_state(self: omni.graph.core._omni_graph_core.NodeType, has_state: bool) -> None ``` Sets the boolean indicating a node has state. **Parameters** - **has_state** (bool) – Whether the node has state or not ### omni.graph.core.NodeType.set_metadata ```python set_metadata(self: omni.graph.core._omni_graph_core.NodeType, key: str, value: str) -> bool ``` Sets the metadata value for the given key. **Parameters** - **key** (str) – The metadata keyword - **value** (str) – The value of the metadata ### omni.graph.core.NodeType.set_scheduling_hints ```python set_scheduling_hints(self: omni.graph.core._omni_graph_core.NodeType, scheduling_hints: omni.graph.core._omni_graph_core.ISchedulingHints) -> None ``` Modify the scheduling hints defined on the node type. **Parameters** - **scheduling_hints** (omni.graph.core._omni_graph_core.ISchedulingHints) – New set of scheduling hints for the node type
omni.graph.core.NodeTypeConstructionError.md
# NodeTypeConstructionError ## NodeTypeConstructionError ```python class omni.graph.core.NodeTypeConstructionError(Exception): """ Exception specific to caught errors in the node type construction process """ def __init__(*args, **kwargs): pass ``` ```
omni.graph.core.ObjectLookup.md
# ObjectLookup ## ObjectLookup ``` ```markdown Helper to extract OmniGraph types from various types of descriptions for them. These functions take flexible spec types that identify attributes, nodes, or graphs. In most cases the spec types can be either one of or a list of the objects being used or found by the functions. The forms each spec type can take are as follows: ``` ```markdown ### GraphSpec_t - An omni.graph.core.Graph object - A string containing the path to an omni.graph.core.Graph object - An Sdf.Path containing the path to an omni.graph.core.Graph object - A list of any of the above ``` ```markdown ### NodeSpec_t - An omni.graph.core.Node object - A string containing the path to an omni.graph.core.Node object - An Sdf.Path containing the path to an omni.graph.core.Node object - A Usd.Prim or Usd.Typed that is the USD backing of an omni.graph.core.Node object - None, for situations in which the node itself is redundant information - A 2-tuple consisting of a string and a omni.graph.core.GraphSpec_t, where the string is a relative path to the omni.graph.core.Node object within the omni.graph.core.Graph - A list of any of the above ``` ```markdown ### AttributeSpec_t - An omni.graph.core.Attribute object - A string containing the full path to the omni.graph.core.Attribute object on the USD stage - An Sdf.Path containing the full path to the omni.graph.core.Attribute object on the USD stage - A Usd.Attribute or Usd.Relationship that is the USD backing of an omni.graph.core.Attribute object - A 2-tuple consisting of a string and a NodeSpec_t, where the string is the omni.graph.core.Attribute object’s name within the omni.graph.core.Node - A list of any of the above ``` ```markdown ### Prim_t - A Usd.Prim or Usd.Typed object - A string containing the path to a Usd.Prim or Usd.Typed object - An Sdf.Path containing the path to a Usd.Prim or Usd.Typed object ``` ### Parameters #### NodeSpec_t - A NodeSpec_t, identifying a node whose USD backing Usd.Prim or Usd.Typed object is to be returned - A list of any of the above #### Variables_t - An omni.graph.core.IVariable object - A 2-tuple consisting of a omni.graph.core.GraphSpec_t and a string, where the string is the name of the variable - A string containing the path of the attribute representing the variable - An Sdf.Path containing the path of the attribute representing the variable - A list of any of the above ### Methods | Method | Description | |--------|-------------| | `attribute(attribute_id[, node_id, graph_id])` | Returns the OmniGraph attribute(s) corresponding to the variable type parameter | | `attribute_path(attribute_spec)` | Infers an attribute path from a spec where the attribute may or may not exist | | `attribute_type(type_id)` | Returns the OmniGraph attribute type corresponding to the variable type parameter. | | `compound_graph(node_id)` | Returns the compound graph of a given node or nodes, or None if the node does not contain a compound graph | | `compound_node(item_id)` | Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node | | `graph(graph_id)` | Returns the OmniGraph graph(s) corresponding to the variable type parameter | | `node(node_id[, graph_id])` | Returns the OmniGraph node(s) corresponding to the variable type parameter | | `node_path(node_spec)` | Infers a node path from a spec where the node may or may not exist | | `node_type(type_id)` | Returns the OmniGraph node type corresponding to the variable type parameter | | `prim(prim_id)` | Returns the prim(s) corresponding to the node descriptions | | `prim_path(prim_ids)` | Infers a prim path from a spec where the prim may or may not exist | | `split_graph_from_node_path(node_path)` | Find the lowest level graph from a node path | (attribute_specs) Returns the Usd.Attribute(s) corresponding to the attribute descriptions (attribute_specs) Returns the Usd.Property(s) corresponding to the attribute descriptions (attribute_specs) Returns the Usd.Relationships(s) corresponding to the attribute descriptions (variable_id) Returns the variables(s) corresponding to the variable description __init__() classmethod attribute(attribute_id: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed]) omni.graph.core._omni_graph_core.AttributePortType ] , str , str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] | list [ omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] , str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed ] | tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] , str , str | pxr.Sdf.Path | | --- | | omni.graph.core._omni_graph_core.Graph | | pxr.Usd.Prim | | pxr.Usd.Typed | | | | node_id : Optional[Union[str, Node, Path, Prim, Typed]] = None | | graph_id : Optional[Union[str, Path, Graph, Prim, Typed]] = None | | → Union[Attribute, List[Attribute]] | ``` Returns the OmniGraph attribute(s) corresponding to the variable type parameter Parameters ---------- - **attribute_id** – Information on which attribute to look for. If a list then get all of them. The attribute_id can take one of several forms, for maximum flexibility: - a 2-tuple consisting of the attribute name as str and a node spec. The named attribute must exist on the node - e.g. ("inputs:value", my_node) or ("inputs:value", "/Graph/MyNode"). This is equivalent to passing in the attribute and node spec as two different parameters. You’d use this form when requesting several attributes from different nodes rather than a bunch of attributes from the same node. - a str or Sdf.Path pointing directly to the attribute - e.g. "/Graph/MyNode/inputs:value" - a str that’s an attribute name, iff the node_id is also specified - a Usd.Attribute or Usd.Relationship pointing to the attribute’s reference on the USD side **node_id** – Node to which the attribute belongs, when only the attribute’s name is provided **graph_id** – Graph to which the node and attribute belong. Returns ------- Attribute(s) matching the description(s) - None where there is no match Raises ------ **OmniGraphError** – if the attribute description wasn’t one of the recognized types, if any of the attributes could not be found, or if there was a mismatch in node or graph and attribute. classmethod attribute_path(attribute_spec: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed]) classmethod attribute_path(attribute_spec) → str  Infers an attribute path from a spec where the attribute may or may not exist Parameters ---------- attribute_spec – Location of where the attribute would be, if it exists Returns ------- Location of the attribute, if it exists Return type ----------- str Raises ------ OmniGraphError – If there was something inconsistent in the attribute spec or a path could not be inferred classmethod attribute_type(type_id) → Type  Returns the OmniGraph attribute type corresponding to the variable type parameter. All legal OGN types are recognized, as well as the UNKNOWN type. Parameters ---------- type_id – Variable description of the attribute type object as one of: - An omni.graph.core.Type object - An OGN-style type description - e.g. “float[3]” - An Sdf-style type description - e.g. “float3” - An omni.graph.core.Attribute whose (resolved) type is to be retrieved - An omni.graph.core.AttributeData whose (resolved) type is to be retrieved Returns ------- Attribute type matching the description Return type ----------- omni.graph.core.Type Raises ------ OmniGraphError – If there was something inconsistent in the attribute spec or a path could not be inferred **OmniGraphError** – if the attribute type description wasn’t one of the recognized types ```python classmethod compound_graph(node_id: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Node | pxr.Usd.Prim | pxr.Usd.Typed | tuple[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed] | list[str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed] | tuple[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed]) -> Union[omni.graph.core._omni_graph_core.Graph] ``` ### compound_graph Returns the compound graph of a given node or nodes, or None if the node does not contain a compound graph. **Parameters:** - **node_id** – Information for the node to find. If a list then iterate over the list. - **Returns:** omni.graph.core.Graph | None | list[omni.graph.core.Graph | None]: The compound graph instances contained by the given nodes. If node does not encapsulate a compound graph, the value None is returned. - **Raises:** omni.graph.core.OmniGraphError: node_id description wasn’t a recognized type ### compound_node **Parameters:** - **item_id** – Union[str, Path, Graph, Prim, Typed, Node, tuple[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed], List[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed]] classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ### omni.graph.core.ObjectLookup.graph Returns the OmniGraph graph(s) corresponding to the variable type parameter #### Parameters - **graph_id** – Information for the graph to find. If a list then iterate over the list #### Returns - Graph(s) corresponding to the description(s) in the current scene, None where there is no match #### Return type - omni.graph.core.Graph | list[omni.graph.core.Graph] #### Raises - **OmniGraphError** – if a graph matching the identifier wasn’t found ### omni.graph.core.ObjectLookup.node #### Parameters - **node_id** – str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed | tuple str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] | list [ str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed ] | tuple [ str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] ] graph_id : Optional[Union[str, Path, Graph, Prim, Typed]] = None ) → Union[Node, List[Node]] ### Returns the OmniGraph node(s) corresponding to the variable type parameter #### Parameters - **node_id** – Information for the node to find. If a list then iterate over the list - **graph_id** – Identifier for graph to which the node belongs. #### Returns - Node(s) corresponding to the description(s) in the current graph, None where there is no match #### Return type - omni.graph.core.Node | list[omni.graph.core.Node] #### Raises - **OmniGraphError** – node description wasn’t a recognized type or if a mismatched graph was passed in - **og.OmniGraphValueError** – If the node description did not match a node in the graph ### Infers a node path from a spec where the node may or may not exist #### Parameters - **node_spec** – Description of a path to a node that may or may not exist #### Returns - The path inferred from the node spec. No assumption should be made about the validity of the path. #### Return type - str Raises ==== - **OmniGraphError** – If there was something inconsistent in the node spec or a path could not be inferred node_type ========= - **classmethod** `node_type(type_id: str | omni.graph.core._omni_graph_core.NodeType | omni.graph.core._omni_graph_core.Node | pxr.Usd.Prim | pxr.Usd.Typed | list[str | omni.graph.core._omni_graph_core.NodeType | omni.graph.core._omni_graph_core.Node | pxr.Usd.Prim | pxr.Usd.Typed]) -> Union[NodeType, List[NodeType]]` Returns the OmniGraph node type corresponding to the variable type parameter Parameters ---------- - **type_id** – Information used to identify the omni.graph.core.NodeType object; it will be one of: - **object** (an omni.graph.core.NodeType) – - **type** (a string that is the unique identifier of the node) – - **returned** (a Usd.Prim or Usd.Typed that is the USD backing of an omni.graph.core.Node whose type is to be) – - **returned** – - **above** (a list) – ### Parameters - **prim_id** – Information for the node to find. If a list then iterate over the list ### Returns - Prim(s) corresponding to the description(s) in the current graph, - None where there is no match ### Return type - Usd.Prim | list[Usd.Prim] ### Raises - OmniGraphError – if the node description(s) didn’t correspond to a valid prim(s). ### prim_path - **classmethod** `prim_path(prim_ids: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Node | pxr.Usd.Prim | pxr.Usd.Typed | omni.graph.core._omni_graph_core.Graph | list[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Node | pxr.Usd.Prim | pxr.Usd.Typed | omni.graph.core._omni_graph_core.Graph]) -> Union[str, List[str]]` - Infers a prim path from a spec where the prim may or may not exist #### Parameters - **prim_ids** – Identifier of a prim or list of prims that may or may not exist #### Returns - Path(s) inferred from the prim spec(s). No assumption should be made about their validity. #### Return type - str | list[str] #### Raises - OmniGraphError – If there was something inconsistent in the prim spec or a path could not be inferred ## split_graph_from_node_path ### Parameters - **node_path** – Full path to the node from the root ### Returns - Tuple[Graph, str] - where graph is the lowest graph in the tree and node_path is the relative path to the node from the graph ### Return type - tuple[omni.graph.core.Graph, str] ## usd_attribute ### Parameters - attribute_specs: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed] tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] , str , str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] | list [ omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] ] | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed ] | tuple [ str | tuple [ str ] ] classmethod usd_attribute(attribute_specs: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed]) -> Union[Attribute, List[Attribute]] Returns the Usd.Attribute(s) corresponding to the attribute descriptions Parameters ---------- attribute_specs : omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed] Location or list of locations from which to infer a matching Usd.Attribute Returns ------- Usd.Attribute(s) corresponding to the description(s) in the USD stage Return type ----------- Usd.Attribute | list[Usd.Attribute] Raises ------ OmniGraphError if the attribute description didn’t correspond to a valid Usd.Attribute. classmethod usd_property(attribute_specs: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed]) -> Union[Attribute, List[Attribute]] Returns the Usd.Attribute(s) corresponding to the attribute descriptions Parameters ---------- attribute_specs : omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed] Location or list of locations from which to infer a matching Usd.Attribute Returns ------- Usd.Attribute(s) corresponding to the description(s) in the USD stage Return type ----------- Usd.Attribute | list[Usd.Attribute] Raises ------ OmniGraphError if the attribute description didn’t correspond to a valid Usd.Attribute. omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed ] | tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] , str , str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] | list [ omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] , str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim ```python classmethod usd_relationship(attribute_specs: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str]) ``` Returns the Usd.Relationship corresponding to the attribute descriptions **Parameters** - **attribute_specs** – Location or list of locations from which to infer a matching Usd.Relationship **Returns** Usd.Relationship corresponding to the description(s) in the USD stage **Return type** Usd.Relationship | list[Usd.Relationship] **Raises** - **OmniGraphError** – if the attribute description didn’t correspond to a valid Usd.Relationship. | tuple [str, omni.graph.core._omni_graph_core.AttributePortType] , str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed ] | tuple [str | tuple [str, omni.graph.core._omni_graph_core.AttributePortType] , str, str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] | list [ omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple [str | tuple [str, omni.graph.core._omni_graph_core.AttributePortType] ] classmethod variable(variable_id: str) ( str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.IVariable | tuple [str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed, str] | list [str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.IVariable | tuple [str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed, str]] ) → Union [IVariable, List [IVariable]] Returns the variables(s) corresponding to the variable description Parameters ---------- variable_id – Information for the variable to find. If a list then iterate over the list Returns ------- <dl> <dd class="field-even"> <p> <dl class="simple"> <dt> Variables(s) corresponding to the </dt> <dd> <p> description(s) in the current graph, None where there is no match </p> </dd> </dl> </p> </dd> <dt class="field-odd"> Return type </dt> <dd class="field-odd"> <p> omni.graph.core.IVariable | list[omni.graph.core.IVariable] </p> </dd> <dt class="field-even"> Raises </dt> <dd class="field-even"> <p> **OmniGraphError** – if the variable description didn’t correspond to a valid variable </p> </dd> </dl>
omni.graph.core.OmniGraphAttributeError.md
# OmniGraphAttributeError ## OmniGraphAttributeError Exception to raise when an OmniGraph operation encountered an unrecognized or illegal attribute value ### __init__(*args, **kwargs) Returns the exception text, with stack trace information added if requested
omni.graph.core.OmniGraphBindingError.md
# OmniGraphBindingError ## OmniGraphBindingError ```python class omni.graph.core.OmniGraphBindingError(Exception) ``` ```python def __init__(*args, **kwargs): pass ```
omni.graph.core.OmniGraphBindingError_omni.graph.core.OmniGraphBindingError.md
# OmniGraphBindingError ## OmniGraphBindingError ```python class omni.graph.core.OmniGraphBindingError(Exception) ``` ### \_\_init\_\_ ```python def __init__(*args, **kwargs) ``` ```
omni.graph.core.OmniGraphError.md
# OmniGraphError ## OmniGraphError ### class OmniGraphError(*args, **kwargs) Exception to raise when there is an error in an OmniGraph operation #### __init__(*args, **kwargs) Returns the exception text, with stack trace information added if requested #### set_show_stack_trace(enable_traces: bool) Turn on or off display of stack traces when an OmniGraphError is raised Parameters: - **enable_traces** – Turn on or off the stack traces when raising the error 这是一个段落,包含一个链接。 # 这是一个标题 - 列表项1 - 列表项2 ``` 这是一个代码块``` 图片描述 ---
omni.graph.core.OmniGraphInspector.md
# OmniGraphInspector ## Class OmniGraphInspector - **Bases:** `object` - **Description:** Provides simple interfaces for inspection of OmniGraph objects ### Methods - `__init__()`: Import the inspection interface, logging a warning if it doesn't exist. - `as_json(omnigraph_object [, file_path, flags])`: Outputs the JSON format data belonging to the context (for debugging) - `as_text(omnigraph_object [, file_path])`: Returns the serialized data belonging to the context (for debugging) - `attribute_locations(context)`: Find all of the attribute data locations within Fabric for the given context. - `available()`: Returns true if the inspection capabilities are available - `memory_use(omnigraph_object)`: (description not provided in the HTML) Returns the number of bytes of memory used by the object, if it supports it ### __init__ **Definition:** ``` __init__() ``` **Description:** Import the inspection interface, logging a warning if it doesn’t exist. This allows the functions to silently fail, while still providing an alert to the user as to why their inspection operations might not work as expected. ### as_json **Definition:** ``` as_json(omnigraph_object: Union[Graph, GraphContext, GraphRegistry, NodeType], file_path: Optional[str] = None, flags: Optional[List[str]] = None) -> str ``` **Description:** Outputs the JSON format data belonging to the context (for debugging) **Parameters:** - **omnigraph_object** – Object whose contents are to be inspected - **file_path** – If a string then dump the output to a file at that path, otherwise return a string with the dump - **flags** – Set of enabled flags on the inspection object. Valid values are: maps: Show all of the attribute type maps (lots of redundancy here, and independent of data present) noDataDetails: Hide the minutiae of where each attribute’s data is stored in Fabric **Returns:** - If no file_path was specified then return the inspected data. - If a file_path was specified then return the path where the data was written (should be the same) **Return type:** - str **Raises:** - OmniGraphError – If the object type doesn’t support json inspection ### as_text ```python as_text(omnigraph_object: Union[Graph, GraphContext, GraphRegistry, NodeType], file_path: Optional[str] = None) -> str ``` Returns the serialized data belonging to the context (for debugging) #### Parameters - **omnigraph_object** – Object whose contents are to be inspected - **file_path** – If a string then dump the output to a file at that path, otherwise return a string with the dump #### Returns If no file_path was specified then return the inspected data. If a file_path was specified then return the path where the data was written (should be the same) #### Return type str #### Raises - **OmniGraphError** – If the object type doesn’t support text inspection ### attribute_locations ```python attribute_locations(context: GraphContext) -> Dict[str, Dict[str, int]] ``` Find all of the attribute data locations within Fabric for the given context. #### Parameters - **context** – Graph context whose Fabric data is to be inspected ### Returns { attribute name : (attribute path, attribute location) } ### Return type dict[str, dict[str,int]] ### available ```python available() -> bool ``` Returns true if the inspection capabilities are available ### memory_use ```python memory_use(omnigraph_object: Union[Graph, GraphContext, GraphRegistry, NodeType]) -> int ``` Returns the number of bytes of memory used by the object, if it supports it #### Parameters **omnigraph_object** – Object whose memory use is to be inspected #### Returns Number of bytes found to be used by the object passed in #### Return type int #### Raises **OmniGraphError** – If the object type doesn’t support memory inspection
omni.graph.core.OmniGraphTypeError.md
# OmniGraphTypeError ## OmniGraphTypeError Exception to raise when an OmniGraph operation encountered an unrecognized or illegal type ### __init__(*args, **kwargs) Returns the exception text, with stack trace information added if requested
omni.graph.core.OmniGraphValueError.md
# OmniGraphValueError ## OmniGraphValueError Exception to raise when an OmniGraph operation encountered an illegal value ### __init__(*args, **kwargs) Returns the exception text, with stack trace information added if requested
omni.graph.core.on_shutdown.md
# on_shutdown ## on_shutdown
omni.graph.core.PerNodeKeys.md
# PerNodeKeys ## PerNodeKeys ```python class omni.graph.core.PerNodeKeys ``` Bases: `object` Set of key values for per-node data. This is data that belongs to a node, but which is only valid for Python node implementations. Any data that belongs to all node types should be implemented through the ABI. ### Methods ### Attributes ```python ATTRIBUTES ``` Definitions of the attribute objects on the node ```python DYNAMIC_ATTRIBUTES ``` Accessor for dynamic attributes on the node ```python ERRORS ``` String list containing the unique errors encountered during evaluation ```python INTERNAL_STATE ``` Data stored as internal state information by the user ```python NODE_CALLBACK ``` Callback subscription for the node event stream ```python ROLE ``` | Role object built to provide a parallel method of accessing attribute role data | | --- | ## __init__() Definitions of the attribute objects on the node ## ATTRIBUTES = 'attributes' Accessor for dynamic attributes on the node ## DYNAMIC_ATTRIBUTES = 'dynamic_attributes' String list containing the unique errors encountered during evaluation ## ERRORS = 'errors' Data stored as internal state information by the user ## INTERNAL_STATE = 'internal_state' Callback subscription for the node event stream ## NODE_CALLBACK = 'node_callback' Role object built to provide a parallel method of accessing attribute role data ## ROLE = 'role'
omni.graph.core.PtrToPtrKind.md
# PtrToPtrKind ## Overview PtrToPtrKind is a class that defines the memory type for the pointer to a GPU data array. It is based on `pybind11_object`. ### Members - **NA**: Memory is CPU or type is not an array. - **CPU**: Pointers to GPU arrays live on the CPU. - **GPU**: Pointers to GPU arrays live on the GPU. ## Methods - `__init__(self, value)`: Initializes the PtrToPtrKind instance. ## Attributes - `CPU` - `GPU` - `NA` - `name` - `value` *omni.graph.core._omni_graph_core.PtrToPtrKind*, value : int) → None property name
omni.graph.core.PtrToPtrKind_omni.graph.core.PtrToPtrKind.md
# PtrToPtrKind ## Overview Memory type for the pointer to a GPU data array ### Members - NA : Memory is CPU or type is not an array - CPU : Pointers to GPU arrays live on the CPU - GPU : Pointers to GPU arrays live on the GPU ### Methods - `__init__(self, value)` ### Attributes - `CPU` - `GPU` - `NA` - `name` - `value` ## `__init__` Method - `__init__(self, value)` **omni.graph.core._omni_graph_core.PtrToPtrKind**, **value** : **int** ) → **None** **property** **name**
omni.graph.core.python_value_as_usd.md
# python_value_as_usd ## python_value_as_usd ```python omni.graph.core.python_value_as_usd(og_type: Type, value: Any) -> Any ``` Converts the given python value to the equivalent USD value ### Parameters - **og_type** – The OG type of the given data - **value** – The pure python value (IE not USD or numpy) ### Returns - The USD-compatible value ### Return type - Any
omni.graph.core.ReadOnlyError.md
# ReadOnlyError ## ReadOnlyError ```python class omni.graph.core.ReadOnlyError(attribute: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Attribute | pxr.Usd.Property, message: Optional[str] = None) ``` Bases: `OmniGraphError` Exception to raise when there is a write operation on a read-only attribute (i.e. an input) ### `__init__` ```python def __init__(attribute: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Attribute | pxr.Usd.Property, message: Optional[str] = None) ``` <em class="sig-call"> omni.graph.core.ReadOnlyError.__init__( <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"> attribute </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </span> <span class="p"> <span class="pre"> | </span> </span> <span class="w"> </span> <span class="pre"> pxr.Usd.Property </span> </span> , <em class="sig-param"> <span class="n"> <span class="pre"> message </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> </em> <dd> <p> Set up the attribute information for the operation </p> </dd>
omni.graph.core.register_node_type.md
# register_node_type  ## register_node_type  ### omni.graph.core.register_node_type  ```python omni.graph.core.register_node_type(name: object, version: int) -> None ``` Registers a new python subnode type with OmniGraph. #### Parameters - **name** (str) – Name of the Python node type being registered - **version** (int) – Version number of the Python node type being registered #### Raises - **ValueError** – If a subnode type of the same name was already registered
omni.graph.core.register_post_load_file_format_upgrade_callback.md
# register_post_load_file_format_upgrade_callback  ## register_post_load_file_format_upgrade_callback ```python omni.graph.core.register_post_load_file_format_upgrade_callback(callback: object) -> int ``` Registers a callback to be invoked when the file format version changes. Happens after the file has already been parsed and stage attached to. The callback takes 3 parameters: the old file format version, the new file format version, and the affected graph object. ### Parameters - **callback** (callable) – The callback function ### Returns A handle that could be used for deregistration. Note the calling module is responsible for deregistration of the callback in all circumstances, including where the extension is hot-reloaded. ### Return type int ```
omni.graph.core.register_pre_load_file_format_upgrade_callback.md
# register_pre_load_file_format_upgrade_callback  ## register_pre_load_file_format_upgrade_callback  ### omni.graph.core.register_pre_load_file_format_upgrade_callback  #### register_pre_load_file_format_upgrade_callback Registers a callback to be invoked when the file format version changes. Happens before the file has already been parsed and stage attached to. The callback takes 3 parameters: the old file format version, the new file format version, and a graph object (always invalid since the graph has not been created yet). ##### Parameters - **callback** (callable) – The callback function ##### Returns A handle that could be used for deregistration. Note the calling module is responsible for deregistration of the callback in all circumstances, including where the extension is hot-reloaded. ##### Return type int
omni.graph.core.register_python_node.md
# register_python_node ## register_python_node Registers the unique Python node type with OmniGraph. This houses all of the Python node implementations as subtypes.
omni.graph.core.release_interface.md
# release_interface ## release_interface ```python omni.graph.core.release_interface(arg0: omni.graph.core._omni_graph_core.ComputeGraph) -> None ``` ### Description This function does not provide a description in the provided HTML source. ### Parameters - **arg0** (`omni.graph.core._omni_graph_core.ComputeGraph`): The parameter description is not provided in the HTML source. ### Returns - **None** ```
omni.graph.core.resolve_base_coupled.md
# resolve_base_coupled ## resolve_base_coupled ``` Resolves attribute types given a set of attributes, that can have differing tuple counts and/or array depth, and differing but convertible base data type. For example if node ‘makeTuple2’ has two input attributes ‘a’ and ‘b’ and one output ‘c’ and we want to resolve ‘a’:float, ‘b’:float, ‘c’:float[2] (convertible base types, different tuple counts) we would use the input: ```python [ (node.get_attribute("inputs:a"), None, None, None), (node.get_attribute("inputs:b"), None, None, None), (node.get_attribute("outputs:c"), None, 1, None) ] ``` Assuming `a` gets resolved first, the None will be set to the respective values for the resolved type (`a`). For this example, it will use defaults tuple_count=1, array_depth=0, role=NONE. This function should only be called from `on_connection_type_resolve`. ## Parameters * **attribute_specs** – list of (attribute, tuple_count, array_depth, role) of extended attributes to be resolved. * **tuple_count** (**'None' for**) – * **array_depth** – * **type** (**or role means 'use the resolved**) –
omni.graph.core.resolve_fully_coupled.md
# resolve_fully_coupled ## resolve_fully_coupled ```python omni.graph.core.resolve_fully_coupled(attributes: Sequence[Attribute]) -> None ``` Resolves attribute types given a set of attributes which are fully type coupled. For example if node ‘Increment’ has one input attribute ‘a’ and one output attribute ‘b’ and we want the types of ‘a’ and ‘b’ to always match. This function will take under consideration the available conversions. This function should only be called from `on_connection_type_resolve`. ### Parameters - **attributes** – list of extended attributes to be resolved
omni.graph.core.RuntimeAttribute.md
# RuntimeAttribute ## Methods - `__init__(attribute_data, context, read_only)` - Constructs a wrapper around the raw ABI attribute data object - `array_value(*args, **kwargs)` - Set the value of an attributeData for writing, with preallocated element space. - `copy_data(other)` - [Description missing] | Attribute | Description | |-----------|-------------| | abi | The ABI object representing the bundled attribute's data | | cpu_value | The value of an attributeData for reading, forcing it to be on the CPU | | gpu_value | The value of an attributeData for reading, forcing it to be on the GPU | | name | Name of the attribute data. | | size | The number of elements in the attribute (1 for regular data, elementCount for arrays) | | type | Attribute type of the attribute data. | | value | The value of an attributeData for reading | ### __init__(attribute_data: ~omni.graph.core._omni_graph_core.AttributeData, context: ~omni.graph.core._omni_graph_core.GraphContext, read_only: bool, on_gpu: ~typing.Optional[bool] = None, gpu_ptr_kind: ~omni.graph.core._omni_graph_core.PtrToPtrKind = &lt;PtrToPtrKind.NA: 0&gt;) - Constructs a wrapper around the raw ABI attribute data object ### array_value(*args, **kwargs) → Any - Set the value of an attributeData for writing, with preallocated element space. See AttributeDataValueHelper.get_array() for parameters. on_gpu is provided here - Returns: Value of the array data - Return type: Any ### copy_data Method ```python copy_data(other: RuntimeAttribute) -> bool ``` Copies data from another attribute, returning True if the copy succeeded, else False. **Parameters:** - `other` - RuntimeAttribute from which data is to be copied **Returns:** - True if the copy succeeded **Return type:** - bool ### abi Property ```python property abi: AttributeData ``` The ABI object representing the bundled attribute’s data. **Type:** - omni.graph.core.AttributeData ### cpu_value Property ```python property cpu_value: Any ``` The value of an attributeData for reading, forcing it to be on the CPU. **Type:** - Any ### gpu_value Property ```python property gpu_value: Any ``` The value of an attributeData for reading, forcing it to be on the GPU. **Type:** - Any ### name Property ```python property name: str ``` Name of the attribute data. Can only be set on creation. **Type:** - str ### size Property ```python property size: int ``` The number of elements in the attribute (1 for regular data, elementCount for arrays). **Type:** - int ### type Property ```python property type ``` ### Attribute Type Attribute type of the attribute data. Can only be set on creation. - **Type**: omni.graph.core.Type ### Value The value of an attributeData for reading - **Type**: Any
omni.graph.core.Settings.md
# Settings ## Settings ```python class omni.graph.core.Settings: VERSION: str = '/persistent/omnigraph/settingsVersion' UPDATE_MESH_TO_HYDRA: str = '/persistent/omnigraph/updateMeshPointsToHydra' PLAY_COMPUTE_GRAPH: str = '/app/player/playComputegraph' OPTIMIZE_GENERATED_PYTHON: str = '/persistent/omnigraph/generator/pyOptimize' ENABLE_PATH_CHANGED_CALLBACK: str = '/persistent/omnigraph/enablePathChangedCallback' DEPRECATIONS_ARE_ERRORS: str = '/persistent/omnigraph/deprecationsAreErrors' ``` ``` ## omni.graph.core.Settings ### Methods #### `__init__(VERSION, UPDATE_MESH_TO_HYDRA, ...)` #### `generator_settings()` Return the generator settings object corresponding to the current carb settings #### `temporary(setting_name[, setting_value])` Generator to temporarily use a new setting value ### Attributes #### `AUTO_INSTANCING_ENABLED` Control whether or not similar graph should be merged together as instances in order to allow vectorized compute #### `DEPRECATIONS_ARE_ERRORS` Modify deprecation paths to raise errors or exceptions instead of logging warnings. #### `DISABLE_INFO_NOTICE_HANDLING_IN_PLAYBACK` Disable all processing of info-only notices by OG. #### `ENABLE_PATH_CHANGED_CALLBACK` Enable the deprecated Node.pathChangedCallback. #### `OPTIMIZE_GENERATED_PYTHON` Optimize the Python code being output by the node generator #### `PLAY_COMPUTE_GRAPH` Evaluate OmniGraph when the Kit 'Play' button is pressed #### `UPDATE_MESH_TO_HYDRA` Update mesh points directly to Hydra #### `VERSION` Version number of these settings ### omni.graph.core.Settings.__init__ - **Parameters**: - `SETTINGS_VERSION`: str = '/persistent/omnigraph/settingsVersion' - `UPDATE_MESH_TO_HYDRA`: str = '/persistent/omnigraph/updateMeshPointsToHydra' - `PLAY_COMPUTE_GRAPH`: str = '/app/player/playComputegraph' - `OPTIMIZE_GENERATED_PYTHON`: str = '/persistent/omnigraph/generator/pyOptimize' - `ENABLE_PATH_CHANGED_CALLBACK`: str = '/persistent/omnigraph/enablePathChangedCallback' - `DEPRECATIONS_ARE_ERRORS`: str = '/persistent/omnigraph/deprecationsAreErrors' - **Returns**: None ### omni.graph.core.Settings.generator_settings - **Description**: Return the generator settings object corresponding to the current carb settings - **Returns**: - Current settings object used by the code generator - Return type: omni.graph.tools.Settings ### omni.graph.core.Settings.temporary - **Parameters**: - `setting_name`: Union[str, List[Tuple[str, Any]]] - **Returns**: Settings <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"> str </span> <span class="p"> <span class="pre"> , </span> </span> <span class="w"> </span> <span class="pre"> Any </span> <span class="p"> <span class="pre"> ] </span> </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> setting_value </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> Any </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> Generator to temporarily use a new setting value </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> setting_name </strong> – A string containing the path to the setting (e.g. “/persistent/omnigraph/deprecationsAreErrors”) or a list of tuples containing setting name and value pairs. </p> </li> <li> <p> <strong> setting_value </strong> – New value for the setting. ‘None’ is not a valid setting value and will generate a warning. Ignored if ‘setting_name’ is a list. </p> </li> </ul> </dd> </dl> <p> If a setting does not yet exist it will be created at context entry and removed at context exit. </p> <p class="rubric"> Examples </p> <div class="highlight-python notranslate"> <div class="highlight"> <pre><span></span><span class="k">with</span> <span class="n">og</span><span class="o">.</span><span class="n">Settings</span><span class="o">.</span><span class="n">temporary</span><span class="p">(</span><span class="n">og</span><span class="o">.</span><span class="n">Settings</span><span class="o">.</span><span class="n">AUTO_INSTANCING_ENABLED</span><span class="p">,</span> <span class="kc">True</span><span class="p">):</span> <span class="n">do_something_with_auto_instancing</span><span class="p">()</span> <span class="k">with</span> <span class="n">og</span><span class="o">.</span><span class="n">Settings</span><span class="o">.</span><span class="n">temporary</span><span class="p">([(</span><span class="s2">"/MySettings/debug"</span><span class="p">,</span> <span class="kc">True</span><span class="p">),</span> <span class="p">(</span><span class="n">og</span><span class="o">.</span><span class="n">Settings</span><span class="o">.</span><span class="n">DEPRECATIONS_ARE_ERRORS</span><span class="p">,</span> <span class="kc">False</span><span class="p">)]):</span> <span class="n">do_something_with_deprecations_as_errors_disabled</span><span class="p">()</span> </pre> </div> </div> </dd> </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.AUTO_INSTANCING_ENABLED"> <span class="sig-name descname"> <span class="pre"> AUTO_INSTANCING_ENABLED </span> </span> <em class="property"> <span class="w"> </span> <span class="p"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="pre"> '/persistent/omnigraph/autoInstancingEnabled' </span> </em> </dt> <dd> <p> Control whether or not similar graph should be merged together as instances in order to allow vectorized compute </p> </dd> </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.DEPRECATIONS_ARE_ERRORS"> <span class="sig-name descname"> <span class="pre"> DEPRECATIONS_ARE_ERRORS </span> </span> <em class="property"> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="pre"> str </span> </em> <em class="property"> <span class="w"> </span> <span class="p"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="pre"> '/persistent/omnigraph/deprecationsAreErrors' </span> </em> </dt> <dd> <p> Modify deprecation paths to raise errors or exceptions instead of logging warnings. </p> </dd> </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.DISABLE_INFO_NOTICE_HANDLING_IN_PLAYBACK"> <span class="sig-name descname"> <span class="pre"> DISABLE_INFO_NOTICE_HANDLING_IN_PLAYBACK </span> </span> <em class="property"> <span class="w"> </span> <span class="p"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="pre"> '/persistent/omnigraph/disableInfoNoticeHandlingInPlayback' </span> </em> </dt> <dd> <p> Disable all processing of info-only notices by OG. This is an optimization for applications which do not require any triggering of OG via USD (value_changed and path_changed callbacks, lazy-graph etc </p> </dd> </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.ENABLE_PATH_CHANGED_CALLBACK"> <span class="sig-name descname"> <span class="pre"> ENABLE_PATH_CHANGED_CALLBACK </span> </span> <em class="property"> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="pre"> str </span> </em> <em class="property"> <span class="w"> </span> <span class="p"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="pre"> '/persistent/omnigraph/enablePathChangedCallback' </span> </em> </dt> <dd> <p> Enable the deprecated Node.pathChangedCallback. This will affect performance. </p> </dd> </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.OPTIMIZE_GENERATED_PYTHON"> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.OPTIMIZE_GENERATED_PYTHON"> <span class="sig-name descname"> <span class="pre"> OPTIMIZE_GENERATED_PYTHON </span> </span> <em class="property"> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="pre"> str </span> </em> <em class="property"> <span class="w"> </span> <span class="p"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="pre"> '/persistent/omnigraph/generator/pyOptimize' </span> </em> </dt> <dd> <p> Optimize the Python code being output by the node generator </p> </dd> </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.PLAY_COMPUTE_GRAPH"> <span class="sig-name descname"> <span class="pre"> PLAY_COMPUTE_GRAPH </span> </span> <em class="property"> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="pre"> str </span> </em> <em class="property"> <span class="w"> </span> <span class="p"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="pre"> '/app/player/playComputegraph' </span> </em> </dt> <dd> <p> Evaluate OmniGraph when the Kit ‘Play’ button is pressed </p> </dd> </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.UPDATE_MESH_TO_HYDRA"> <span class="sig-name descname"> <span class="pre"> UPDATE_MESH_TO_HYDRA </span> </span> <em class="property"> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="pre"> str </span> </em> <em class="property"> <span class="w"> </span> <span class="p"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="pre"> '/persistent/omnigraph/updateMeshPointsToHydra' </span> </em> </dt> <dd> <p> Update mesh points directly to Hydra </p> </dd> </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.VERSION"> <span class="sig-name descname"> <span class="pre"> VERSION </span> </span> <em class="property"> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="pre"> str </span> </em> <em class="property"> <span class="w"> </span> <span class="p"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="pre"> '/persistent/omnigraph/settingsVersion' </span> </em> </dt> <dd> <p> Version number of these settings </p> </dd> </dl>
omni.graph.core.set_test_failure.md
# set_test_failure ## set_test_failure ```python omni.graph.core.set_test_failure(has_failure: bool) -> None ``` Sets or clears a generic test failure. **Parameters** - **has_failure** (bool) – If True then increment the test failure count, else clear it.
omni.graph.core.Severity.md
# Severity ## Severity ### Class: omni.graph.core.Severity Bases: `pybind11_object` Severity level of the log message Members: - INFO: Message is informational only - WARNING: Message is regarding a recoverable unexpected situation - ERROR: Message is regarding an unrecoverable unexpected situation #### Methods | Method | Description | | --- | --- | | `__init__(self, value)` | | #### Attributes | Attribute | Description | | --- | --- | | `ERROR` | | | `INFO` | | | `WARNING` | | | `name` | | | `value` | | ### `__init__(self, value)` omni.graph.core._omni_graph_core.Severity, value : int ) → None property name name
omni.graph.core.shutdown_compute_graph.md
# shutdown_compute_graph ## shutdown_compute_graph ```python omni.graph.core.shutdown_compute_graph() ``` Deprecated: do not use. ```
omni.graph.core.Submodules.md
# omni.graph.core Submodules ## Submodules Summary: | Module | Description | |--------|-------------| | [omni.graph.core.typing](omni.graph.core.typing.html) | OmniGraph submodule that handles all of the OmniGraph API typing information. |
omni.graph.core.test_failure_count.md
# test_failure_count ## test_failure_count Gets the number of active test failures ### Returns The number of currently active test failures. ### Return type int
omni.graph.core.ThreadsafetyTestUtils.md
# ThreadsafetyTestUtils ## Methods - `add_to_threading_cache(test_instance_id, code)` - Add some data that needs to be shared across test instances to a single, shared cache. - `make_serial_test(test_generator)` - Make a serial test from a test generator. - `make_threading_test(test_generator)` - Make a thread-safety test from a test generator. - `single_evaluation_first_test_instance(...)` - Method that evaluates a piece of code once during the first test instance. - `single_evaluation_last_test_instance(...)` - Method that evaluates a piece of code once during the last test instance. ## Attributes - (Attributes section follows, if available) | EVALUATION_ALL_GRAPHS | | --- | | EVALUATION_WAIT_FRAME | | MAX_GRAPH_INSTANCES | | thread_cache_indices | | threading_cache | ### __init__() ### add_to_threading_cache(test_instance_id: int, code) Add some data that needs to be shared across test instances to a single, shared cache ### make_serial_test(test_generator) Make a serial test from a test generator ### make_threading_test(test_generator) Make a thread-safety test from a test generator ### single_evaluation_first_test_instance(test_instance_id: int, func, *args, **kwargs) Method that evaluates a piece of code once during the first test instance ### single_evaluation_last_test_instance(test_instance_id: int, func, *args, **kwargs) Method that evaluates a piece of code once during the last test instance : int , func , * args , ** kwargs )  Method that evaluates a piece of code once during the last test instance
omni.graph.core.traverse_downstream_graph.md
# traverse_downstream_graph ## traverse_downstream_graph ## omni.graph.core.traverse_downstream_graph ### Description Traverses the nodes downstream from the input nodes and apply the predicate on visited nodes. ### Parameters - **prims** – The list of starting point nodes for the traversal. - **attribute_predicate** – Function taking an Attribute as parameter and returning bool. If True, connections to this attribute are evaluated, otherwise they are skipped. - **node_callback** – Function taking a Node as parameter. Allows for custom logic to be applied to visited nodes. ### Returns Returns the set of visited nodes. ### Raises - **og.OmniGraphError** if the list of prims contains an invalid prim, or the prims do not all belong to the same graph.
omni.graph.core.traverse_upstream_graph.md
# traverse_upstream_graph ## traverse_upstream_graph ``` ```markdown omni.graph.core.traverse_upstream_graph(prims: List[Prim], attribute_predicate: Optional[Callable[[Attribute], bool]] = None, node_callback: Optional[Callable[[Node], None]] = None) ``` ```markdown ## omni.graph.core.traverse_upstream_graph ### Description Traverses the nodes upstream from the input nodes and apply the predicate on visited nodes. ### Parameters - **prims** – The list of starting point nodes for the traversal. - **attribute_predicate** – Function taking an Attribute as parameter and returning bool. If True, connections to this attribute are evaluated, otherwise they are skipped. - **node_callback** – Function taking a Node as parameter. Allows for custom logic to be applied to visited nodes. ### Returns The set of visited nodes. ### Return type set[omni.graph.core.Node] ### Raises og.OmniGraphError if the list of prims contains an invalid prim, or the prims do not all belong to the same graph.
omni.graph.core.Type.md
# Type ## Type ``` class omni.graph.core.Type ``` Bases: `pybind11_object` Full definition of the data type owned by an attribute ### Methods - `__init__(self, base_type, tuple_count, ...)` - `get_base_type_name(self)` - Gets the name of this type's base data type - `get_ogn_type_name(self)` - Gets the OGN-style name of this type - `get_role_name(self)` - Gets the name of the role of this type - `get_type_name(self)` - Gets the name of this data type - `is_compatible_raw_data(self, type_to_compare)` - Does a role-insensitive comparison with the given Type. - `is_matrix_type(self)` - Determines if this type is a matrix type. ``` | Method | Description | |--------|-------------| | `is_matrix_type(self)` | Checks if the type one of the matrix types, whose tuples are interpreted as a square array | ## Attributes | Attribute | Description | |-----------|-------------| | `array_depth` | (int) Zero for a single value, one for an array. | | `base_type` | (omni.graph.core.BaseDataType) Base type of the attribute. | | `role` | (omni.graph.core.AttributeRole) The semantic role of the type. | | `tuple_count` | (int) Number of components in each tuple. | ## Methods ### `__init__(self: omni.graph.core._omni_graph_core.Type, base_type: omni.graph.core._omni_graph_core.BaseDataType, tuple_count: int = 1, array_depth: int = 0, role: omni.graph.core._omni_graph_core.AttributeRole = <AttributeRole.NONE: 0>) -> None` ### `get_base_type_name(self: omni.graph.core._omni_graph_core.Type) -> str` - Gets the name of this type’s base data type - Returns: Name of just the base data type of this type, e.g. “float” - Return type: str ### `get_ogn_type_name(self: omni.graph.core._omni_graph_core.Type) -> str` - Returns the OGN type name for this type - Return type: str ### Gets the OGN-style name of this type **Returns** - Name of this type in OGN format, which differs slightly from the USD format, e.g. “float[3]” **Return type** - str ### Gets the name of the role of this type **Returns** - Name of just the role of this type, e.g. “color” **Return type** - str ### Gets the name of this data type **Returns** - Name of this type, e.g. “float3” **Return type** - str ### Does a role-insensitive comparison with the given Type **Parameters** - **type_to_compare** (omni.graph.core.Type) – Type to compare for compatibility **Returns** - True if the given type is compatible with this type **Return type** - bool ### Determines if this type is a matrix type **Returns** - True if this type is a matrix type **Return type** - bool ## omni.graph.core.Type.is_matrix_type Checks if the type one of the matrix types, whose tuples are interpreted as a square array ### Returns - True if this type is one of the matrix types ### Return type - bool ## omni.graph.core.Type.array_depth (int) Zero for a single value, one for an array. ## omni.graph.core.Type.base_type (omni.graph.core.BaseDataType) Base type of the attribute. ## omni.graph.core.Type.role (omni.graph.core.AttributeRole) The semantic role of the type. ## omni.graph.core.Type.tuple_count (int) Number of components in each tuple. 1 for a single value (scalar), 3 for a point3d, etc.
omni.graph.core.TypedValue.md
# TypedValue ## Class Definition ```python class omni.graph.core.TypedValue(value: Optional[Any] = None, type: Type = Type(<BaseDataType.UNKNOWN: 0>), 1, 0) ``` ### Description Bases: `object` Class that encapsulates an arbitrary value with an explicit data type. This can be used when the data type is ambiguous due to the limited set of native Python data types. For example it can differentiate between a float and double whereas in Python they are the same thing. ### Methods - `__init__(value, type)`: Initialize the TypedValue. - `has_type()`: Checks if the data has a known type. - `set(*args, **kwargs)`: Set the data to a specific value and/or type. ### Attributes - `type`: The type of the value. | Property | Description | |----------|-------------| | **type** | Type of the data | | **value** | Value of the data | ### __init__ ```python __init__(value: typing.Optional[typing.Any] = None, type: omni.graph.core._omni_graph_core.Type = Type(<BaseDataType.UNKNOWN: 0>, 1, 0)) -> None ``` ### has_type ```python has_type() -> bool ``` Checks if the data has a known type. - Returns: True iff the data value has an explicit type (i.e. is not type UNKNOWN) - Return type: bool ### set ```python set(*args, **kwargs) ``` Set the data to a specific value and/or type. The regular __init__ can be passed (VALUE, TYPE) in the simplest case; this is for more flexible setting. Argument types are flexible and support the following syntax: - set(): Sets the data value to None and makes it an UNKNOWN type - set(Any): Sets the data value and makes it an UNKNOWN type - set(Any, str|og.Type): Sets the data value and defines an explicit type - set(value=Any): Sets the data value and makes it an UNKNOWN type - set(value=Any, type=str|og.Type): Sets the data value and defines an explicit type No attempt is made to match the type to the value - it is assumed that if it is specified, it is correct. - Raises: OmniGraphError – if the argument combinations are not one of the above, or the type could not be parsed ### type ```python type: Type = Type(<BaseDataType.UNKNOWN: 0>, 1, 0) ``` Type of the data ### value ```python value ``` Value of the data <dl> <dt> <em class="property"> <span class="p"> <span class="pre">: Any</span> </span> </em> <em class="property"> <span class="p"> <span class="pre">= None</span> </span> </em> </dt> <dd> <p>Value of the data</p> </dd> </dl>
omni.graph.core.Type_omni.graph.core.Type.md
# Type ## omni.graph.core.Type ```python class omni.graph.core.Type(pybind11_object) ``` Full definition of the data type owned by an attribute ### Methods ```python __init__(self, base_type, tuple_count, ...) ``` ```python get_base_type_name(self) ``` Gets the name of this type's base data type ```python get_ogn_type_name(self) ``` Gets the OGN-style name of this type ```python get_role_name(self) ``` Gets the name of the role of this type ```python get_type_name(self) ``` Gets the name of this data type ```python is_compatible_raw_data(self, type_to_compare) ``` Does a role-insensitive comparison with the given Type. ```python is_matrix_type(self) ``` <span class="pre"> is_matrix_type </span> </code> </a> (self) </p> </td> <td> <p> Checks if the type one of the matrix types, whose tuples are interpreted as a square array </p> </td> </tr> </tbody> </table> <p class="rubric"> Attributes </p> <table class="autosummary longtable docutils align-default"> <colgroup> <col style="width: 10%"/> <col style="width: 90%"/> </colgroup> <tbody> <tr class="row-odd"> <td> <p> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> array_depth </span> </code> </p> </td> <td> <p> (int) Zero for a single value, one for an array. </p> </td> </tr> <tr class="row-even"> <td> <p> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> base_type </span> </code> </p> </td> <td> <p> (omni.graph.core.BaseDataType) Base type of the attribute. </p> </td> </tr> <tr class="row-odd"> <td> <p> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> role </span> </code> </p> </td> <td> <p> (omni.graph.core.AttributeRole) The semantic role of the type. </p> </td> </tr> <tr class="row-even"> <td> <p> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> tuple_count </span> </code> </p> </td> <td> <p> (int) Number of components in each tuple. </p> </td> </tr> </tbody> </table> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.__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 class="pre"> omni.graph.core._omni_graph_core.Type </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> base_type: </span> <span class="pre"> omni.graph.core._omni_graph_core.BaseDataType </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> tuple_count: </span> <span class="pre"> int </span> <span class="pre"> = </span> <span class="pre"> 1 </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> array_depth: </span> <span class="pre"> int </span> <span class="pre"> = </span> <span class="pre"> 0 </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> role: </span> <span class="pre"> omni.graph.core._omni_graph_core.AttributeRole </span> <span class="pre"> = </span> <span class="pre"> &lt;AttributeRole.NONE: </span> <span class="pre"> 0&gt; </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.get_base_type_name"> <span class="sig-name descname"> <span class="pre"> get_base_type_name </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.graph.core.Type" title="omni.graph.core._omni_graph_core.Type"> <span class="pre"> omni.graph.core._omni_graph_core.Type </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"> str </span> </span> </span> </dt> <dd> <p> Gets the name of this type’s base data type </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> Name of just the base data type of this type, e.g. “float” </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.get_ogn_type_name"> <span class="sig-name descname"> <span class="pre"> get_ogn_type_name </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.graph.core.Type" title="omni.graph.core._omni_graph_core.Type"> <span class="pre"> omni.graph.core._omni_graph_core.Type </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"> str </span> </span> </span> </dt> <dd> <dl> <dt> <dd> <p> Gets the OGN-style name of this type </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> Name of this type in OGN format, which differs slightly from the USD format, e.g. “float[3]” </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.get_role_name"> <span class="sig-name descname"> <span class="pre"> get_role_name </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.graph.core._omni_graph_core.Type </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> Gets the name of the role of this type </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> Name of just the role of this type, e.g. “color” </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.get_type_name"> <span class="sig-name descname"> <span class="pre"> get_type_name </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.graph.core._omni_graph_core.Type </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> Gets the name of this data type </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> Name of this type, e.g. “float3” </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.is_compatible_raw_data"> <span class="sig-name descname"> <span class="pre"> is_compatible_raw_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"> <span class="pre"> omni.graph.core._omni_graph_core.Type </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> type_to_compare </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> omni.graph.core._omni_graph_core.Type </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> <p> Does a role-insensitive comparison with the given Type. </p> <p> For example double[3] != pointd[3], but they are compatible and so this function would return True. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <p> <strong> type_to_compare </strong> ( <em> omni.graph.core.Type </em> ) – Type to compare for compatibility </p> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> True if the given type is compatible with this type </p> </dd> <dt class="field-odd"> Return type </dt> <dd class="field-odd"> <p> bool </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.is_matrix_type"> <span class="sig-name descname"> <span class="pre"> is_matrix_type </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.graph.core._omni_graph_core.Type </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> <p> Determines if this type is a matrix type. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> True if this type is a matrix type </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> bool </p> </dd> </dl> </dd> </dl> </dl> ### omni.graph.core.Type.is_matrix_type Checks if the type one of the matrix types, whose tuples are interpreted as a square array #### Returns - True if this type is one of the matrix types #### Return type - bool ### omni.graph.core.Type.array_depth (int) Zero for a single value, one for an array. ### omni.graph.core.Type.base_type (omni.graph.core.BaseDataType) Base type of the attribute. ### omni.graph.core.Type.role (omni.graph.core.AttributeRole) The semantic role of the type. ### omni.graph.core.Type.tuple_count (int) Number of components in each tuple. 1 for a single value (scalar), 3 for a point3d, etc.
omni.graph.core.typing.Classes.md
# omni.graph.core.typing Classes ## Classes Summary: - PrimAttrs_t - dict() -> new empty dictionary - TypeConversion - Static class for storing conversion methods between python types and Omnigraph types
omni.graph.core.typing.PrimAttrs_t.md
# PrimAttrs_t ## PrimAttrs_t alias of `dict` [ `str` | `tuple` [ `str` | `Type`, `any` ]]
omni.graph.core.typing.TypeConversion.md
# TypeConversion ## TypeConversion Static class for storing conversion methods between python types and Omnigraph types ### Methods - `__init__()` - `from_ogn_type(og_type)` - Searches the conversion registry using an Omnigraph type. - `from_type(type_desc)` - Searches the conversion registry using a python type. - `register_type_conversion(python_type, ...)` - Registers a type conversion between a python type and an ogn type. - `unregister_type_conversion([python_type, ...])` - Unregisters a type conversion from python to ogn. | types | | --- | | user_types | ```python __init__() ``` ```python class Method(value) ``` Bases: ```python Enum ``` Conversion method to go from source type to destination type ```python ASSIGN = (0,) ``` Return the value to be assigned to the destination ```python MODIFY = 1 ``` Pass in the destination object to be modified in place ```python classmethod from_ogn_type(og_type: str) -> omni.graph.core._impl.autonode_deprecated.data_typing.TypeDesc | None ``` Searches the conversion registry using an Omnigraph type. Searches the user types first, defaults to the system types. Parameters - og_type – string representing the incoming ogn type Returns - TypeDesc for the found python type if it’s found, None otherwise ```python classmethod from_type(type_desc: type) -> omni.graph.core._impl.autonode_deprecated.data_typing.TypeDesc | None ``` Searches the conversion registry using a python type. Parameters - type_desc – type Returns - TypeDesc for the found python type if it’s found, None otherwise <dl> <dt class="field-odd"> <p> <strong> type_desc </strong> – python type to convert </p> </dt> <dt class="field-even"> <p> Returns </p> </dt> <dd class="field-even"> <p> TypeDesc for the found python type if it’s found, None otherwise </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.typing.TypeConversion.register_type_conversion"> <em class="property"> <span class="pre"> classmethod </span> </em> <span class="sig-name descname"> <span class="pre"> register_type_conversion </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> python_type </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="n"> <span class="pre"> type </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> ogn_typename </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="n"> <span class="pre"> str </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> python_to_ogn </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="n"> <span class="pre"> callable </span> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="default_value"> <span class="pre"> None </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> python_to_ogn_method </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="n"> <span class="pre"> Method </span> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="default_value"> <span class="pre"> Method.ASSIGN </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> ogn_to_python </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="n"> <span class="pre"> callable </span> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="default_value"> <span class="pre"> None </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> ogn_to_python_method </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="n"> <span class="pre"> Method </span> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="default_value"> <span class="pre"> Method.ASSIGN </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> default </span> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="default_value"> <span class="pre"> None </span> </span> </em> <span class="sig-paren"> ) </span> </dt> <dd> <p> Registers a type conversion between a python type and an ogn type. Masks any existing system setting. If a previous user-submitted type conversion is registered, it will be overridden. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> python_type </strong> – Type representation in python. </p> </li> <li> <p> <strong> ogn_typename </strong> – String representation of the ogn type. Node generation will fail on unrecognized types. </p> </li> <li> <p> <strong> python_to_ogn </strong> – [optional] function to convert a python return value to an OGN struct. Signature is Callable[[[python_type], object]. Defaults to None </p> </li> <li> <p> <strong> ogn_to_python </strong> – [optional] function to convert an OGN struct to a python return value. Signature is Callable[[[object], python_type]. Defaults to None </p> </li> <li> <p> <strong> ogn_to_python_method </strong> – [optional] Type </p> </li> </ul> </dd> </dl> </dd> </dl> <dt> <span class="sig-name"> <span class="pre"> unregister_type_conversion </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> python_type </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> type </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> None </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> ogn_type_name </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> str </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 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"> omni.graph.core._impl.autonode_deprecated.data_typing.TypeDesc </span> <span class="w"> </span> <span class="p"> <span class="pre"> | </span> </span> <span class="w"> </span> <span class="pre"> None </span> </span> </span> </dt> <dd> <p> Unregisters a type conversion from python to ogn. Doesn’t unregister system types. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> python_type </strong> – the python type to be removed from support </p> </li> <li> <p> <strong> ogn_type_name </strong> – the ogn type name type to be removed from support </p> </li> </ul> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> The TypeDesc tuple just unregistered, or none. </p> </dd> </dl> </dd>
omni.graph.core.update.md
# update ## update ```python def update(current_time: float, elapsed_time: float) -> None: pass ``` Deprecated: do not use. ```
omni.graph.core.WrappedArrayType.md
# WrappedArrayType ## WrappedArrayType ```python class omni.graph.core.WrappedArrayType(value) ``` Bases: `Enum` Enum for the type of array data returned from the get methods ### Attributes | Attribute | Description | |-----------|-------------| | `NUMPY` | Array data is wrapped in numpy.ndarray | | `RAW` | Array data is wrapped in DataWrapper | ```python def __init__(): ``` ```python NUMPY = 1 ``` Array data is wrapped in numpy.ndarray ```python RAW = 2 ``` Array data is wrapped in DataWrapper # 标题 这是一个段落。 这是一个链接 描述图片的文本
omni.graph.core_api.md
# Omniverse Kit API ## Class Hierarchy - namespace omni - namespace graph - namespace core - namespace ogn - template struct is_array - template struct is_array<array<T>> - template struct is_array<base_array<T, HandleType>> - template struct is_array<const_array<T>> - template class array - template class base_array - template class base_string - template class const_array - class const_string - class NodeTypeABI - class OmniGraphDatabase - template class OmniGraphNode_ABI - class string - enum ExecutionAttributeState - struct AttributeObj - struct AttrKey - struct AttrKeyHash - struct ConnectionCallback - struct ConnectionInfo - struct ConstAttributeDataHandleHash - struct ConstBundleHandleHash - struct CreateGraphAsNodeOptions - struct ErrorStatusChangeCallback - struct FileFormatUpgrade - struct FileFormatVersion - struct GraphContextObj - struct GraphInstanceID - struct GraphObj - struct IAttribute - struct IAttributeData - struct IAttributeType - struct IBundle - struct IDataModel - struct IDataStealingPrototype - struct IGraph - struct IGraphContext - struct IGraphRegistry - struct INode - struct InstanceIndex - struct IScheduleNode - struct NodeObj - struct NodeTypeObj - struct OptionalMethod - struct PathChangedCallback - class AttributeDataHandle - class BundleHandle - class ConstAttributeDataHandle - class ConstBundleHandle - class DataModelEditScope - DataModelEditScope - template class HandleBase - class IBundle2_abi - class IBundleFactory2_abi - class IBundleFactory_abi - class IConstBundle2_abi - class INodeCategories_abi - class ISchedulingHints2_abi - class ISchedulingHints_abi - class IVariable2_abi - class IVariable_abi - class NodeContextHandle - enum eAccessLocation - enum eAccessType - enum eComputeRule - enum ePurityStatus - enum eThreadSafety - enum eVariableScope - enum IGraphEvent - enum IGraphRegistryEvent - enum INodeEvent - namespace std - template struct hash<omni::graph::core::GraphInstanceID> ## File Hierarchy - Directory omni - Directory graph - Directory core - Directory bundle - File IBundle1.h - File IBundle2.h - File IBundleFactory1.h - File IBundleFactory2.h - File IConstBundle2.h - Directory ogn - File array.h - File Database.h - File Variable.h - OmniGraphNodeABI.h - File - string.h - File - Handle.h - File - iAttributeData.h - File - IAttributeType.h - File - iComputeGraph.h - File - IDataModel.h - File - IGraphRegistry.h - File - INodeCategories.h - File - ISchedulingHints.h - File - ISchedulingHints2.h - File - IVariable.h - File - IVariable2.h - Directory - rendering - Directory - include - Directory - omni - Directory - fabric - File - Type.h ## Namespaces - omni - omni::core - omni::graph - omni::graph::core - omni::graph::core::ogn - std ## Classes and Structs - omni::graph::core::AttributeObj: Object representing an OmniGraph Attribute. - omni::graph::core::AttrKey: Handle type representing attributes, which require two parts to be valid. - omni::graph::core::AttrKeyHash: Make sure to warn developer if an incompatibility is introduced. - omni::graph::core::ConnectionCallback: Callback object used when a connection is made or broken between two attributes. - omni::graph::core::ConnectionInfo: Information passed to define the opposite end of a connection. - omni::graph::core::ConstAttributeDataHandleHash: Hash definition so that omni::graph::core::AttributeDataHandle can be used in a map. - **omni::graph::core::ConstBundleHandleHash**: Hash definition so that omni::graph::core::BundleHandle can be used in a map. - **omni::graph::core::CreateGraphAsNodeOptions**: Parameters for IGraph::CreateGraphAsNode. - **omni::graph::core::ErrorStatusChangeCallback**: Encapsulation of a callback that happens when a node’s error status changes. - **omni::graph::core::FileFormatUpgrade**: Callback object to instantiate for use as a callback when an older version of an OmniGraph file is read. - **omni::graph::core::FileFormatVersion**: Encapsulates the information required to define a file format version number. - **omni::graph::core::GraphContextObj**: Object representing an OmniGraph GraphContext. - **omni::graph::core::GraphInstanceID**: Permanent value representing an instance. - **omni::graph::core::GraphObj**: Object representing an OmniGraph Graph. - **omni::graph::core::IAttribute**: Interface to provide functionality to access and modify properties of an OmniGraph attribute. - **omni::graph::core::IAttributeData**: Interface to data belonging to a specific attribute. - **omni::graph::core::IAttributeType**: Interface class managing various features of attribute types. - **omni::graph::core::IBundle**: Interface for bundle attribute data. - **omni::graph::core::IDataModel**: Interface to the underlying data access for OmniGraph. - **omni::graph::core::IDataStealingPrototype**: Retired prototype. - **omni::graph::core::IGraph**: Interface to an OmniGraph, several of which may be present in a scene. - **omni::graph::core::IGraphContext**: Use this interface to pull data for compute node, and also push data to compute graph/cache. - **omni::graph::core::IGraphRegistry**: Interface that manages the registration and deregistration of node types. - **omni::graph::core::INode**: Interface to a single node in a graph. - **omni::graph::core::InstanceIndex**: Temp value representing an instance during a compute or a loop. - **omni::graph::core::IScheduleNode**: Retired feature - use EF in order to customize execution flow in OG. - **omni::graph::core::NodeObj**: Object representing an OmniGraph Node. - **omni::graph::core::NodeTypeObj**: Object representing an OmniGraph NodeType. - **omni::graph::core::ogn::is_array**: - omni::graph::core::ogn::is_array< array< T >>: Default trait indicating if the class is one of our array types. - omni::graph::core::ogn::is_array< array< T >>: Trait indicating that mutable templated types are array types. - omni::graph::core::ogn::is_array< base_array< T, HandleType >>: Trait indicating that specific templated types are array types. - omni::graph::core::ogn::is_array< const_array< T >>: Trait indicating that constant templated types are array types. - omni::graph::core::OptionalMethod: Helper struct to make it easy to reference methods on a class that may or may not be defined. - omni::graph::core::PathChangedCallback: Callback object used when a path has changed, requiring a path attribute update. - std::hash< omni::graph::core::GraphInstanceID >: Hash specialization for omni::graph::core::GraphInstanceID. - omni::graph::core::AttributeDataHandle: Object representing a handle to a variable AttributeData type. - omni::graph::core::BundleHandle: Object representing a handle to an OmniGraph Bundle. - omni::graph::core::ConstAttributeDataHandle: Object representing a handle to an AttributeData type. - omni::graph::core::ConstBundleHandle: Object representing a handle to a constant OmniGraph Bundle. - omni::graph::core::DataModelEditScope: Scoping object to enter and exist editing mode for the DataModel. - omni::graph::core::HandleBase: Template class for defining handles to various OmniGraph data types. - omni::graph::core::IBundle2_abi: Provide read write access to recursive bundles. - omni::graph::core::IBundleFactory2_abi: IBundleFactory version 2. - omni::graph::core::IBundleFactory_abi: Interface to create new bundles. - omni::graph::core::IConstBundle2_abi: Provide read only access to recursive bundles. - omni::graph::core::INodeCategories_abi: Interface to the list of categories that a node type can belong to. - omni::graph::core::ISchedulingHints2_abi: Interface extension for ISchedulingHints that adds a new “pure” hint. - omni::graph::core::ISchedulingHints_abi: Interface to the list of scheduling hints that can be applied to a node type. - omni::graph::core::IVariable2_abi: Interface extension for IVariable that adds the ability to set a variable type. - omni::graph::core::IVariable_abi: Object that contains a value that is local to a graph, available from anywhere in the graph. ## Classes - **omni::graph::core::NodeContextHandle**: Object representing a handle to an OmniGraph NodeContext. - **omni::graph::core::ogn::array**: std::vector-like wrapper class for array attribute data in the Ogn Database. - **omni::graph::core::ogn::base_array**: std::span-like wrapper class for array attribute data in the Ogn Database. - **omni::graph::core::ogn::base_string**: std::string_view-like wrapper class for string attribute data in the Ogn Database. - **omni::graph::core::ogn::const_array**: std::vector-like wrapper class for constant array attribute data in the Ogn Database. - **omni::graph::core::ogn::const_string**: std::string_view-like wrapper class for constant string attribute data in the Ogn Database. - **omni::graph::core::ogn::NodeTypeABI**: Common base class for all node type implementation definitions, so that they can be in a common container. - **omni::graph::core::ogn::OmniGraphDatabase**: Class defining the minimal amount of shared interface for the generated database interface classes. - **omni::graph::core::ogn::OmniGraphNode_ABI**: ABI proxy class for OGN generated nodes. - **omni::graph::core::ogn::string**: std::string_view-like class for string output attribute data in the Ogn Database. ## Enums - **omni::graph::core::eAccessLocation** - **omni::graph::core::eAccessType** - **omni::graph::core::eComputeRule** - **omni::graph::core::ePurityStatus** - **omni::graph::core::eThreadSafety** - **omni::graph::core::eVariableScope** - **omni::graph::core::ExecutionAttributeState** - **omni::graph::core::IGraphEvent** - **omni::graph::core::IGraphRegistryEvent** - **omni::graph::core::INodeEvent** ## Functions - **clearContents**: Remove all attributes, child bundles and metadata from this bundle, but keep the bundle itself. - **createAttributeMetadata**: Create attribute metadata fields. - `createAttributeMetadata`: Create attribute metadata field. - `createBundle`: Create a single bundle at the given path and acquire an IBundle2 interface instance. This function is a convenience wrapper for creating individual bundles. - `createBundleMetadata`: Create bundle metadata fields in this bundle. - `createBundleMetadata`: Create bundle metadata field in this bundle. - `getAttributeMetadataByName`: Search for read-write metadata field handle for the attribute by using field name. - `getAttributeMetadataCount`: Return Number of metadata fields in the attribute. - `getAttributeMetadataNamesAndTypes`: Get the names and types of all attribute metadata fields in the attribute. - `getBundle`: Acquire a single IBundle2 interface instance from a bundle handle. This function retrieves a writable interface for a specific bundle. - `getBundle`: Acquire a single IConstBundle2 interface instance from a constant bundle handle. This function retrieves a read-only interface for a specific immutable bundle. - `getBundleMetadataByName`: Search for bundle metadata field based on provided name. - `getBundles`: Acquire IBundle2 interface instances from bundle handles. This overloaded function retrieves writable bundle interfaces for the provided handles. - `getBundles`: Acquire IConstBundle2 interface instances from constant bundle handles. This overloaded function retrieves read-only interfaces for constant bundles. - `getChildBundle`: - `getConstAttributeMetadataByName`: Search for read only field handles in the attribute by using field names. - `getConstBundle`: Acquire a single IConstBundle2 interface instance from a constant bundle handle. This function retrieves a read-only interface for a specific bundle. - `getConstBundleMetadataByName`: Search for field handles in this bundle by using field names. - `getConstBundles`: Acquire IConstBundle2 interface instances from constant bundle handles. This function retrieves read-only bundle interfaces from the provided handles. - `getConstChildBundle`: - `omni::graph::core::ogn::constructInputFromOutput`: - `omni::graph::core::OMNI_DECLARE_INTERFACE`: - `omni::graph::core::OMNI_DECLARE_INTERFACE`: - `omni::graph::core::OMNI_DECLARE_INTERFACE`: - `omni::graph::core::OMNI_DECLARE_INTERFACE`: - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **removeAttributeMetadata**: Remove attribute metadata fields. - **removeAttributeMetadata**: Remove attribute metadata field. - **removeBundleMetadata**: Remove bundle metadata based on provided field names. - **removeBundleMetadata**: Remove bundle metadata based on provided field name. ## Variables - **omni::graph::core::INVALID_TOKEN_VALUE** - **omni::graph::core::kAccordingToContextIndex** - **omni::graph::core::kAuthoringGraphIndex** - **omni::graph::core::kInstancingGraphTargetPath** - **omni::graph::core::kInvalidAttributeHandle** - **omni::graph::core::kInvalidGraphContextHandle** - **omni::graph::core::kInvalidGraphHandle** - **omni::graph::core::kInvalidHandleIntValue** - **omni::graph::core::kInvalidInstanceIndex** - **omni::graph::core::kInvalidNodeHandle** - **omni::graph::core::kInvalidNodeTypeHandle** - **omni::graph::core::kReadAndWrite** - **omni::graph::core::kReadOnly** - **omni::graph::core::kUninitializedGraphId** - **omni::graph::core::kUninitializedTypeCount** - **omni::graph::core::kWriteOnly** ## Defines - **COMPUTE_GRAPH_VERBOSE_LOGGING**: If 1 then extra logging is enabled (which affects performance) - **kOgnMetadataAllowedTokens** - **kOgnMetadataAllowedTokensRaw** - **kOgnMetadataAllowMultiInputs** - **kOgnMetadataCategories** - **kOgnMetadataCategoryDescriptions** - **kOgnMetadataCudaPointers** - **kOgnMetadataDefault** - **kOgnMetadataDescription** - **kOgnMetadataExclusions** - **kOgnMetadataExtension** - **kOgnMetadataHidden** - **kOgnMetadataIconBackgroundColor** - **kOgnMetadataIconBorderColor** - **kOgnMetadataIconColor** - **kOgnMetadataIconPath** - **kOgnMetadataInternal** - **kOgnMetadataLanguage** - **kOgnMetadataLiteralOnly** - **kOgnMetadataMemoryType** - **kOgnMetadataObjectId** - **kOgnMetadataOptional** - **kOgnMetadataOutputOnly** - **kOgnMetadataTags** - **kOgnMetadataTokens** - **kOgnMetadataUiName** - **kOgnMetadataUiType** - **kOgnSingletonName**: kOgnSingletonName - **NODE_PATH**: NODE_PATH - **OG_INVALID_HANDLE_INT_VALUE**: Representation of an invalid handle as an integer. - **OGN_DBG**: OGN_DBG - **RESOLVED_ATTRIBUTE_PREFIX**: Deprecated, do not use. - **STRUCT_INTEGRITY_CHECK**: Macro to validate the structure of the interface definitions. ## Typedefs - **omni::graph::core::AttributeHandle**: omni::graph::core::AttributeHandle - **omni::graph::core::AttributeHash**: omni::graph::core::AttributeHash - **omni::graph::core::BucketId**: omni::graph::core::BucketId - **omni::graph::core::ConstPrimHandle**: omni::graph::core::ConstPrimHandle - **omni::graph::core::ConstPrimHandleHash**: omni::graph::core::ConstPrimHandleHash - **omni::graph::core::ConstRawPtr**: omni::graph::core::ConstRawPtr - **omni::graph::core::CreateDbFunc**: omni::graph::core::CreateDbFunc - **omni::graph::core::DataAccessFlags**: omni::graph::core::DataAccessFlags - **omni::graph::core::GraphContextHandle**: omni::graph::core::GraphContextHandle - **omni::graph::core::GraphHandle**: omni::graph::core::GraphHandle - **omni::graph::core::HandleInt**: omni::graph::core::HandleInt - **omni::graph::core::has_setContext**: omni::graph::core::has_setContext - **omni::graph::core::has_setHandle**: omni::graph::core::has_setHandle - **omni::graph::core::IVariablePtr**: omni::graph::core::IVariablePtr - **omni::graph::core::NameToken**: omni::graph::core::NameToken - **omni::graph::core::NodeHandle**: omni::graph::core::NodeHandle - **omni::graph::core::NodeTypeHandle**: omni::graph::core::NodeTypeHandle - **omni::graph::core::ObjectId**: omni::graph::core::ObjectId - **omni::graph::core::ogn::DynamicInput**: omni::graph::core::ogn::DynamicInput - **omni::graph::core::ogn::DynamicOutput**: omni::graph::core::ogn::DynamicOutput - omni::graph::core::ogn::DynamicState - omni::graph::core::ogn::has_addExtendedInput - omni::graph::core::ogn::has_addExtendedOutput - omni::graph::core::ogn::has_addExtendedState - omni::graph::core::ogn::has_addInput - omni::graph::core::ogn::has_addOutput - omni::graph::core::ogn::has_addState - omni::graph::core::ogn::has_addSubNodeType - omni::graph::core::ogn::has_computeABI - omni::graph::core::ogn::has_computeCudaT - omni::graph::core::ogn::has_computeOGNT - omni::graph::core::ogn::has_computeVectorizedABI - omni::graph::core::ogn::has_computeVectorizedOGNT - omni::graph::core::ogn::has_createNodeType - omni::graph::core::ogn::has_definedAtRuntime - omni::graph::core::ogn::has_getAllMetadata - omni::graph::core::ogn::has_getMetadata - omni::graph::core::ogn::has_getMetadataCount - omni::graph::core::ogn::has_getNodeType - omni::graph::core::ogn::has_getSubNodeType - omni::graph::core::ogn::has_getTypeName - omni::graph::core::ogn::has_hasState - omni::graph::core::ogn::has_initialize - omni::graph::core::ogn::has_initializeType - omni::graph::core::ogn::has_initInstance - omni::graph::core::ogn::has_inspect - **omni::graph::core::ogn::has_onConnectionTypeResolve** - **omni::graph::core::ogn::has_registerTasks** - **omni::graph::core::ogn::has_release** - **omni::graph::core::ogn::has_releaseInstance** - **omni::graph::core::ogn::has_setHasState** - **omni::graph::core::ogn::has_setMetadata** - **omni::graph::core::ogn::has_updateNodeVersion** - **omni::graph::core::ogn::InputAttribute** - **omni::graph::core::ogn::OmniGraphNodeDeregisterFn** - **omni::graph::core::ogn::OmniGraphNodeRegisterAliasFn** - **omni::graph::core::ogn::OmniGraphNodeRegisterFn** - **omni::graph::core::ogn::OutputAttribute** - **omni::graph::core::ogn::VariableAttribute** - **omni::graph::core::PrimHandle** - **omni::graph::core::RawPtr** - **omni::graph::core::TargetPath**
omni.graph.examples.cpp.md
# omni.graph.examples.cpp ## Navigation - [API (python)](API.html) - [Modules](Modules.html) - omni.graph.examples.cpp ## Content ### Module: omni.graph.examples.cpp #### omni.graph.examples.cpp ##### omni.graph.examples.cpp
omni.graph.exec_api.md
# OmniGraph Execution Framework Core API ## Directory hierarchy - **dir** - [omni](dir_omni.html#dir-bad0edba84ea4d6250db0f08c83886ba) - **dir** - [omni/graph](dir_omni_graph.html#dir-69c90ed0c22435c77ab4a2cd8eae54be) - **dir** - [omni/graph/exec](dir_omni_graph_exec.html#dir-d03fe47e62b8e82aff15a1334248e04c) - **dir** - [omni/graph/exec/unstable](dir_omni_graph_exec_unstable.html#dir-155738f640f8d26755a0c457b8dc44d6) - file omni/graph/exec/unstable/Assert.h - file omni/graph/exec/unstable/AtomicBackoff.h - file omni/graph/exec/unstable/CompactUniqueIndex.h - file omni/graph/exec/unstable/ConstName.h - file omni/graph/exec/unstable/ElementAt.h - file omni/graph/exec/unstable/EnumBitops.h - file omni/graph/exec/unstable/ExecutionContext.h - file omni/graph/exec/unstable/ExecutionPath.h - file omni/graph/exec/unstable/ExecutionTask.h - file omni/graph/exec/unstable/Executor.h - file omni/graph/exec/unstable/ExecutorFactory.h - file omni/graph/exec/unstable/Graph.h - file omni/graph/exec/unstable/GraphBuilder.h - file omni/graph/exec/unstable/GraphBuilderContext.h - file omni/graph/exec/unstable/GraphUtils.h - file omni/graph/exec/unstable/IApplyOnEachFunction.gen.h - file omni/graph/exec/unstable/IApplyOnEachFunction.h - file omni/graph/exec/unstable/IBase.gen.h - file omni/graph/exec/unstable/IBase.h - file omni/graph/exec/unstable/IDef.gen.h - file omni/graph/exec/unstable/IDef.h - file - omni/graph/exec/unstable/IExecutionContext.gen.h - file - omni/graph/exec/unstable/IExecutionContext.h - file - omni/graph/exec/unstable/IExecutionCurrentThread.gen.h - file - omni/graph/exec/unstable/IExecutionCurrentThread.h - file - omni/graph/exec/unstable/IExecutionStateInfo.gen.h - file - omni/graph/exec/unstable/IExecutionStateInfo.h - file - omni/graph/exec/unstable/IExecutor.gen.h - file - omni/graph/exec/unstable/IExecutor.h - file - omni/graph/exec/unstable/IGlobalPass.gen.h - file - omni/graph/exec/unstable/IGlobalPass.h - file - omni/graph/exec/unstable/IGraph.gen.h - file - omni/graph/exec/unstable/IGraph.h - file - omni/graph/exec/unstable/IGraphBuilder.gen.h - file - omni/graph/exec/unstable/IGraphBuilder.h - file - omni/graph/exec/unstable/IGraphBuilderContext.gen.h - file - omni/graph/exec/unstable/IGraphBuilderContext.h - file - omni/graph/exec/unstable/IGraphBuilderNode.gen.h - file - omni/graph/exec/unstable/IGraphBuilderNode.h - file - omni/graph/exec/unstable/IInvalidationForwarder.gen.h - file - omni/graph/exec/unstable/IInvalidationForwarder.h - file - omni/graph/exec/unstable/INode.gen.h - file omni/graph/exec/unstable/INode.h - file omni/graph/exec/unstable/INodeDef.gen.h - file omni/graph/exec/unstable/INodeDef.h - file omni/graph/exec/unstable/INodeFactory.gen.h - file omni/graph/exec/unstable/INodeFactory.h - file omni/graph/exec/unstable/INodeGraphDef.gen.h - file omni/graph/exec/unstable/INodeGraphDef.h - file omni/graph/exec/unstable/INodeGraphDefDebug.gen.h - file omni/graph/exec/unstable/INodeGraphDefDebug.h - file omni/graph/exec/unstable/IPartitionPass.gen.h - file omni/graph/exec/unstable/IPartitionPass.h - file omni/graph/exec/unstable/IPass.gen.h - file omni/graph/exec/unstable/IPass.h - file omni/graph/exec/unstable/IPassFactory.gen.h - file omni/graph/exec/unstable/IPassFactory.h - file omni/graph/exec/unstable/IPassPipeline.gen.h - file omni/graph/exec/unstable/IPassPipeline.h - file omni/graph/exec/unstable/IPassRegistry.gen.h - file omni/graph/exec/unstable/IPassRegistry.h - file omni/graph/exec/unstable/IPassTypeRegistry.gen.h - file omni/graph/exec/unstable/IPassTypeRegistry.h - file omni/graph/exec/unstable/IPopulatePass.gen.h - file omni/graph/exec/unstable/IPopulatePass.h - file omni/graph/exec/unstable/IScheduleFunction.gen.h - file omni/graph/exec/unstable/IScheduleFunction.h - file omni/graph/exec/unstable/ITopology.gen.h - file omni/graph/exec/unstable/ITopology.h - file omni/graph/exec/unstable/Module.h - file omni/graph/exec/unstable/Node.h - file omni/graph/exec/unstable/NodeDef.h - file omni/graph/exec/unstable/NodeDefLambda.h - file omni/graph/exec/unstable/NodeGraphDef.h - file omni/graph/exec/unstable/NodePartition.h - file omni/graph/exec/unstable/PartitioningUtils.h - file omni/graph/exec/unstable/PassPipeline.h - file omni/graph/exec/unstable/PassRegistry.h - file omni/graph/exec/unstable/RaceConditionFinder.h - file omni/graph/exec/unstable/ScheduleFunction.h - file omni/graph/exec/unstable/SchedulingInfo.h - file omni/graph/exec/unstable/SmallStack.h - file omni/graph/exec/unstable/SmallVector.h - file omni/graph/exec/unstable/Span.h - file omni/graph/exec/unstable/Stamp.h ## Namespace hierarchy ### namespace omni #### namespace omni::graph ##### namespace omni::graph::exec ###### namespace omni::graph::exec::unstable ####### namespace omni::graph::exec::unstable::detail - struct omni::graph::exec::unstable::detail::ElementAt - class omni::graph::exec::unstable::detail::ExecutionPathCache - class omni::graph::exec::unstable::detail::ExecutorSingleNode - struct omni::graph::exec::unstable::detail::NodeData - class omni::graph::exec::unstable::detail::SmallStack - struct omni::graph::exec::unstable::detail::VisitAll - struct omni::graph::exec::unstable::detail::VisitFirst - struct omni::graph::exec::unstable::detail::VisitLast - enum omni::graph::exec::unstable::detail::VisitOrder - class omni::graph::exec::unstable::AtomicBackoff - enum omni::graph::exec::unstable::BackgroundResultStatus - class omni::graph::exec::unstable::CompactUniqueIndex - class omni::graph::exec::unstable::ConstName - struct omni::graph::exec::unstable::DefaultSchedulingStrategy - struct omni::graph::exec::unstable::EnumBitops - struct omni::graph::exec::unstable::EnumBitops&lt; PassPipelineStatus &gt; - struct omni::graph::exec::unstable::EnumBitops&lt; Status &gt; - **struct** omni::graph::exec::unstable::EnumBitops&lt; detail::VisitOrder &gt; - **class** omni::graph::exec::unstable::ExecutionContext - **struct** omni::graph::exec::unstable::ExecutionNodeData - **class** omni::graph::exec::unstable::ExecutionPath - **class** omni::graph::exec::unstable::ExecutionTask - **struct** omni::graph::exec::unstable::ExecutionVisit - **struct** omni::graph::exec::unstable::ExecutionVisitWithCacheCheck - **class** omni::graph::exec::unstable::Executor - **class** omni::graph::exec::unstable::GraphBuilderContextT - **class** omni::graph::exec::unstable::GraphBuilderT - **class** omni::graph::exec::unstable::GraphT - **class** omni::graph::exec::unstable::IApplyOnEachFunction - **class** omni::graph::exec::unstable::IApplyOnEachFunction_abi - **class** omni::graph::exec::unstable::IBase - **class** omni::graph::exec::unstable::IBase_abi - **class** omni::graph::exec::unstable::IDef - **class** omni::graph::exec::unstable::IDef_abi - **class** omni::graph::exec::unstable::IExecutionContext - **class** omni::graph::exec::unstable::IExecutionContext_abi - class omni::graph::exec::unstable::IExecutionCurrentThread - class omni::graph::exec::unstable::IExecutionCurrentThread_abi - class omni::graph::exec::unstable::IExecutionStateInfo - class omni::graph::exec::unstable::IExecutionStateInfo_abi - class omni::graph::exec::unstable::IExecutor - class omni::graph::exec::unstable::IExecutor_abi - class omni::graph::exec::unstable::IGlobalPass - class omni::graph::exec::unstable::IGlobalPass_abi - class omni::graph::exec::unstable::IGraph - class omni::graph::exec::unstable::IGraphBuilder - class omni::graph::exec::unstable::IGraphBuilderContext - class omni::graph::exec::unstable::IGraphBuilderContext_abi - class omni::graph::exec::unstable::IGraphBuilderNode - class omni::graph::exec::unstable::IGraphBuilderNode_abi - class omni::graph::exec::unstable::IGraphBuilder_abi - class omni::graph::exec::unstable::IGraph_abi - class omni::graph::exec::unstable::IInvalidationForwarder - class omni::graph::exec::unstable::IInvalidationForwarder_abi - class omni::graph::exec::unstable::INode - class omni::graph::exec::unstable::INode - class omni::graph::exec::unstable::INodeDef - class omni::graph::exec::unstable::INodeDef_abi - class omni::graph::exec::unstable::INodeFactory - class omni::graph::exec::unstable::INodeFactory_abi - class omni::graph::exec::unstable::INodeGraphDef - class omni::graph::exec::unstable::INodeGraphDefDebug - class omni::graph::exec::unstable::INodeGraphDefDebug_abi - class omni::graph::exec::unstable::INodeGraphDef_abi - class omni::graph::exec::unstable::INode_abi - class omni::graph::exec::unstable::IPartitionPass - class omni::graph::exec::unstable::IPartitionPass_abi - class omni::graph::exec::unstable::IPass - class omni::graph::exec::unstable::IPassFactory - class omni::graph::exec::unstable::IPassFactory_abi - class omni::graph::exec::unstable::IPassPipeline - class omni::graph::exec::unstable::IPassPipeline_abi - class omni::graph::exec::unstable::IPassRegistry - class omni::graph::exec::unstable::IPassRegistry_abi - class omni::graph::exec::unstable::IPassTypeRegistry - class `omni::graph::exec::unstable::IPassTypeRegistry` - class `omni::graph::exec::unstable::IPassTypeRegistry_abi` - class `omni::graph::exec::unstable::IPass_abi` - class `omni::graph::exec::unstable::IPopulatePass` - class `omni::graph::exec::unstable::IPopulatePass_abi` - class `omni::graph::exec::unstable::IScheduleFunction` - class `omni::graph::exec::unstable::IScheduleFunction_abi` - class `omni::graph::exec::unstable::ITopology` - class `omni::graph::exec::unstable::ITopology_abi` - struct `omni::graph::exec::unstable::Implements` - struct `omni::graph::exec::unstable::ImplementsCastWithoutAcquire` - class `omni::graph::exec::unstable::NodeDefLambda` - class `omni::graph::exec::unstable::NodeDefT` - class `omni::graph::exec::unstable::NodeGraphDefT` - class `omni::graph::exec::unstable::NodeT` - class `omni::graph::exec::unstable::PartitionSet` - enum `omni::graph::exec::unstable::PassPipelineStatus` - class `omni::graph::exec::unstable::PassPipelineT` - struct `omni::graph::exec::unstable::PassTypeRegistryEntry` - class `omni::graph::exec::unstable::RaceConditionFinder` ### API contents #### Classes - Classes - Macros - Directories - Enumerations - Files - Functions - Groups - Namespaces - Structs - Typedefs - Variables
omni.graph.http.md
# omni.graph.http ## API (python) ### Modules #### omni.graph.http
omni.graph.image.core_api.md
# Omniverse Kit API ## Class Hierarchy - namespace omni - namespace core - template class Generated&lt; omni::graph::image::core::unstable::IPostRenderGraph_abi &gt; - template class Generated&lt; omni::graph::image::core::unstable::IPreRenderGraph_abi &gt; - namespace graph - namespace image - namespace core - namespace unstable - class IPostRenderGraph_abi - class IPreRenderGraph_abi - namespace unstable - template class ComputeParams - template class ComputeParamsBuilder ## File Hierarchy - Directory omni - Directory graph - Directory - image - Directory - unstable - File - ComputeParamsBuilder.h - File - IPostRenderGraph.gen.h - File - IPostRenderGraph.h - File - IPreRenderGraph.gen.h - File - IPreRenderGraph.h ## Namespaces - gpu - gpu::rendergraph - omni - omni::core - omni::graph - omni::graph::exec - omni::graph::exec::unstable - omni::graph::image - omni::graph::image::core - omni::graph::image::core::unstable - omni::graph::image::unstable - omni::graph::image::unstable::@0 - omni::usd - omni::usd::hydra ## Classes and Structs - omni::core::Generated&lt; omni::graph::image::core::unstable::IPostRenderGraph_abi &gt; : The main interface for updating the post-render graph node of the execution graph. - omni::core::Generated&lt; omni::graph::image::core::unstable::IPreRenderGraph_abi &gt; : Interface for updating pre-render graphs. - omni::graph::image::core::unstable::IPostRenderGraph_abi : The main interface for updating the post-render graph node of the execution graph. - omni::graph::image::core::unstable::IPreRenderGraph_abi : Interface for updating pre-render graphs. - omni::graph::image::unstable::ComputeParams : Structure for holding arbitrary parameters. - omni::graph::image::unstable::ComputeParamsBuilder : Structure for building arbitrary parameters. # Class Description A builder class for constructing instances of the `omni::graph::image::unstable::ComputeParams` class. # Functions ## Functions - `gpu::rendergraph::OMNI_DECLARE_INTERFACE` - `omni::graph::image::core::unstable::OMNI_DECLARE_INTERFACE` - `omni::graph::image::core::unstable::OMNI_DECLARE_INTERFACE` - `omni::graph::image::unstable::scheduleCudaTask` # Typedefs ## Typedefs - `omni::usd::PathH`
omni.graph.telemetry.Classes.md
# omni.graph.telemetry Classes ## Classes Summary: - [Extension](omni.graph.telemetry/omni.graph.telemetry.Extension.html)
omni.graph.telemetry.Extension.md
# Extension ## omni.graph.telemetry.Extension Bases: `omni.ext._extensions.IExt` ### Methods | Method | Description | |--------|-------------| | `__init__(self)` | | | `on_shutdown()` | | | `on_startup()` | | #### omni.graph.telemetry.Extension.__init__ `__init__(self: omni.ext._extensions.IExt) -> None` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```
omni.graph.telemetry.Functions.md
# omni.graph.telemetry Functions ## Functions Summary: | Function | Description | |----------|-------------| | send_graph_event | send_graph_event(descriptor: str) -> None |
omni.graph.telemetry.md
# omni.graph.telemetry ## Classes Summary - [Extension](./omni.graph.telemetry.Classes.html) ## Functions Summary - [send_graph_event](./omni.graph.telemetry.Functions.html) - send_graph_event(descriptor: str) -> None
omni.graph.telemetry.send_graph_event.md
# send_graph_event ## send_graph_event ```python omni.graph.telemetry.send_graph_event(descriptor: str) -> None ``` Sends a graphEvent structured log event with the specified event descriptor string ### Parameters - **descriptor** (str) – A string identifying or describing the event
omni.graph.template.mixed.Classes.md
# omni.graph.template.mixed Classes ## Classes Summary: | Class | Description | |-------|-------------| | [IOmniGraphTemplateMixed](omni.graph.template.mixed/omni.graph.template.mixed.IOmniGraphTemplateMixed.html) | Base class for sample interface in the OmniGraph mixed purpose template. |
omni.graph.template.mixed.IOmniGraphTemplateMixed.md
# IOmniGraphTemplateMixed ## IOmniGraphTemplateMixed ```python class omni.graph.template.mixed.IOmniGraphTemplateMixed ``` Bases: `omni.graph.template.mixed._o_g_t_m._IOmniGraphTemplateMixed` Base class for sample interface in the OmniGraph mixed purpose template. The interface consists of a single function that returns a float value representing a constant to use in the template node. ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | Overloaded function. | ### Attributes | Attribute | Description | |-----------|-------------| | `multiplier` | | #### `__init__` ```python __init__(*args, **kwargs) ``` Overloaded function. 1. `__init__(self: omni.graph.template.mixed._o_g_t_m.IOmniGraphTemplateMixed, arg0: omni.core._core.IObject) -> None` 2. `__init__(self: omni.graph.template.mixed._o_g_t_m.IOmniGraphTemplateMixed) -> None` # Hello, World! This is an example of a link. Here is an image: ``` console.log('Hello, World!'); ```
omni.graph.template.mixed_api.md
# kit-omnigraph API ## Class Hierarchy - namespace omni - namespace graph - namespace template_mixed - class IOmniGraphTemplateMixed_abi ## File Hierarchy - Directory omni - Directory graph - Directory template - Directory mixed - File IOmniGraphTemplateMixed.h ## Namespaces - omni - omni::core - omni::graph - omni::graph::template_mixed ## Classes and Structs - omni::graph::template_mixed::IOmniGraphTemplateMixed_abi ## Interfaces ### `OMNI_DECLARE_INTERFACE` Base class for sample interface in the OmniGraph mixed purpose template. The interface consists of a single function that returns a float value representing a constant to use in the template node. ## Functions ### `omni::graph::template_mixed::OMNI_DECLARE_INTERFACE`
omni.graph.tools.build_directory_metadata.md
# build_directory_metadata ## build_directory_metadata ```python def build_directory_metadata(ext_path: str, destination: pathlib.Path | None) -> dict[str, dict | str]: ``` Find all of the node type metadata that can be found in the given directory. **Parameters:** - `ext_path`: Directory containing the .ogn files belonging to this extension, traversed fully to find them. - `destination`: Location of file to write metadata. Do not write anything if None. **Raises:** - **OgnScanError** – If the ext_path was not a directory or could not be read, or any of the .ogn files failed parsing. ```
omni.graph.tools.Classes.md
# omni.graph.tools Classes ## Classes Summary: | Class Name | Description | |------------|-------------| | DeprecateMessage | Manager for deprecation messages, to make it efficient to prevent multiple logging of the same | | DeprecatedDictConstant | Class that lets you show a warning or error when attempting to use a deprecated dict constant value. | | DeprecatedStringConstant | Class that lets you show a warning or error when attempting to use a deprecated string constant value. | | DeprecationError | Exception to raise when a hard-deprecated import, class, or function is attempted to be used. | | DeprecationLevel | Enum describing how deprecations should be treated | | IndentedOutput | Helper class that provides output capabilities to messages with preserved indentation levels |
omni.graph.tools.DeprecatedClass.md
# DeprecatedClass ## DeprecatedClass ### omni.graph.tools.DeprecatedClass #### Decorator to deprecate a class. ##### Parameters - **deprecation_message** – A string to describe the action the user is to take to avoid the deprecated class. If None then a generic message will be provided. A deprecation message will be shown only once, the first time the deprecated class is accessed. ```python @DeprecatedClass("After version 1.5.0 use og.NewerClass instead") class OlderClass: STATIC_VALUE = 1 obj = OlderClass() # Gives a deprecation warning value = OlderClass.STATIC_VALUE # This also works for static class members and methods ``` ```
omni.graph.tools.DeprecatedDictConstant.md
# DeprecatedDictConstant ## DeprecatedDictConstant ``` class omni.graph.tools.DeprecatedDictConstant(name: str, new_value: dict, message: str, deprecation_level: Optional[DeprecationLevel] = None) ``` **Bases:** `dict` **Description:** Class that lets you show a warning or error when attempting to use a deprecated dict constant value. **Usage:** ```python # Original usage of a dictionary MY_DICT = {"setting": True} print(f"Setting is {MY_DICT['setting']}") # Output: Setting is True # Deprecation declaration MY_DICT = DeprecatedDictConstant("MY_DICT", {}, "Please delete references to it.") print(f"Setting is {MY_DICT['setting']}") ``` ``` ERROR: Dictionary constant 'MY_DICT' can no longer be used. Please delete references to it. KeyError: "setting" ## Methods | Method | Description | | --- | --- | | `__init__(name, new_value, message[, deprecation_level=None])` | Construct a dictionary constant that will print a message if it is used. :param name: Name of the dictionary constant. | ### __init__(name: str, new_value: dict, message: str, deprecation_level: Optional[DeprecationLevel] = None) Construct a dictionary constant that will print a message if it is used. :param name: Name of the dictionary constant. Should match what was formerly exported as part of the API :param new_value: The value to return if the dictionary is requested :param message: Message to emit if the dictionary is used :param deprecation_level: How serious the deprecation message should be. None means use the default
omni.graph.tools.DeprecatedImport.md
# DeprecatedImport ## DeprecatedImport Decorator to deprecate a specific file or module import. Usually the functionality has been deprecated and moved to a different file. ### Parameters - **deprecation_message** – String with the action the user is to perform to avoid the deprecated import ### Usage ```python '''This is the top line of the imported file''' import omni.graph.tools as ogt ogt.DeprecatedImport("Import 'omni.graph.tools as ogt' and use ogt.new_function() instead") # The rest of the file can be left as-is for best backward compatibility, or import non-deprecated versions # of objects from their new location to avoid duplication. ``` ```
omni.graph.tools.DeprecatedStringConstant.md
# DeprecatedStringConstant ## DeprecatedStringConstant ```python class omni.graph.tools.DeprecatedStringConstant(name: str, new_value: str | None = None, message: str, deprecation_level: Optional[DeprecationLevel] = None) ``` Bases: `str` Class that lets you show a warning or error when attempting to use a deprecated string constant value. Usage: ```python # Original usage of a boolean setting MY_SETTING = "/persistent/omnigraph/mySetting" print(f"Value of {MY_SETTING} is {carb.settings.get_settings().get(MY_SETTING)}") ``` Value of /persistent/omnigraph/mySetting is True > # Deprecation declaration > MY_SETTING = DeprecatedStringConstant("MY_SETTING", "UNUSED", "Please delete references to it.") > print(f"Value of {MY_SETTING} is {carb.settings.get_settings().get(MY_SETTING)}") ERROR: String constant 'MY_SETTING' can no longer be used. Please delete references to it. Value of UNUSED is False Note that the deprecation message only appears when the value is cast to a string, which is the majority of interesting cases. Any deprecation which needs to catch other manipulations of the string should use a different approach. ## Methods | Method | Description | | --- | --- | | `__init__(name: str, new_value: str | None, message: str, deprecation_level: Optional[DeprecationLevel] = None)` | Construct a string constant that will print a message if it is used :param name: Name of the string constant. | Construct a string constant that will print a message if it is used :param name: Name of the string constant. Should match what was formerly exported as part of the API :param new_value: The value to return if the string is requested :param message: Message to emit if the string is used :param deprecation_level: How serious the deprecation message should be. None means use the default
omni.graph.tools.deprecated_constant_object.md
# deprecated_constant_object ## deprecated_constant_object ``` Class that lets you show a warning or error when attempting to use a deprecated constant object. It only works for objects as it relies on overriding the `__getattr__` function, which simple values like integers and floats do not have. ### Parameters - **constant** – The actual value of the constant as it was before deprecation - **deprecation_message** – Additional message to provide the user with information of how to avoid using the constant - **deprecation_level** – Optional ability to hardcode the deprecation level of this particular constant ### Usage: ```python # Original usage of a constant RE_FIND_HOMER = re.compile(".*D'oh") print(RE_FIND_HOMER.match("Don't have a cow man")) # None # Deprecation declaration RE_FIND_HOMER = deprecated_constant(re.compile(".*D'oh"), "Please delete references to it.") ```python print(RE_FIND_HOMER.match("Don't have a cow man")) ``` WARNING: Constant 'RE_FIND_HOMER' is deprecated. Please delete references to it. None
omni.graph.tools.deprecated_function.md
# deprecated_function ## deprecated_function ``` ```python @deprecated_function("After version 1.5.0 use og.newer_function() instead") def older_function(): pass ``` ```python @property @deprecated_function("use 'your_prop' instead.", is_property=True) def my_prop(self): return self.your_prop @my_prop.setter @deprecated_function("use 'your_prop' instead.", is_property=True) def my_prop(self, value): self.your_prop = value ```
omni.graph.tools.DeprecateMessage.md
# DeprecateMessage ## Overview DeprecateMessage is a manager for deprecation messages, designed to efficiently prevent multiple logging of the same deprecation messages. The default settings for output are usually sufficient to help identify where deprecated code is referenced. However, if more detailed information is required, the class variables can be adjusted to reduce filtering. The message should include an action item for the user to upgrade from the deprecated functionality. ### Class Variables - `SILENCE_LOG = False` - When set, the output does not go to the console log; useful to disable for testing. - `SHOW_STACK = True` - Report stack trace in the deprecation message - can be turned off if it is too verbose. - `MAX_STACK_LEVELS = 3` - Maximum number of stack levels to report, after filtering. ### Example Usage ```python DeprecateMessage.deprecated("Install the latest version instead") # Example of tuning the class variables SILENCE_LOG = False # Disable console log for testing SHOW_STACK = True # Include stack trace MAX_STACK_LEVELS = 3 # Limit stack trace levels ``` ### Handling Deprecation Simple deprecation cases can be handled directly using Python features: ```python # Rename constant from A to B A = (DeprecateMessage("A has been renamed to B") and False) or B # Constant A will be removed A = (DeprecateMessage("A will be removed, use B instead") and False) or B ``` ## Methods - **clear_messages()** - Clear the logged messages so that they can be logged again. - **deprecated(message[, deprecation_level])** - Log the deprecation message if it has not yet been logged, otherwise do nothing. - **deprecations_are_errors()** - Returns whether deprecations are treated as errors. <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> deprecations_are_errors </span> </code> </a> () </p> </td> <td> <p> Returns True if deprecations are currently being treated as errors </p> </td> </tr> <tr class="row-even"> <td> <p> <a class="reference internal" href="#omni.graph.tools.DeprecateMessage.messages_logged" title="omni.graph.tools.DeprecateMessage.messages_logged"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> messages_logged </span> </code> </a> () </p> </td> <td> <p> Returns the set of messages that have been logged so far </p> </td> </tr> <tr class="row-odd"> <td> <p> <a class="reference internal" href="#omni.graph.tools.DeprecateMessage.set_deprecations_are_errors" title="omni.graph.tools.DeprecateMessage.set_deprecations_are_errors"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> set_deprecations_are_errors </span> </code> </a> (make_errors) </p> </td> <td> <p> Enable or disable treating deprecations as errors instead of warnings </p> </td> </tr> </tbody> </table> <p class="rubric"> Attributes </p> <table class="autosummary longtable docutils align-default"> <colgroup> <col style="width: 10%"/> <col style="width: 90%"/> </colgroup> <tbody> <tr class="row-odd"> <td> <p> <a class="reference internal" href="#omni.graph.tools.DeprecateMessage.MAX_STACK_LEVELS" title="omni.graph.tools.DeprecateMessage.MAX_STACK_LEVELS"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> MAX_STACK_LEVELS </span> </code> </a> </p> </td> <td> <p> Maximum number of stack levels to report, after filtering </p> </td> </tr> <tr class="row-even"> <td> <p> <a class="reference internal" href="#omni.graph.tools.DeprecateMessage.SHOW_STACK" title="omni.graph.tools.DeprecateMessage.SHOW_STACK"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> SHOW_STACK </span> </code> </a> </p> </td> <td> <p> Report stack trace in the deprecation message - can be turned off if it is too verbose </p> </td> </tr> <tr class="row-odd"> <td> <p> <a class="reference internal" href="#omni.graph.tools.DeprecateMessage.SILENCE_LOG" title="omni.graph.tools.DeprecateMessage.SILENCE_LOG"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> SILENCE_LOG </span> </code> </a> </p> </td> <td> <p> When set the output does not go to the console log; useful to disable for testing </p> </td> </tr> </tbody> </table> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.tools.DeprecateMessage.__init__"> <span class="sig-name descname"> <span class="pre"> __init__ </span> </span> <span class="sig-paren"> ( </span> <span class="sig-paren"> ) </span> <a class="headerlink" href="#omni.graph.tools.DeprecateMessage.__init__" title="Permalink to this definition">  </a> </dt> <dd> </dd> </dl> <dl class="py class"> <dt class="sig sig-object py" id="omni.graph.tools.DeprecateMessage.NoLogging"> <em class="property"> <span class="pre"> class </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> NoLogging </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> <a class="headerlink" href="#omni.graph.tools.DeprecateMessage.NoLogging" title="Permalink to this definition">  </a> </dt> <dd> <p> Bases: <code class="xref py py-class docutils literal notranslate"> <span class="pre"> object </span> </code> </p> <p> Context manager class to let you import a bunch of known deprecated functions without logging warnings. Typical use would be in providing backward compatibility in a module where submodules have moved. </p> <blockquote> <div> <dl class="simple"> <dt> with DeprecateMessage.NoLogging(): </dt> <dd> <p> import .v1_0.my_old_function as my_old_function </p> </dd> </dl> </div> </blockquote> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.tools.DeprecateMessage.clear_messages"> <em class="property"> <span class="pre"> classmethod </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> clear_messages </span> </span> <span class="sig-paren"> ( </span> <span class="sig-paren"> ) </span> <a class="headerlink" href="#omni.graph.tools.DeprecateMessage.clear_messages" title="Permalink to this definition">  </a> </dt> <dd> <p> Clear the logged messages so that they can be logged again </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.tools.DeprecateMessage.deprecated"> <em class="property"> <span class="pre"> classmethod </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> deprecated </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> message </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"> deprecation_level </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> <a class="reference internal" href="omni.graph.tools.DeprecationLevel.html#omni.graph.tools.DeprecationLevel" title="omni.graph.tools._impl.deprecate.DeprecationLevel"> </a> ### DeprecateMessage.deprecated Log the deprecation message if it has not yet been logged, otherwise do nothing #### Parameters - **message** – Message to display; only displays once even if this is called many times - **deprecation_level** – If specified, override the default level coming from deprecations_are_errors() Adds stack trace information if the class member SHOW_STACK is True. Skips the Carbonite logging if the class member SILENCE_LOG is True (mostly useful for testing when a warning is the expected result). ### DeprecateMessage.deprecations_are_errors Returns True if deprecations are currently being treated as errors ### DeprecateMessage.messages_logged Returns the set of messages that have been logged so far ### DeprecateMessage.set_deprecations_are_errors Enable or disable treating deprecations as errors instead of warnings ### DeprecateMessage.MAX_STACK_LEVELS Maximum number of stack levels to report, after filtering ### DeprecateMessage.SHOW_STACK Report stack trace in the deprecation message - can be turned off if it is too verbose ### DeprecateMessage.SILENCE_LOG When set the output does not go to the console log; useful to disable for testing
omni.graph.tools.DeprecationError.md
# DeprecationError Exception to raise when a hard-deprecated import, class, or function is attempted to be used. Exists to provide a last bit of information to users who have been ignoring previous deprecation errors. ## Methods ### `__init__(*args, **kwargs)`
omni.graph.tools.DeprecationLevel.md
# DeprecationLevel ## Overview Enum describing how deprecations should be treated ### Attributes | Attribute | Description | |-----------|-------------| | `WARNING` | Calling deprecated code results in a warning message | | `ERROR` | Calling deprecated code results in an error message | # Calling deprecated code results in a warning message
omni.graph.tools.destroy_property.md
# destroy_property ## destroy_property ```python omni.graph.tools.destroy_property(self, property_name: str) ``` Call the destroy method on a property and set it to None - helps with garbage collection In a class’s destroy() or __del__ method you can call this to generically handle member destruction when such things do not happen automatically (e.g. when you cross into the C++-bindings, or the objects have circular references) ```python def destroy(self): destroy_property(self, "_widget") ``` If the property is a list then the list members are individually destroyed. If the property is a dictionary then the values of the dictionary are individually destroyed. NOTE: Only call this if you are the owner of the property, otherwise just set it to None. ### Parameters - **self** – The object owning the property to be destroyed (can be anything with a destroy() method) - **property_name** – Name of the property to be destroyed
omni.graph.tools.Functions.md
# omni.graph.tools Functions ## Functions Summary: | Function | Description | |----------|-------------| | DeprecatedClass | Decorator to deprecate a class. | | DeprecatedImport | Decorator to deprecate a specific file or module import. Usually the functionality has been deprecated and | | RenamedClass | Syntactic sugar to provide a class deprecation that is a simple renaming, where all of the functions in | | build_directory_metadata | Find all of the node type metadata that can be found in the given directory. | | deprecated_constant_object | Class that lets you show a warning or error when attempting to use a deprecated constant object. | | deprecated_function | Decorator to deprecate a function. | | destroy_property | Call the destroy method on a property and set it to None - helps with garbage collection | | function_trace | Debugging decorator that adds function call tracing, potentially gated by an environment variable. | | get_node_type_names_from_metadata | Extract the list of fully qualified node type names from the generated metadata | | import_tests_in_directory | Find all of the .ogn-generated tests in a module’s directory and import them into that module. | | shorten_string_lines_to | | | | |----------------|-------------------------------------------------------------------------------------| | shorten_string_lines_to | Convert a single long line into a list of shorter lines | | supported_attribute_type_names | |
omni.graph.tools.function_trace.md
# function_trace ## function_trace ```python @function_trace() def my_function(value: str) -> str: return value + value ``` Calling my_function("X") with debugging enabled will print this: ``` Calling my_function('X') 'my_function' returned 'XX' ``` The extra parameter lets you selectively disable it based on environment variables: ```python @function_trace("OGN_DEBUG") def my_function(value: str) -> str: return value + value ``` This version only enables debugging if the environment variable "OGN_DEBUG" is set
omni.graph.tools.get_node_type_names_from_metadata.md
# get_node_type_names_from_metadata ## get_node_type_names_from_metadata ```python def get_node_type_names_from_metadata(metadata: dict[str, any]) -> list[str]: ``` Extract the list of fully qualified node type names from the generated metadata :param metadata: Dictionary loaded as JSON from the nodes.json file generated earlier **Returns:** List of node type names appearing in the metadata, prepending the extension name if needed to make it unique ```
omni.graph.tools.import_tests_in_directory.md
# import_tests_in_directory ## import_tests_in_directory ```python omni.graph.tools.import_tests_in_directory(module_file: str, module_name: str) ``` Find all of the .ogn-generated tests in a module’s directory and import them into that module. This will only be called from the generated test directory __init__.py file, generated below by the import_file_contents() function. ### Parameters - **module_file** – Full path of the __init__.py file for the generated test directory (e.g. its __file__) - **module_name** – Module name at which the generated test directory is imported (e.g. its __name__)
omni.graph.tools.IndentedOutput.md
# IndentedOutput ## Class: omni.graph.tools.IndentedOutput ### Properties: - output: File type that receives the output - indent_level: Number of indentation levels for the current output - indent_string: String representing the current indentation level ### Methods - **__init__(output)** - Initialize the indentation level and prepare for output - **close()** - Close the output stream - **exdent([message])** - Decrease the indentation level for emitted code - **indent([message])** - Increase the indentation level for emitted code - **prepend(message)** - Prepend a message to the output <p>Write the message line at the beginning of the output.</p> <p>Output a single message line to the file.</p> <p>Output a string to the output file without indentation or added newline Passing in a list will write each list member on its own line.</p> <p>Initialize the indentation level and prepare for output</p> <p><strong>output</strong> – IO object to which this object will be sending its output Both io.TextIOWrapper (output from “open()”) and io.StringIO can be used</p> <p>Close the output stream</p> <p>Decrease the indentation level for emitted code</p> <p>If a message is specified then emit that message immediately after exdenting, allowing you to easily close sections like: out.exdent(“}”)</p> <p>Increase the indentation level for emitted code</p> <p>If a message is specified then emit that message immediately before indenting, allowing you to easily open sections like: out.indent(“{“)</p> <p>Returns True so that indented sections can be indented in the code:</p> <p>if output.indent(“begin {“):</p> <p>output.exdent(“})</p> <p>Prepend a message to the output</p> <dl> <dt> <p> Write the message line at the beginning of the output. </p> <p> This rewrites the entire output so it is best to minimize its use, and stick with string implementations. The message is written as-is with no newlines or indenting </p> </dt> <dt> <p> Output a single message line to the file. This assumes indentation will be used and a newline will be appended. Passing in a list will write each list member on its own line. </p> <dl> <dt> Parameters </dt> <dd> <p> <strong> message </strong> – Line of text being emitted </p> </dd> </dl> </dt> <dt> <p> Output a string to the output file without indentation or added newline Passing in a list will write each list member on its own line. </p> <dl> <dt> Parameters </dt> <dd> <p> <strong> message </strong> – Line of text being emitted </p> </dd> </dl> </dt> </dl>
omni.graph.tools.md
# omni.graph.tools ## Classes Summary: | Class | Description | | --- | --- | | [DeprecateMessage](./omni.graph.tools/omni.graph.tools.DeprecateMessage.html) | Manager for deprecation messages, to make it efficient to prevent multiple logging of the same | | [DeprecatedDictConstant](./omni.graph.tools/omni.graph.tools.DeprecatedDictConstant.html) | Class that lets you show a warning or error when attempting to use a deprecated dict constant value. | | [DeprecatedStringConstant](./omni.graph.tools/omni.graph.tools.DeprecatedStringConstant.html) | Class that lets you show a warning or error when attempting to use a deprecated string constant value. | | [DeprecationError](./omni.graph.tools/omni.graph.tools.DeprecationError.html) | Exception to raise when a hard-deprecated import, class, or function is attempted to be used. | | [DeprecationLevel](./omni.graph.tools/omni.graph.tools.DeprecationLevel.html) | Enum describing how deprecations should be treated | | [IndentedOutput](./omni.graph.tools/omni.graph.tools.IndentedOutput.html) | Helper class that provides output capabilities to messages with preserved indentation levels | ## Functions Summary: | Function | Description | | --- | --- | | [DeprecatedClass](./omni.graph.tools/omni.graph.tools.DeprecatedClass.html) | Decorator to deprecate a class. | | [DeprecatedImport](./omni.graph.tools/omni.graph.tools.DeprecatedImport.html) | Decorator to deprecate a specific file or module import. Usually the functionality has been deprecated and | | [RenamedClass](./omni.graph.tools/omni.graph.tools.RenamedClass.html) | Syntactic sugar to provide a class deprecation that is a simple renaming, where all of the functions in | | [build_directory_metadata](./omni.graph.tools/omni.graph.tools.build_directory_metadata.html) | Find all of the node type metadata that can be found in the given directory. | <p> <span class="doc"> deprecated_constant_object </span> </p> <p> Class that lets you show a warning or error when attempting to use a deprecated constant object. </p> <p> <span class="doc"> deprecated_function </span> </p> <p> Decorator to deprecate a function. </p> <p> <span class="doc"> destroy_property </span> </p> <p> Call the destroy method on a property and set it to None - helps with garbage collection </p> <p> <span class="doc"> function_trace </span> </p> <p> Debugging decorator that adds function call tracing, potentially gated by an environment variable. </p> <p> <span class="doc"> get_node_type_names_from_metadata </span> </p> <p> Extract the list of fully qualified node type names from the generated metadata </p> <p> <span class="doc"> import_tests_in_directory </span> </p> <p> Find all of the .ogn-generated tests in a module’s directory and import them into that module. </p> <p> <span class="doc"> shorten_string_lines_to </span> </p> <p> Convert a single long line into a list of shorter lines </p> <p> <span class="doc"> supported_attribute_type_names </span> </p>
omni.graph.tools.RenamedClass.md
# RenamedClass ## RenamedClass ``` [¶](#renamedclass) ```markdown Syntactic sugar to provide a class deprecation that is a simple renaming, where all of the functions in the old class are still present in backwards compatible form in the new class. ### Parameters - **old_class_name** – The name of the class that was renamed - **rename_message** – Message to give the user if the old class name is used. A generic message will be provided if this is None. Usage: ```python MyDeprecatedClass = RenamedClass(MyNewClass, "MyDeprecatedClass") obj = MyDeprecatedClass() # Gives a deprecation warning obj = MyNewClass() # Works fine - both calls return the same type of object # This also works for static class members and methods value = MyDeprecatedClass.VALUE # Gives a deprecation warning value = MyDeprecatedClass.class_method() # Gives a deprecation warning value = MyDeprecatedClass.static_method() # Gives a deprecation warning ``` --- title: "文章标题" author: "作者名" date: "2023-04-01" --- # 一级标题 这里是文章的正文内容。 ## 二级标题 这里是二级标题下的内容。 ### 三级标题 这里是三级标题下的内容。 ## 代码块 ```python # 这里是Python代码 print("Hello, World!") ``` ## 引用 > 这是一段引用内容。 ## 列表 - 列表项1 - 列表项2 - 列表项3 ## 表格 | 列1 | 列2 | 列3 | | --- | --- | --- | | 数据1 | 数据2 | 数据3 | | 数据4 | 数据5 | 数据6 | ## 链接 这里是一个链接文本,但链接已被删除。 ## 图片 这里原本有一张图片,但图片已被删除。 ## 脚注 这里是脚注内容。 --- ## 页脚 ---
omni.graph.tools.shorten_string_lines_to.md
# shorten_string_lines_to ## shorten_string_lines_to Convert a single long line into a list of shorter lines ### Parameters - **full_string** – Single line to be trimmed - **suggested_limit** – Minimum length of line; line will extend to the next space past this limit
omni.graph.tools.supported_attribute_type_names.md
# supported_attribute_type_names ## supported_attribute_type_names
omni.kit.actions.core.Action.md
# Action ## Action Abstract action base class. ### Methods - **`__init__`** (self, extension_id, action_id, ...) - Create an action. - **`execute`** (self, *args, **kwargs) - Execute the action. - **`invalidate`** (self) - Invalidate this action so that executing it will not do anything. ### Attributes - **`description`** - Get the description of this action. - **`display_name`** - Get the display name of this action. - **`extension_id`** - Get the extension ID of this action. | Property | Description | |----------|-------------| | `extension_id` | Get the id of the source extension which registered this action. | | `icon_url` | Get the URL of the icon used to represent this action. | | `id` | Get the id of this action, unique to the extension that registered it. | | `parameters` | Get the parameters accepted by this action's execute function. | | `requires_parameters` | Query whether this action requires any parameters to be passed when executed? | | `tag` | Get the tag that this action is grouped with. | ```python __init__( self: omni.kit.actions.core._kit_actions_core.Action, extension_id: str, action_id: str, python_object: object, display_name: str = '', description: str = '', icon_url: str = '', tag: str = '' ) ``` ## Create an action Create an action. ### Parameters - **extension_id** – The id of the source extension registering the action. - **action_id** – Id of the action, unique to the extension registering it. - **python_object** – The Python object called when the action is executed. - **display_name** – The name of the action for display purposes. - **description** – A brief description of what the action does. - **icon_url** – The URL of an image which represents the action. - **tag** – Arbitrary tag used to group sets of related actions. ### Returns The action that was created. ## Execute the action Execute the action. ### Parameters - **\*args** – Variable length argument list which will be forwarded to execute. - **\*\*kwargs** – Arbitrary keyword arguments that will be forwarded to execute. ### Returns The result of executing the action, converted to a Python object (could be None). ## Invalidate this action Invalidate this action so that executing it will not do anything. This can be called if it is no longer safe to execute the action, and by default is called when deregistering an action (optional). ## Get the description of this action Get the description of this action. ### Returns The description of this action. ### Return type str ## Get the display name of this action Get the display name of this action. ### Returns The display name of this action. <p> The display name of this action. </p> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.extension_id"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> extension_id </span> </span> </dt> <dd> <p> Get the id of the source extension which registered this action. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The id of the source extension which registered this action. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> </dl> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.icon_url"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> icon_url </span> </span> </dt> <dd> <p> Get the URL of the icon used to represent this action. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The URL of the icon used to represent this action. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> </dl> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.id"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> id </span> </span> </dt> <dd> <p> Get the id of this action, unique to the extension that registered it. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The id of this action, unique to the extension that registered it. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> </dl> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.parameters"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> parameters </span> </span> </dt> <dd> <p> Get the parameters accepted by this action’s execute function. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The parameters accepted by this action’s execute function. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> dict </p> </dd> </dl> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.requires_parameters"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> requires_parameters </span> </span> </dt> <dd> <p> Query whether this action requires any parameters to be passed when executed? </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> True if this action requires any parameters to be passed when executed, false otherwise. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> bool </p> </dd> </dl> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.tag"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> tag </span> </span> </dt> <dd> <p> Get the tag that this action is grouped with. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The tag that this action is grouped with. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> str </p> </dd> </dl> </dd> </dl> </dd> </dl>
omni.kit.actions.core.Classes.md
# omni.kit.actions.core Classes ## Classes Summary: | Class | Description | |-------|-------------| | [Action](omni.kit.actions.core/omni.kit.actions.core.Action.html) | Abstract action base class. | | [IActionRegistry](omni.kit.actions.core/omni.kit.actions.core.IActionRegistry.html) | Maintains a collection of all registered actions and allows any extension to discover them. |