file_path
stringlengths
5
148
content
stringlengths
0
526k
omni.fabric.commands.ToggleVisibilitySelectedFabricPrimsCommand.md
# ToggleVisibilitySelectedFabricPrimsCommand ## ToggleVisibilitySelectedFabricPrimsCommand ```python class omni.fabric.commands.ToggleVisibilitySelectedFabricPrimsCommand(selected_paths: List[str], stage: Optional[Stage] = None) ``` **Base Class:** [Command](#) **Description:** Toggles the visibility of the selected Fabric prims. **Parameters:** - **selected_paths** (List[str]) – The Fabric paths of the selected prims. - **stage** (Optional[Stage]) – The stage where the prims exist. If not provided, the default stage is used. **Methods:** - **__init__**(selected_paths, stage=None) ``` | Function | Description | |----------|-------------| | `do(selected_paths[, stage])` | Toggles the visibility of the selected prims. | | `do()` | Executes the toggle visibility command on the selected prims. | | `undo()` | Undoes the toggle visibility command, restoring the original visibility states of the selected prims. | ### `__init__(selected_paths: List[str], stage: Optional[Stage] = None)` Toggles the visibility of the selected prims. ### `do()` Executes the toggle visibility command on the selected prims. ### `undo()` Undoes the toggle visibility command, restoring the original visibility states of the selected prims.
omni.fabric.commands.TransformFabricPrimCommand.md
# TransformFabricPrimCommand ## TransformFabricPrimCommand ```python class omni.fabric.commands.TransformFabricPrimCommand(path: str, new_transform_matrix: Matrix4d, old_transform_matrix: Optional[Matrix4d] = None, is_world_xform: bool = False, time_code: TimeCode = Usd.TimeCode.Default(), usd_context_name: str = '') ``` This class represents a command to transform a prim in the fabric. - **path**: The path of the prim to transform. - **new_transform_matrix**: The new transformation matrix to apply. - **old_transform_matrix**: (Optional) The original transformation matrix. Default is None. - **is_world_xform**: Whether the transformation is in world space. Default is False. - **time_code**: The time code for the transformation. Default is Usd.TimeCode.Default(). - **usd_context_name**: The USD context name. Default is an empty string. ## omni.fabric.commands.TransformFabricPrimCommand Bases: `Command` A command to transform a Fabric prim. This command applies a specified transformation matrix to a Fabric prim at a given path. It can operate in either world or local space and supports undo/redo operations. ### Parameters - **path** – str Prim path. - **new_transform_matrix** – usdrt.Gf.Matrix4d New local/world transform matrix. - **old_transform_matrix** – Optional[usdrt.Gf.Matrix4d] = None Optional old local/world transform matrix to undo to. If `None`, use current transform. - **is_world_xform** – bool = False Whether the transformation is applied in world space (True) or local space (False). Defaults to False. - **time_code** – usdrt.Usd.TimeCode = Usd.TimeCode.Default() The timecode at which the transformation is applied. Defaults to usdrt.Usd.TimeCode.Default(). - **usd_context_name** – str = "" The name of the USD context the command operates within. Defaults to an empty string, which uses the default context. ### Methods - `__init__(path, new_transform_matrix[, ...])` Creates a TransformFabricPrimCommand to perform transformations on a Fabric prim. - `do()` Executes the command to transform a Fabric prim. - `undo()` Undoes the transformation of the Fabric prim, effectively reset the prim to the old transformation. #### __init__ - **path** – str - **new_transform_matrix** – Matrix4d - **old_transform_matrix** – Optional[Matrix4d] = None - **is_world_xform** – bool = False - **time_code** – TimeCode = Usd.TimeCode.Default() - **usd_context_name** – str = "" ## omni.fabric.commands.TransformFabricPrimCommand ### `__init__(path: str, new_transform_matrix: usdrt.Gf.Matrix4d, old_transform_matrix: usdrt.Gf.Matrix4d = None)` Creates a TransformFabricPrimCommand to perform transformations on a Fabric prim. **Parameters** - **path** (str) – The path to the Fabric prim to transform. - **new_transform_matrix** (usdrt.Gf.Matrix4d) – A 4x4 transformation matrix specifying the new transformation. - **old_transform_matrix** (usdrt.Gf.Matrix4d, optional) – The original transformation matrix before the transformation. ### `do()` Executes the command to transform a Fabric prim. ### `undo()` Undoes the transformation of the Fabric prim, effectively reset the prim to the old transformation.
omni.graph.action.Functions.md
# omni.graph.action Functions ## Functions Summary: | Function | Description | |----------|-------------| | get_interface | get_interface() -> omni.graph.action_core._omni_graph_action_core.IActionGraph |
omni.graph.action.get_interface.md
# get_interface Access the IActionGraph interface. This may be more efficient than creating an instance each time it is needed. ## Returns - The interface object ## Return type - omni.graph.action.IActionGraph
omni.graph.action.md
# omni.graph.action ## Functions Summary: - **get_interface** - get_interface() -> omni.graph.action_core._omni_graph_action_core.IActionGraph
omni.graph.action_core.Functions.md
# omni.graph.action_core Functions ## Functions Summary - **get_interface** - get_interface() -> omni.graph.action_core._omni_graph_action_core.IActionGraph
omni.graph.action_core_api.md
# Omniverse Kit API ## Class Hierarchy - namespace omni - namespace core - template class Generated<omni::graph::action::IActionGraph_abi> - template class Generated<omni::graph::action::unstable::IActionGraphNodes_abi> - namespace graph - namespace action - namespace unstable - class IActionGraphNodes_abi - enum NodeTypeSpecialBehavior - class IActionGraph_abi ## File Hierarchy - Directory omni - Directory graph - Directory action - Directory unstable - File IActionGraphNodes.gen.h - File IActionGraphNodes.h ## Namespaces - **omni** - **omni::core** - **omni::graph** - **omni::graph::action** - **omni::graph::action::unstable** ## Classes and Structs - **omni::core::Generated&lt; omni::graph::action::IActionGraph_abi &gt;** : Functions for implementing nodes which are used in `Action Graph`. - **omni::core::Generated&lt; omni::graph::action::unstable::IActionGraphNodes_abi &gt;** - **omni::graph::action::IActionGraph_abi** : Functions for implementing nodes which are used in `Action Graph`. - **omni::graph::action::unstable::IActionGraphNodes_abi** ## Enums - **omni::graph::action::unstable::NodeTypeSpecialBehavior** ## Functions - **omni::graph::action::getInterface** - **omni::graph::action::OMNI_DECLARE_INTERFACE** - **omni::graph::action::unstable::OMNI_DECLARE_INTERFACE**
omni.graph.core.acquire_interface.md
# acquire_interface ## acquire_interface ```python omni.graph.core.acquire_interface(plugin_name: str = None, library_path: str = None) -> omni.graph.core._omni_graph_core.ComputeGraph ``` ```
omni.graph.core.attach.md
# attach ## attach ```python omni.graph.core.attach(stage_id: int, mps: float) -> None ``` Attach the graph to a particular stage. ### Parameters - **stage_id** (int) – The stage id of the stage to attach to - **mps** (float) – the meters per second setting for the stage
omni.graph.core.Attribute.md
# Attribute ## Class Definition ```python class omni.graph.core.Attribute(pybind11_object): ``` An attribute, defining a data type and value that belongs to a node ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | | | `connect(self, path, modify_usd)` | Connects this attribute with another attribute. | | `connectEx(self, info, modify_usd)` | Connects this attribute with another attribute. | | `connectPrim(self, path, modify_usd, write)` | Connects this attribute to a prim that can represent a bundle connection or just a plain prim relationship | | `deprecation_message(self)` | Gets the deprecation message on an attribute, if it is deprecated. | | `disconnect(self, attribute, modify_usd)` | Disconnects this attribute from another attribute. | | `disconnectPrim(self, attribute, modify_usd)` | | ``` - `disconnectPrim(self, path, modify_usd, write)` - Disconnects this attribute to a prim that can represent a bundle connection or just a plain prim relationship. - `ensure_port_type_in_name(name, port_type, ...)` - Return the attribute name with the port type namespace prepended if it isn't already present. - `get(self[, on_gpu, instance])` - Get the value of the attribute. - `get_all_metadata(self)` - Gets the attribute's metadata. - `get_array(self, on_gpu, get_for_write, ...)` - Gets the value of an array attribute. - `get_attribute_data(self, instance)` - Get the AttributeData object that can access the attribute's data. - `get_disable_dynamic_downstream_work(self)` - Where we have dynamic scheduling, downstream nodes can have their execution disabled by turning on the flag in the upstream attribute. - `get_downstream_connection_count(self)` - Gets the number of downstream connections to this attribute. - `get_downstream_connections(self)` - Gets the list of downstream connections to this attribute. - `get_downstream_connections_info(self)` - Returns the list of downstream connections for this attribute, with detailed connection information such as the connection type. - `get_extended_type(self)` - Get the extended type of the attribute. - `get_handle(self)` - Get a handle to the attribute. - `get_metadata(self, key)` - Returns the metadata value for the given key. - `get_metadata_count(self)` - Gets the number of metadata values on the attribute. - `get_name(self)` - Get the name of the attribute. | Method | Description | |--------|-------------| | `get_attribute_name(self)` | Get the attribute's name | | `get_node(self)` | Gets the node to which this attribute belongs | | `get_path(self)` | Get the path to the attribute | | `get_port_type(self)` | Gets the attribute's port type (input, output, or state) | | `get_port_type_from_name(name)` | Parse the port type from the given attribute name if present. | | `get_resolved_type(self)` | Get the resolved type of the attribute | | `get_type_name(self)` | Get the name of the attribute's type | | `get_union_types(self)` | Get the list of types accepted by a union attribute | | `get_upstream_connection_count(self)` | Gets the number of upstream connections to this attribute | | `get_upstream_connections(self)` | Gets the list of upstream connections to this attribute | | `get_upstream_connections_info(self)` | Returns the list of upstream connections for this attribute, with detailed connection information such as the connection type. | | `is_array(self)` | Checks if the attribute is an array type. | | `is_compatible(self, attribute)` | Checks to see if this attribute is compatible with another one, in particular the data types they use | | `is_connected(self, attribute)` | Checks to see if this attribute has a connection to another attribute | | `is_deprecated(self)` | Checks whether an attribute is deprecated. | | `is_dynamic(self)` | | | Method | Description | | --- | --- | | `is_dynamic(self)` | Checks to see if an attribute is dynamic | | `is_runtime_constant(self)` | Checks is this attribute is a runtime constant. | | `is_valid(self)` | Checks if the current attribute is valid. | | `map_to_target(self, target_attrib_name, ...)` | Maps the attribute to another one on the graph target. | | `register_value_changed_callback(self, func)` | Registers a function that will be invoked when the value of the given attribute changes. | | `remove_port_type_from_name(name, is_bundle)` | Find the attribute name with the port type removed if it is present. | | `set(self, value[, on_gpu, instance])` | Sets the value of the attribute's data | | `set_default(self, value[, on_gpu])` | Sets the default value of the attribute's data (value when not connected) | | `set_disable_dynamic_downstream_work(self, ...)` | Where we have dynamic scheduling, downstream nodes can have their execution disabled by turning on the flag in the upstream attribute. | | `set_metadata(self, key, value)` | Sets the metadata value for the given key | | `set_resolved_type(self, resolved_type)` | Sets the resolved type for the extended attribute. | | `update_attribute_value(self, update_immediately)` | Requests the value of an attribute. | | `write_complete(attributes)` | Warn the framework that writing to the provided attributes is done, so it can trigger callbacks attached to them | ### Attributes | Attribute | Description | | --- | --- | | `gpu_ptr_kind` | Defines the memory space that GPU array data pointers live in. | | `is_optional_for_compute` | | | Attribute Name | Description | |----------------|-------------| | is_optional_for_compute | Flag that is set when an attribute need not be valid for compute() to happen. | | resolved_prefix | | | target_mapping | Returns the attribute name on the graph target the attribute is mapped to | ### __init__(*args, **kwargs) ### connect(self: omni.graph.core._omni_graph_core.Attribute, path: omni.graph.core._omni_graph_core.Attribute, modify_usd: bool) -> bool Connects this attribute with another attribute. Assumes regular connection type. **Parameters:** - **path** (omni.graph.core.Attribute) – The destination attr - **modify_usd** (bool) – Whether to create USD. **Returns:** - True for success, False for fail **Return type:** - bool ### connectEx(self: omni.graph.core._omni_graph_core.Attribute, info: omni::graph::core::Py_ConnectionInfo, modify_usd: bool) -> bool Connects this attribute with another attribute. Allows for different connection types. **Parameters:** - **info** (omni.graph.core.ConnectionInfo) – The ConnectionInfo object that contains both the attribute and the connection type - **modify_usd** (bool) – Whether to create USD. **Returns:** - True for success, False for fail **Return type:** - bool ### connectPrim ```python connectPrim(self: omni.graph.core._omni_graph_core.Attribute, path: str, modify_usd: bool, write: bool) -> bool ``` Connects this attribute to a prim that can represent a bundle connection or just a plain prim relationship. **Parameters:** - **path** (str) – The path to the prim. - **modify_usd** (bool) – Whether to modify USD. - **write** (bool) – Whether this connection represents a bundle. **Returns:** - True for success, False for fail. **Return type:** - bool ### deprecation_message ```python deprecation_message(self: omni.graph.core._omni_graph_core.Attribute) -> str ``` Gets the deprecation message on an attribute, if it is deprecated. Typically this message gives guidance as to what the user should do instead of using the deprecated attribute. **Returns:** - The message associated with a deprecated attribute. **Return type:** - str ### disconnect ```python disconnect(self: omni.graph.core._omni_graph_core.Attribute, attribute: omni.graph.core._omni_graph_core.Attribute, modify_usd: bool) -> None ``` Disconnects an attribute. **Parameters:** - **attribute** (omni.graph.core._omni_graph_core.Attribute) – The attribute to disconnect. - **modify_usd** (bool) – Whether to modify USD. **Returns:** - None **Return type:** - None ### disconnect Disconnects this attribute from another attribute. #### Parameters - **attribute** (omni.graph.core.Attribute) – The destination attribute of the connection to remove - **modify_usd** (bool) – Whether to modify USD #### Returns - True for success, False for fail #### Return type - bool ### disconnectPrim Disconnects this attribute to a prim that can represent a bundle connection or just a plain prim relationship #### Parameters - **path** (str) – The path to the prim - **modify_usd** (bool) – Whether to modify USD. - **write** (bool) – Whether this connection represents a bundle #### Returns - True for success, False for fail #### Return type - bool ### ensure_port_type_in_name static ensure_port_type_in_name(name: str, port_type: omni.graph.core._omni_graph_core.AttributePortType, is_bundle: bool) ### ensure_port_type_in_name Return the attribute name with the port type namespace prepended if it isn’t already present. #### Parameters - **name** (`str`) – The attribute name, with or without the port prefix - **port_type** (`omni.graph.core.AttributePortType`) – The port type of the attribute - **is_bundle** (`bool`) – true if the attribute name is to be used in a bundle. Note that colon is an illegal character - **instead** (`in bundled attributes so an underscore is used`) – #### Returns The name with the proper prefix for the given port type #### Return type `str` ### get Get the value of the attribute #### Parameters - **on_gpu** (`bool`) – Is the data to be retrieved from the GPU? - **instance** (`int`) – an instance index when getting value on an instantiated graph #### Returns Value of the attribute’s data #### Return type `Any` ### get_all_metadata Gets the attribute’s metadata #### Returns A dictionary of name:value metadata on the attribute #### Return type `dict[str,str]` ## get_array **Definition:** ```python get_array(self: omni.graph.core._omni_graph_core.Attribute, on_gpu: bool = False, get_for_write: bool, reserved_element_count: int, instance: int = 18446744073709551614) -> object ``` **Description:** Gets the value of an array attribute **Parameters:** - **on_gpu** (bool) – Is the data to be retrieved from the GPU? - **get_for_write** (bool) – Should the data be retrieved for writing? - **reserved_element_count** (int) – If the data is to be retrieved for writing, preallocate this many elements - **instance** (int) – an instance index when getting value on an instantiated graph **Returns:** - Value of the array attribute’s data **Return type:** - list[Any] --- ## get_attribute_data **Definition:** ```python get_attribute_data(self: omni.graph.core._omni_graph_core.Attribute, instance: int = 18446744073709551614) -> omni::graph::core::Py_AttributeData ``` **Description:** Get the AttributeData object that can access the attribute’s data **Parameters:** - **instance** (int) – an instance index when getting value on an instantiated graph **Returns:** - The underlying attribute data accessor object for this attribute **Return type:** - omni.graph.core.AttributeData --- ## get_disable_dynamic_downstream_work **Definition:** ```python get_disable_dynamic_downstream_work(self: omni.graph.core._omni_graph_core.Attribute) -> bool ``` **Description:** (Description not provided in the HTML snippet) **Returns:** - bool ## Dynamic Scheduling Where we have dynamic scheduling, downstream nodes can have their execution disabled by turning on the flag in the upstream attribute. Note you also have to call `setDynamicDownstreamControl` on the node to enable this feature. See `setDynamicDownstreamControl` on `INode` for further information. ### Returns - **True** if downstream nodes are disabled in dynamic scheduling, **False** otherwise - **Return type**: bool ## get_downstream_connection_count Gets the number of downstream connections to this attribute ### Returns - The number of downstream connections on this attribute. - **Return type**: int ## get_downstream_connections Gets the list of downstream connections to this attribute ### Returns - The list of downstream connections for this attribute. - **Return type**: list[omni.graph.core.Attribute] ## get_downstream_connections_info Returns the list of downstream connections for this attribute, with detailed connection information such as the connection type. ### Returns - A list of the downstream ConnectionInfo objects - **Return type**: list[omni.graph.core.ConnectionInfo] ## get_extended_type (Method description not provided in the HTML snippet) ) → omni.graph.core._omni_graph_core.ExtendedAttributeType Get the extended type of the attribute Returns : Extended type of the attribute data object Return type : omni.graph.core.ExtendedAttributeType get_handle ( self : omni.graph.core._omni_graph_core.Attribute ) → int Get a handle to the attribute Returns : An opaque handle to the attribute Return type : int get_metadata ( self : omni.graph.core._omni_graph_core.Attribute, key : str ) → str Returns the metadata value for the given key. Parameters : key – (str) The metadata keyword Returns : Metadata value for the given keyword, or None if it is not defined Return type : str get_metadata_count ( self : omni.graph.core._omni_graph_core.Attribute ) → int Gets the number of metadata values on the attribute Returns : the number of metadata values currently defined on the attribute. Return type : int get_name ( self : omni.graph.core._omni_graph_core.Attribute ) → str ### omni.graph.core.Attribute.get_name - **Description**: Get the attribute’s name - **Returns**: - **Description**: The name of the current attribute. - **Type**: str ### omni.graph.core.Attribute.get_node - **Description**: Gets the node to which this attribute belongs - **Returns**: - **Description**: The node associated with the attribute - **Type**: omni.graph.core.Node ### omni.graph.core.Attribute.get_path - **Description**: Get the path to the attribute - **Returns**: - **Description**: The full path to the attribute, including the node path. - **Type**: str ### omni.graph.core.Attribute.get_port_type - **Description**: Gets the attribute’s port type (input, output, or state) - **Returns**: - **Description**: The port type of the attribute. - **Type**: omni.graph.core.AttributePortType ### omni.graph.core.Attribute.get_port_type_from_name - **Description**: static method to get port type from name - **Parameters**: - **name**: str - **Returns**: - **Type**: omni.graph.core.AttributePortType ```python omni.graph.core._omni_graph_core.AttributePortType ``` Parse the port type from the given attribute name if present. The port type is indicated by a prefix separated by a colon or underscore in the case of bundled attributes. #### Parameters - **name** (`name The attribute`) – #### Returns - The port type indicated by the attribute prefix if present. - `AttributePortType.UNKNOWN` if there is no recognized prefix. #### Return type - `omni.graph.core.AttributePortType` ```python get_resolved_type(self: omni.graph.core._omni_graph_core.Attribute) -> omni::graph::core::Py_Type ``` Get the resolved type of the attribute #### Returns - Resolved type of the attribute data object, or the hardcoded type for regular attributes #### Return type - `omni.graph.core.Type` ```python get_type_name(self: omni.graph.core._omni_graph_core.Attribute) -> str ``` Get the name of the attribute’s type #### Returns - The type name of the current attribute. #### Return type - `str` ```python get_union_types(self: omni.graph.core._omni_graph_core.Attribute) -> object ``` Get the list of types accepted by a union attribute #### Returns - The list of accepted types for the attribute if it is an extended union type, else None #### Return type - `list[str]` ```python get_upstream_connection_count(self: omni.graph.core._omni_graph_core.Attribute) -> int ``` Get the number of upstream connections to this attribute #### Returns - The number of upstream connections to this attribute #### Return type - `int` <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Attribute.get_upstream_connection_count"> <span class="sig-name descname"> <span class="pre"> get_upstream_connection_count </span> </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.Attribute </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> int </span> </span> </span> </dt> <dd> <p> Gets the number of upstream connections to this attribute </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> the number of upstream connections on this attribute. </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.Attribute.get_upstream_connections"> <span class="sig-name descname"> <span class="pre"> get_upstream_connections </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.Attribute </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[omni.graph.core._omni_graph_core.Attribute] </span> </span> </span> </dt> <dd> <p> Gets the list of upstream connections to this attribute </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The list of upstream connections for this attribute. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> list[omni.graph.core._omni_graph_core.Attribute] </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Attribute.get_upstream_connections_info"> <span class="sig-name descname"> <span class="pre"> get_upstream_connections_info </span> </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.Attribute </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[omni::graph::core::Py_ConnectionInfo] </span> </span> </span> </dt> <dd> <p> Returns the list of upstream connections for this attribute, with detailed connection information such as the connection type. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> A list of the upstream ConnectionInfo objects </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> list[omni.graph.core.ConnectionInfo] </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Attribute.is_array"> <span class="sig-name descname"> <span class="pre"> is_array </span> </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.Attribute </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> Checks if the attribute is an array type. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> True if the attribute data type is an array </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> bool </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Attribute.is_compatible"> <span class="sig-name descname"> <span class="pre"> is_compatible </span> </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.Attribute </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> Checks if the attribute is compatible with another type. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> True if the attribute is compatible </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> bool </p> </dd> </dl> </dd> </dl> ### is_compatible Checks to see if this attribute is compatible with another one, in particular the data types they use **Parameters** - **attribute** (omni.graph.core.Attribute) – Attribute for which compatibility is to be checked **Returns** - True if this attribute is compatible with “attribute” **Return type** - bool ### is_connected Checks to see if this attribute has a connection to another attribute **Parameters** - **attribute** (Attribute) – Attribute for which the connection is to be checked **Returns** - True if this attribute is connected to another, either as source or destination **Return type** - bool ### is_deprecated Checks whether an attribute is deprecated. Deprecated attributes should not be used as they will be removed in a future version. **Returns** - True if the attribute is deprecated **Return type** - bool ### is_dynamic Checks if an attribute is dynamic. **Returns** - True if the attribute is dynamic **Return type** - bool <dl> <dt> <p> Checks to see if an attribute is dynamic </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> True if the current attribute is a dynamic attribute (not in the node type definition). </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> bool </p> </dd> </dl> </dt> <dd> <p> Checks is this attribute is a runtime constant. </p> <p> Runtime constants will keep the same value every frame, for every instance. This property can be taken advantage of in vectorized compute. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> True if the attribute is a runtime constant </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> bool </p> </dd> </dl> </dd> <dt> <p> Checks if the current attribute is valid. </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> True if the attribute reference points to a valid attribute object </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> bool </p> </dd> </dl> </dd> <dt> <p> Maps the attribute to another one on the graph target. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul> <li> <p> <strong> target_attrib_name </strong> ( <em> str </em> ) – the attribute name on the graph target prim to map this attribute to </p> </li> <li> <p> <strong> fabric_id </strong> ( <em> integer </em> ) – (optional) The fabric id cache in which the attribute lives. Uses the default fabric cache associated to the graph if not specified </p> </li> </ul> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> <dl> <dt> Whether the call was immediately applied, failed or deferred. Deferral can </dt> <dd> <p> happen when the graph does not yet have any explicit instances or a prim view applied </p> </dd> </dl> </p> </dd> </dl> </dd> </dl> ## Return type FunctionResult ## register_value_changed_callback ```python register_value_changed_callback(self: omni.graph.core._omni_graph_core.Attribute, func: object) -> None ``` Registers a function that will be invoked when the value of the given attribute changes. Note that an attribute can have one and only one callback. Subsequent calls will replace previously set callbacks. Passing None for the function argument will clear the existing callback. ### Parameters **func** (callable) – A function with one argument representing the attribute that changed. ## remove_port_type_from_name ```python remove_port_type_from_name(name: str, is_bundle: bool) -> str ``` Find the attribute name with the port type removed if it is present. For example “inputs:attr” becomes “attr” ### Parameters - **name** (str) – The attribute name, with or without the port prefix - **is_bundle** (bool) – True if the attribute name is to be used in a bundle. Note that colon is an illegal character in bundled attributes so an underscore is used instead. ### Returns The name with the port type prefix removed ### Return type str ## set ```python set(self: omni.graph.core._omni_graph_core.Attribute, value: object, on_gpu: bool = False) ``` ### omni.graph.core.Attribute.set Sets the value of the attribute’s data **Parameters:** - **value** (Any) – New value of the attribute’s data - **on_gpu** (bool) – Is the data to be set on the GPU? - **instance** (int) – an instance index when setting value on an instantiated graph **Returns:** - True if the value was successfully set **Return type:** - bool ### omni.graph.core.Attribute.set_default Sets the default value of the attribute’s data (value when not connected) **Parameters:** - **value** (Any) – New value of the default attribute’s data - **on_gpu** (bool) – Is the data to be set on the GPU? **Returns:** - True if the value was successfully set **Return type:** - bool ### omni.graph.core.Attribute.set_disable_dynamic_downstream_work Where we have dynamic scheduling, downstream nodes can have their execution disabled by turning on the flag in the upstream attribute. Note you also have to call setDynamicDownstreamControl on the node to enable this feature. This function allows you to set the flag on the attribute that will disable the downstream **Parameters:** - **disable** (bool) – Flag to disable downstream execution **Returns:** - None node. See setDynamicDownstreamControl on INode for further information. ### Parameters - **disable** (bool) – Whether to disable downstream connected nodes in dynamic scheduling. ### set_metadata ```python set_metadata(self: omni.graph.core._omni_graph_core.Attribute, key: str, value: str) -> bool ``` Sets the metadata value for the given key #### Parameters - **key** (str) – The metadata keyword - **value** (str) – The value of the metadata ### set_resolved_type ```python set_resolved_type(self: omni.graph.core._omni_graph_core.Attribute, resolved_type: omni::graph::core::Py_Type) -> None ``` Sets the resolved type for the extended attribute. Only valid for attributes with union/any extended types, who’s type has not yet been resolved. Should only be called from on_connection_type_resolve() callback. This operation is async and may fail if the type cannot be resolved as requested. #### Parameters - **resolved_type** (omni.graph.core.Type) – The type to resolve the attribute to ### update_attribute_value ```python update_attribute_value(self: omni.graph.core._omni_graph_core.Attribute, update_immediately: bool) -> bool ``` Requests the value of an attribute. In the cases of lazy evaluation systems, this generates the “pull” that causes the attribute to update its value. #### Parameters - **update_immediately** (bool) – Whether to update the attribute value immediately. If True, the function will block until the attribute is update and then return. If False, the attribute will be updated in the next update loop. #### Returns - The value of the attribute ### write_complete **Static** ```python write_complete(attributes: sequence) -> None ``` Warn the framework that writing to the provided attributes is done, so it can trigger callbacks attached to them **Parameters** - **attributes** (list[omni.graph.core.Attribute]) – List of attributes that are done writing ### gpu_ptr_kind **Property** Defines the memory space that GPU array data pointers live in. ### is_optional_for_compute **Property** Flag that is set when an attribute need not be valid for compute() to happen. bool: ### target_mapping **Property** Returns the attribute name on the graph target the attribute is mapped to **Returns** - The name of the target, or None if there isn’t one mapped - **Return type**: string
omni.graph.core.AttributeData.md
# AttributeData ## Methods - `__init__(*args, **kwargs)` - `as_read_only(self)` - Returns read-only variant of the attribute data. - `copy_data(self, rhs)` - Copies the AttributeData data into this object's data. - `cpu_valid(self)` - Returns whether this attribute data object is currently valid on the cpu. - `get(self[, on_gpu])` - Gets the current value of the attribute data - `get_array(self, on_gpu, get_for_write, ...)` - Gets the current value of the attribute data. ### Methods - `get_extended_type(self)` - Returns the extended type of the current attribute data. - `get_name(self)` - Returns the name of the current attribute data. - `get_resolved_type(self)` - Returns the resolved type of the extended attribute data. - `get_type(self)` - Returns the type of the current attribute data. - `gpu_valid(self)` - Returns whether this attribute data object is currently valid on the gpu. - `is_read_only(self)` - Returns whether this attribute data object is read-only or not. - `is_valid(self)` - Returns whether this attribute data object is valid or not. - `resize(self, element_count)` - Sets the number of elements in the array represented by this object. - `set(self, value[, on_gpu])` - Sets the value of the attribute data. - `size(self)` - Returns the size of the data represented by this object (1 if it's not an array). ### Attributes - `gpu_ptr_kind` - Defines the memory space that GPU array data pointers live in. ### Initialization - `__init__(self, *args, **kwargs)` - Initialize the object with arguments. ### Methods - `as_read_only(self: omni.graph.core._omni_graph_core.AttributeData)` - Converts the object to read-only. omni.graph.core._omni_graph_core.AttributeData Returns read-only variant of the attribute data. Returns: - Read-only variant of the attribute data. Return type: - AttributeData copy_data(self: omni.graph.core._omni_graph_core.AttributeData, rhs: omni.graph.core._omni_graph_core.AttributeData) -> bool Copies the AttributeData data into this object’s data. Parameters: - rhs (omni.graph.core.AttributeData) – Attribute data to be copied - must be the same type as the current object to work Returns: - True if the data was successfully copied, else False. Return type: - bool cpu_valid(self: omni.graph.core._omni_graph_core.AttributeData) -> bool Returns whether this attribute data object is currently valid on the cpu. Returns: - True if the data represented by this object currently has a valid value in CPU memory Return type: - bool get(self: omni.graph.core._omni_graph_core.AttributeData, on_gpu: bool = False) -> object Gets the current value of the attribute data Parameters: - on_gpu (bool) – If True, the data is fetched from GPU, otherwise from CPU. Default is False. Returns: - The current value of the attribute data Return type: - object ### omni.graph.core.AttributeData.get_data - **Parameters** - **on_gpu** (bool) – Is the data to be retrieved from the GPU? - **Returns** - Value of the attribute data - **Return type** - Any ### omni.graph.core.AttributeData.get_array - **Parameters** - **on_gpu** (bool) – Is the data to be retrieved from the GPU? - **get_for_write** (bool) – Should the data be retrieved for writing? - **reserved_element_count** (int) – If the data is to be retrieved for writing, preallocate this many elements - **Returns** - Value of the array attribute data - **Return type** - Any ### omni.graph.core.AttributeData.get_extended_type - **Returns** - Extended type of the attribute data object - **Return type** - omni.graph.core.ExtendedAttributeType ### omni.graph.core.AttributeData.get_name - **Returns** - Name of the attribute data object - **Return type** - str ### omni.graph.core.AttributeData.get_resolved_type ### get_resolved_type ```python get_resolved_type(self: omni.graph.core._omni_graph_core.AttributeData) → omni.graph.core._omni_graph_core.Type ``` Returns the resolved type of the extended attribute data. Only valid for attributes with union/any extended types. **Returns:** - Resolved type of the attribute data object **Return type:** - omni.graph.core.Type ### get_type ```python get_type(self: omni.graph.core._omni_graph_core.AttributeData) → omni.graph.core._omni_graph_core.Type ``` Returns the type of the current attribute data. **Returns:** - Type of the attribute data object **Return type:** - omni.graph.core.Type ### gpu_valid ```python gpu_valid(self: omni.graph.core._omni_graph_core.AttributeData) → bool ``` Returns whether this attribute data object is currently valid on the gpu. **Returns:** - True if the data represented by this object currently has a valid value in GPU memory **Return type:** - bool ### is_read_only ```python is_read_only(self: omni.graph.core._omni_graph_core.AttributeData) → bool ``` Returns whether this attribute data object is read-only or not. **Returns:** - True if the data represented by this object is read-only **Return type:** - bool ### is_valid ```python is_valid(self: omni.graph.core._omni_graph_core.AttributeData) → bool ``` Returns whether this attribute data object is valid. **Returns:** - True if the data represented by this object is valid **Return type:** - bool ### omni.graph.core.AttributeData.is_valid ```python def is_valid(self: omni.graph.core._omni_graph_core.AttributeData) -> bool: ``` Returns whether this attribute data object is valid or not. **Returns:** - True if the data represented by this object is valid - Return type: bool ### omni.graph.core.AttributeData.resize ```python def resize(self: omni.graph.core._omni_graph_core.AttributeData, element_count: int) -> bool: ``` Sets the number of elements in the array represented by this object. **Parameters:** - **element_count** (int) – Number of elements to reserve in the array **Returns:** - True if the array was resized, False if not (e.g. if the attribute data was not an array type) - Return type: bool ### omni.graph.core.AttributeData.set ```python def set(self: omni.graph.core._omni_graph_core.AttributeData, value: object, on_gpu: bool = False) -> bool: ``` Sets the value of the attribute data **Parameters:** - **value** (Any) – New value of the attribute data - **on_gpu** (bool) – Is the data to be set on the GPU? **Returns:** - True if the value was successfully set - Return type: bool ### omni.graph.core.AttributeData.size ```python def size(self: omni.graph.core._omni_graph_core.AttributeData) -> int: ``` Returns the size of the attribute data. **Returns:** - The size of the attribute data - Return type: int ### omni.graph.core._omni_graph_core.AttributeData.size **Returns the size of the data represented by this object (1 if it’s not an array).** - **Returns:** Number of elements in the data - **Return type:** int ### omni.graph.core._omni_graph_core.AttributeData.gpu_ptr_kind **Defines the memory space that GPU array data pointers live in**
omni.graph.core.AttributeDataValueHelper.md
# AttributeDataValueHelper ## AttributeDataValueHelper ``` class omni.graph.core.AttributeDataValueHelper(data: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Attribute | pxr.Usd.Property | omni.graph.core._omni_graph_core.AttributeData, instance = 18446744073709551614) ``` Bases: `object` Class to manage getting and setting of omni.graph.core.AttributeData values. Note that this helper sets values directly and is not generally advised for use as it has no undo support. Instead you probably want to use Controller or DataView ### _data The interface to the attribute data ### _type The attribute type of the data (delay loaded to allow for extended types needing resolution) ### Methods ``` | Method | Description | | --- | --- | | `__init__ (data[, instance])` | Create an accessor to get at AttributeData values | | `check_validity ()` | Check the validity of the data accessor | | `get ([on_gpu, reserved_element_count, ...])` | Get the value of this attribute data. | | `get_array (get_for_write[, ...])` | Deprecated - use get() | | `get_array_size ()` | Get the length of this attribute data's array. | | `reserve_element_count (new_element_count)` | Set the length of this attribute data's array. | | `set (new_value[, on_gpu])` | Set the value of AttributeData | ### Attributes | Attribute | Description | | --- | --- | | `attribute_data` | the attribute data this accessor is wrapping | | `gpu_ptr_kind` | The location of pointers to GPU arrays | | `is_resolved` | Does the underlying attribute have a definite resolved type? | | `is_valid` | Validity of the underlying API object | | `type` | the attribute type, extracting it from the data if it hasn't already been done | ### __init__ Method Details ```python __init__( data: str | pxr.Sdf.Path | omni.graph.core.Attribute ) ``` ``` Create an accessor to get at AttributeData values ### Parameters - **data** – Object type whose data is to be accessed - **instance** – Index of the graph from which the attribute’s value is to be accessed ### Raises - **og.OmniGraphTypeError** – if ‘data’ did not reference a correct attribute type ### check_validity() Check the validity of the data accessor ### Raises - **og.OmniGraphError** – if the data about to be accessed is invalid ### get(on_gpu: bool = False, reserved_element_count: Optional[int] = None, return_type: Optional[WrappedArrayType] = None) -> Any Get the value of this attribute data. #### Parameters - **on_gpu** – Is the value stored on the GPU? - **reserved_element_count** – For array attributes, if not None then the array will pre-reserve this many elements - **return_type** – For array attributes this specifies how the return data is to be wrapped #### Returns Value of the attribute data ### Return type Any ### Raises - **og.OmniGraphAttributeError** – If reserved_element_count or return_type are defined but the attribute is not - **an array type** – - **og.OmniGraphTypeError** – Raised if the data type is not yet supported or the attribute type is not resolved ### get_array ```python get_array(get_for_write: bool, reserved_element_count: int = 0, on_gpu: bool = False, return_type: Optional[WrappedArrayType] = None) -> Any ``` Deprecated - use get() ### get_array_size ```python get_array_size() -> int ``` Get the length of this attribute data’s array. #### Returns Length of the data array in Fabric #### Return type int #### Raises **og.OmniGraphAttributeError** – If the array is not an array type ### reserve_element_count ```python reserve_element_count(new_element_count: int) ``` Set the length of this attribute data’s array. It doesn’t matter whether the data will be on the GPU or CPU, all this does is reserve the size number. When retrieving the data you will specify where it lives. #### Parameters **new_element_count** – Number of array elements to reserve for the array #### Raises **og.OmniGraphAttributeError** – If the array is not an array type ### set ```python set(new_value: Union[Any, TypedValue], on_gpu: bool = False) ``` - **Parameters** - **new_value** – New value to be set on the attribute - **on_gpu** – Should the value be stored on the GPU? - **Raises** - **og.OmniGraphTypeError** – Raised if the data type of the attribute is not yet supported ### attribute_data ```python property attribute_data: AttributeData ``` - **Type** - **AttributeData** ### gpu_ptr_kind ```python property gpu_ptr_kind: PtrToPtrKind ``` - **Type** - **PtrToPtrKind** ### is_resolved ```python property is_resolved: bool ``` - **Type** - **bool** ### is_valid ```python property is_valid: bool ``` - **Type** - **bool** </p> <dl class="field-list simple"> <dt class="field-odd"> Type </dt> <dd class="field-odd"> <p> bool </p> </dd> </dl> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.graph.core.AttributeDataValueHelper.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> <em class="property"> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="pre"> Type </span> </em> <span class="headerlink">  </span> </dt> <dd> <p> the attribute type, extracting it from the data if it hasn’t already been done </p> <dl class="field-list simple"> <dt class="field-odd"> Type </dt> <dd class="field-odd"> <p> Type </p> </dd> </dl> </dd> </dl> </dd> </dl> </section> </div> </div> <footer> <hr/> </footer> </div> </div> </section> </div>
omni.graph.core.AttributePortType.md
# AttributePortType ## 概述 AttributePortType 是 omni.graph.core 模块中的一个类,用于表示节点上属性的端口类型。 ### 基础信息 - **基类**: pybind11_object - **描述**: 属性的端口侧,用于其节点上。 ### 成员 - ATTRIBUTE_PORT_TYPE_INPUT : 已弃用,请使用 og.AttributePortType.INPUT - ATTRIBUTE_PORT_TYPE_OUTPUT : 已弃用,请使用 og.AttributePortType.OUTPUT - ATTRIBUTE_PORT_TYPE_STATE : 已弃用,请使用 og.AttributePortType.STATE - ATTRIBUTE_PORT_TYPE_UNKNOWN : 已弃用,请使用 og.AttributePortType.UNKNOWN - INPUT : 属性为输入 - OUTPUT : 属性为输出 - STATE : 属性为状态 - UNKNOWN : 属性端口类型未知 ### 方法 - `__init__(self, value)` ### 属性 - ATTRIBUTE_PORT_TYPE_INPUT - ATTRIBUTE_PORT_TYPE_OUTPUT - ATTRIBUTE_PORT_TYPE_STATE - ATTRIBUTE_PORT_TYPE_UNKNOWN - INPUT - OUTPUT - STATE - UNKNOWN | OUTPUT | | --- | | STATE | | UNKNOWN | | name | | value | __init__(self: omni.graph.core._omni_graph_core.AttributePortType, value: int) → None property name
omni.graph.core.AttributePortType_omni.graph.core.AttributePortType.md
# AttributePortType ## Overview AttributePortType is a class that represents the port side of an attribute on its node. It is based on `pybind11_object`. ### Members - `ATTRIBUTE_PORT_TYPE_INPUT`: Deprecated: use `og.AttributePortType.INPUT` - `ATTRIBUTE_PORT_TYPE_OUTPUT`: Deprecated: use `og.AttributePortType.OUTPUT` - `ATTRIBUTE_PORT_TYPE_STATE`: Deprecated: use `og.AttributePortType.STATE` - `ATTRIBUTE_PORT_TYPE_UNKNOWN`: Deprecated: use `og.AttributePortType.UNKNOWN` - `INPUT`: Attribute is an input - `OUTPUT`: Attribute is an output - `STATE`: Attribute is state - `UNKNOWN`: Attribute port type is unknown ### Methods - `__init__(self, value)` ### Attributes - `ATTRIBUTE_PORT_TYPE_INPUT` - `ATTRIBUTE_PORT_TYPE_OUTPUT` - `ATTRIBUTE_PORT_TYPE_STATE` - `ATTRIBUTE_PORT_TYPE_UNKNOWN` - `INPUT` - `OUTPUT` - `STATE` - `UNKNOWN` | OUTPUT | | --- | | STATE | | UNKNOWN | | name | | value | __init__(self: omni.graph.core._omni_graph_core.AttributePortType, value: int) -> None property name
omni.graph.core.AttributeRole.md
# AttributeRole ## Overview AttributeRole is a class that defines the interpretation applied to attribute data. It is based on `pybind11_object`. ### Members - **APPLIED_SCHEMA**: Data is to be interpreted as an applied schema. - **BUNDLE**: Data is to be interpreted as an OmniGraph Bundle. - **COLOR**: Data is to be interpreted as RGB or RGBA color. - **EXECUTION**: Data is to be interpreted as an Action Graph execution pin. - **FRAME**: Data is to be interpreted as a 4x4 matrix representing a reference frame. - **MATRIX**: Data is to be interpreted as a square matrix of values. - **NONE**: Data has no special role. - **NORMAL**: Data is to be interpreted as a normal vector. - **OBJECT_ID**: Data is to be interpreted as a unique object identifier. - **PATH**: Data is to be interpreted as a path to a USD element. - **POSITION**: Data is to be interpreted as a position or point vector. - **PRIM_TYPE_NAME**: Data is to be interpreted as the name of a prim type. - **QUATERNION**: Data is to be interpreted as a rotational quaternion. - **TARGET**: Data is to be interpreted as a relationship target path. - **TEXCOORD**: Data is to be interpreted as texture coordinates. - **TEXT**: Data is to be interpreted as a text string. - **TIMECODE**: Data is to be interpreted as a time code. - **TRANSFORM**: Deprecated. - **VECTOR**: Data is to be interpreted as a simple vector. - **UNKNOWN**: Data role is currently unknown. ### Methods - **__init__(self, value)** ### Attributes - **APPLIED_SCHEMA** - **BUNDLE** - **COLOR** - **EXECUTION** - **FRAME** - **MATRIX** - **NONE** - **NORMAL** - **OBJECT_ID** - **PATH** - **POSITION** - **PRIM_TYPE_NAME** - **QUATERNION** - **TARGET** - **TEXCOORD** - **TEXT** - **TIMECODE** - **TRANSFORM** - **VECTOR** - **UNKNOWN** | | | |----|----| | COLOR | | | EXECUTION | | | FRAME | | | MATRIX | | | NONE | | | NORMAL | | | OBJECT_ID | | | PATH | | | POSITION | | | PRIM_TYPE_NAME | | | QUATERNION | | | TARGET | | | TEXCOORD | | | TEXT | | | TIMECODE | | | TRANSFORM | | | UNKNOWN | | | VECTOR | | | name | | | value | | ### omni.graph.core.AttributeRole.__init__ ```python __init__(self: omni.graph.core._omni_graph_core.AttributeRole, value: int) -> None ``` ``` <dl class="py property"> <dt class="sig sig-object py" id="omni.graph.core.AttributeRole.name"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> name </span> </span> <a class="headerlink" href="#omni.graph.core.AttributeRole.name" title="Permalink to this definition">  </a> </dt> <dd> </dd> </dl>
omni.graph.core.AttributeRole_omni.graph.core.AttributeRole.md
# AttributeRole ## Overview The `AttributeRole` class in `omni.graph.core` provides various interpretations for attribute data. It is based on `pybind11_object`. ### Members - **APPLIED_SCHEMA**: Data is to be interpreted as an applied schema. - **BUNDLE**: Data is to be interpreted as an OmniGraph Bundle. - **COLOR**: Data is to be interpreted as RGB or RGBA color. - **EXECUTION**: Data is to be interpreted as an Action Graph execution pin. - **FRAME**: Data is to be interpreted as a 4x4 matrix representing a reference frame. - **MATRIX**: Data is to be interpreted as a square matrix of values. - **NONE**: Data has no special role. - **NORMAL**: Data is to be interpreted as a normal vector. - **OBJECT_ID**: Data is to be interpreted as a unique object identifier. - **PATH**: Data is to be interpreted as a path to a USD element. - **POSITION**: Data is to be interpreted as a position or point vector. - **PRIM_TYPE_NAME**: Data is to be interpreted as the name of a prim type. - **QUATERNION**: Data is to be interpreted as a rotational quaternion. - **TARGET**: Data is to be interpreted as a relationship target path. - **TEXCOORD**: Data is to be interpreted as texture coordinates. - **TEXT**: Data is to be interpreted as a text string. - **TIMECODE**: Data is to be interpreted as a time code. - **TRANSFORM**: Deprecated. - **VECTOR**: Data is to be interpreted as a simple vector. - **UNKNOWN**: Data role is currently unknown. ### Methods - **__init__(self, value)** ### Attributes - **APPLIED_SCHEMA** - **BUNDLE** - **COLOR** - **EXECUTION** - **FRAME** - **MATRIX** - **NONE** - **NORMAL** - **OBJECT_ID** - **PATH** - **POSITION** - **PRIM_TYPE_NAME** - **QUATERNION** - **TARGET** - **TEXCOORD** - **TEXT** - **TIMECODE** - **TRANSFORM** - **VECTOR** - **UNKNOWN** - **COLOR** - **EXECUTION** - **FRAME** - **MATRIX** - **NONE** - **NORMAL** - **OBJECT_ID** - **PATH** - **POSITION** - **PRIM_TYPE_NAME** - **QUATERNION** - **TARGET** - **TEXCOORD** - **TEXT** - **TIMECODE** - **TRANSFORM** - **UNKNOWN** - **VECTOR** - **name** - **value** ### omni.graph.core.AttributeRole.__init__ __init__(self: omni.graph.core._omni_graph_core.AttributeRole, value: int) → None ```
omni.graph.core.AttributeType.md
# AttributeType ## Methods - `__init__(*args, **kwargs)` - `base_data_size(type)` - Figure out how much space a base data type occupies in memory inside Fabric. - `get_unions()` - Returns a dictionary containing the names and contents of the ogn attribute union types. - `is_legal_ogn_type(type)` - Check to see if the type combination has a legal representation in OGN. - `sdf_type_name_from_type(type)` - Given an attribute type find the corresponding SDF type name for it, None if there is none, e.g. - `type_from_ogn_type_name(ogn_type_name)` - Parse an OGN attribute type name into the corresponding omni.graph.core.Type description. <table> <tbody> <tr class="row-odd"> <td> <p> <code>type_from_sdf_type_name</code> (sdf_type_name) </p> </td> <td> <p> Parse an SDF attribute type name into the corresponding omni.graph.core.Type description. </p> </td> </tr> </tbody> </table> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.AttributeType.__init__"> <code>__init__</code> (<code>*args</code>, <code>**kwargs</code>) </dt> <dd> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.AttributeType.base_data_size"> <code>static base_data_size</code> (<code>type: omni.graph.core._omni_graph_core.Type</code>) <span class="sig-return">→ int</span> </dt> <dd> <p> Figure out how much space a base data type occupies in memory inside Fabric. This will not necessarily be the same as the space occupied by the Python data, which is only transient. Multiply by the tuple count and the array element count to get the full size of any given piece of data. </p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"> <p> <strong>type</strong> (omni.graph.core.Type) – The type object whose base data type size is to be found </p> </dd> <dt class="field-even">Returns</dt> <dd class="field-even"> <p> Number of bytes one instance of the base data type occupies in Fabric </p> </dd> <dt class="field-odd">Return type</dt> <dd class="field-odd"> <p> int </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.AttributeType.get_unions"> <code>static get_unions</code> () <span class="sig-return">→ dict</span> </dt> <dd> <p> Returns a dictionary containing the names and contents of the ogn attribute union types. </p> <dl class="field-list simple"> <dt class="field-odd">Returns</dt> <dd class="field-odd"> <p> Dictionary that maps the attribute union names to list of associated ogn types </p> </dd> <dt class="field-even">Return type</dt> <dd class="field-even"> <p> dict[str, list[str]] </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.AttributeType.is_legal_ogn_type"> <code>static is_legal_ogn_type</code> (<code>type: omni.graph.core._omni_graph_core.Type</code>) <span class="sig-return">→ bool</span> </dt> <dd> <p> Check to see if the type combination has a legal representation in OGN. </p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"> <p> <strong>type</strong> (omni.graph.core.Type) – The type object to be checked </p> </dd> <dt class="field-even">Returns</dt> <dd class="field-even"> <p> True if the type represents a legal OGN type, otherwise False </p> </dd> </dl> </dd> </dl> ### Return type - **bool** ### sdf_type_name_from_type - **Parameters** - **type** (omni.graph.core.Type) – The type to be converted - **Returns** - The SDF type name of the type, or None if there is no corresponding SDF type - **Return type** - str ### type_from_ogn_type_name - **Parameters** - **ogn_type_name** (str) – The OGN-style attribute type name to be converted - **Returns** - Type corresponding to the attribute type name in OGN format. Type object will be the unknown type if the type name could be parsed. - **Return type** - omni.graph.core.Type ### type_from_sdf_type_name - **Parameters** - **sdf_type_name** (str) – The SDF-style attribute type name to be converted - **Returns** - Type corresponding to the attribute type name in SDF format. Type object will be the unknown type if the type name could be parsed. - **Return type** - omni.graph.core.Type # 转换后的Markdown格式数据 ## 标题 这里是标题内容 ## 段落 这里是段落内容,可以包含多个段落。 ## 列表 - 列表项1 - 列表项2 ## 代码块 ``` 这里是代码块内容 ``` ## 链接 这里是链接文本,但链接本身已被删除。 ## 图片 这里是图片描述,但图片本身已被删除。
omni.graph.core.AttributeType_omni.graph.core.AttributeType.md
# AttributeType ## Methods - `__init__(*args, **kwargs)` - `base_data_size(type)` - Figure out how much space a base data type occupies in memory inside Fabric. - `get_unions()` - Returns a dictionary containing the names and contents of the ogn attribute union types. - `is_legal_ogn_type(type)` - Check to see if the type combination has a legal representation in OGN. - `sdf_type_name_from_type(type)` - Given an attribute type find the corresponding SDF type name for it, None if there is none, e.g. - `type_from_ogn_type_name(ogn_type_name)` - Parse an OGN attribute type name into the corresponding omni.graph.core.Type description. <p> Parse an SDF attribute type name into the corresponding omni.graph.core.Type description. </p> <p> __init__(*args, **kwargs) </p> <p> static base_data_size(type: omni.graph.core._omni_graph_core.Type) -> int </p> <p> Figure out how much space a base data type occupies in memory inside Fabric. This will not necessarily be the same as the space occupied by the Python data, which is only transient. Multiply by the tuple count and the array element count to get the full size of any given piece of data. </p> <p> Parameters: - type (omni.graph.core.Type) – The type object whose base data type size is to be found </p> <p> Returns: - Number of bytes one instance of the base data type occupies in Fabric </p> <p> Return type: - int </p> <p> static get_unions() -> dict </p> <p> Returns a dictionary containing the names and contents of the ogn attribute union types. </p> <p> Returns: - Dictionary that maps the attribute union names to list of associated ogn types </p> <p> Return type: - dict[str, list[str]] </p> <p> static is_legal_ogn_type(type: omni.graph.core._omni_graph_core.Type) -> bool </p> <p> Check to see if the type combination has a legal representation in OGN. </p> <p> Parameters: - type (omni.graph.core.Type) – The type object to be checked </p> <p> Returns: - True if the type represents a legal OGN type, otherwise False </p> ## Return type - bool ## sdf_type_name_from_type - **Parameters** - **type** (omni.graph.core.Type) – The type to be converted - **Returns** - The SDF type name of the type, or None if there is no corresponding SDF type - **Return type** - str ## type_from_ogn_type_name - **Parameters** - **ogn_type_name** (str) – The OGN-style attribute type name to be converted - **Returns** - Type corresponding to the attribute type name in OGN format. Type object will be the unknown type if the type name could be be parsed. - **Return type** - omni.graph.core.Type ## type_from_sdf_type_name - **Parameters** - **sdf_type_name** (str) – The SDF-style attribute type name to be converted - **Returns** - Type corresponding to the attribute type name in SDF format. Type object will be the unknown type if the type name could be be parsed. - **Return type** - omni.graph.core.Type
omni.graph.core.AttributeValueHelper.md
# AttributeValueHelper ## Class Definition ```python class omni.graph.core.AttributeValueHelper(attribute: omni.graph.core.Attribute, instance=18446744073709551614) ``` Bases: `AttributeDataValueHelper` Class to manage getting and setting of Attribute values. You can also just use AttributeDataValueHelper directly. ### Methods | Method | Description | |--------|-------------| | `__init__(attribute[, instance])` | Create a helper class to access Attribute values | | `resolve_type(type_id)` | Resolves the attribute type, usually before setting an explicit value. | | `set(new_value[, on_gpu, update_usd])` | Set the value of the attribute. | ### Attributes | Attribute | Description | |-----------|-------------| | `attribute` | [Description not provided] | | Attribute | Description | |-----------|-------------| | attribute | the attribute this helper is wrapping | | is_resolved | Does the underlying attribute have a definite resolved type? | | is_valid | Validity of the underlying API object | | type | the attribute type, extracting it from the data if it hasn't already been done | #### `__init__(attribute: Attribute, instance=18446744073709551614)` Create a helper class to access Attribute values **Parameters:** - **attribute** – Attribute whose value will be accessed - **instance** – Index of the graph from which the attribute’s value is to be accessed #### `resolve_type(type_id: str | omni.graph.core._omni_graph_core.Type)` Resolves the attribute type, usually before setting an explicit value. **Parameters:** - **type** – Attribute type to which the attribute will be resolved. **Raises:** - **OmniGraphError** – If the attribute could not (or should not) be resolved #### `set(new_value: Union[Any, TypedValue], on_gpu: bool)` ### Set the value of the attribute Set the value of the attribute. This is overridden so that it can include an explicit type for the data, which can be used to resolve the attribute type (only valid for extended types) #### Parameters - **new_value** – New value to be set on the attribute - **on_gpu** – Should the value be stored on the GPU? - **update_usd** – Should the value be immediately propagated to USD? #### Raises - **og.OmniGraphError** – Raised if the data type of the attribute is not yet supported ### attribute the attribute this helper is wrapping #### Type - Attribute ### is_resolved Does the underlying attribute have a definite resolved type? #### Type - bool ### is_valid Validity of the underlying API object #### Type - bool ### type the attribute type, extracting it from the data if it hasn’t already been done #### Type - Type
omni.graph.core.attribute_value_as_usd.md
# attribute_value_as_usd ## attribute_value_as_usd ``` ```markdown omni.graph.core.attribute_value_as_usd(og_type: Type, value: Any, array_limit: Optional[int] = None) -> Any ``` ```markdown Returns the value, converted into a type suitable for setting through the USD API compatible with an attribute of the given type. It’s assumed that anything passed in here has a valid USD attribute type; i.e. no extended attributes or bundles ``` ```markdown ### Parameters - **og_type** – The OG type of the given data - **value** – The value read from the attribute - **array_limit** – Arrays larger than this value will be truncated ### Returns - The USD-compatible value ### Return type - Any ```
omni.graph.core.BaseDataType.md
# BaseDataType ## BaseDataType ```python class omni.graph.core.BaseDataType ``` **Bases:** `pybind11_object` **Basic data type for attribute data** **Members:** - **ASSET**: Data represents an Asset - **BOOL**: Data is a boolean - **CONNECTION**: Data is a special value representing a connection - **DOUBLE**: Data is a double precision floating point value - **FLOAT**: Data is a single precision floating point value - **HALF**: Data is a half precision floating point value - **INT**: Data is a 32-bit integer - **INT64**: Data is a 64-bit integer - **PRIM**: Data is deprecated - **RELATIONSHIP**: Data is a relationship to a USD prim - **TAG**: Data is a special Fabric tag - **TOKEN**: Data is a reference to a unique shared string - **UCHAR**: Data is an 8-bit unsigned character - **UINT**: Data is a 32-bit unsigned integer - **UINT64**: Data is a 64-bit unsigned integer - **UNKNOWN**: Data type is currently unknown **Methods** - `__init__(self, value)` **Attributes** - `ASSET` - `BOOL` - `CONNECTION` - `DOUBLE` - `FLOAT` - `HALF` - `INT` - `INT64` - `PRIM` - `RELATIONSHIP` - `TAG` - `TOKEN` - `UCHAR` - `UINT` - `UINT64` - `UNKNOWN` | Column 1 | Column 2 | |----------|----------| | `FLOAT` | | | `HALF` | | | `INT` | | | `INT64` | | | `PRIM` | | | `RELATIONSHIP` | | | `TAG` | | | `TOKEN` | | | `UCHAR` | | | `UINT` | | | `UINT64` | | | `UNKNOWN`| | | `name` | | | `value` | | ### __init__ ```python __init__(self: omni.graph.core._omni_graph_core.BaseDataType, value: int) -> None ``` ### name ```python property name ``` ```
omni.graph.core.BaseDataType_omni.graph.core.BaseDataType.md
# BaseDataType ## BaseDataType Basic data type for attribute data Members: - ASSET : Data represents an Asset - BOOL : Data is a boolean - CONNECTION : Data is a special value representing a connection - DOUBLE : Data is a double precision floating point value - FLOAT : Data is a single precision floating point value - HALF : Data is a half precision floating point value - INT : Data is a 32-bit integer - INT64 : Data is a 64-bit integer - PRIM : Data is deprecated - RELATIONSHIP : Data is a relationship to a USD prim - TAG : Data is a special Fabric tag - TOKEN : Data is a reference to a unique shared string - UCHAR : Data is an 8-bit unsigned character - UINT : Data is a 32-bit unsigned integer - UINT64 : Data is a 64-bit unsigned integer - UNKNOWN : Data type is currently unknown ### Methods - `__init__(self, value)` ### Attributes - `ASSET` - `BOOL` - `CONNECTION` - `DOUBLE` - `FLOAT` - `HALF` - `INT` - `INT64` - `PRIM` - `RELATIONSHIP` - `TAG` - `TOKEN` - `UCHAR` - `UINT` - `UINT64` - `UNKNOWN` | 类型 | 描述 | |------------|------| | `FLOAT` | | | `HALF` | | | `INT` | | | `INT64` | | | `PRIM` | | | `RELATIONSHIP` | | | `TAG` | | | `TOKEN` | | | `UCHAR` | | | `UINT` | | | `UINT64` | | | `UNKNOWN` | | | `name` | | | `value` | | ### `__init__` ```python def __init__(self: omni.graph.core._omni_graph_core.BaseDataType, value: int) -> None: pass ``` ### `name` ```python property name ```
omni.graph.core.BucketId.md
# BucketId ## BucketId ``` Bases: `pybind11_object` internal Use only, and obsolete: This type was only useful for writing back to USD, which cannot be achieved anymore through this type. However, writing back to USD can still be achieved by using the USD API directly. ``` ### Methods | Method | Description | |--------|-------------| | `__init__(self, id)` | [OBSOLETE] Set up the initial value of the bucket id | ### Attributes | Attribute | Description | |-----------|-------------| | `id` | Internal Use - [OBSOLETE] Unique identifier of a bucket of Fabric data | ```python __init__(self, id: int) -> None ``` [OBSOLETE] Set up the initial value of the bucket id ``` id (int): [OBSOLETE] Unique identifier of a bucket of Fabric data Internal Use - [OBSOLETE] Unique identifier of a bucket of Fabric data
omni.graph.core.BucketId_omni.graph.core.BucketId.md
# BucketId ## BucketId ```python class omni.graph.core.BucketId ``` **Internal Use only, and obsolete:** This type was only useful for writing back to USD, which cannot be achieved anymore through this type. However, writing back to USD can still be achieved by using the USD API directly. ### Methods | Method | Description | |--------|-------------| | `__init__(self, id)` | [OBSOLETE] Set up the initial value of the bucket id | ### Attributes | Attribute | Description | |-----------|-------------| | `id` | Internal Use - [OBSOLETE] Unique identifier of a bucket of Fabric data | ```python def __init__(self, id: int) -> None: [OBSOLETE] Set up the initial value of the bucket id ``` ``` id (int): [OBSOLETE] Unique identifier of a bucket of Fabric data Internal Use - [OBSOLETE] Unique identifier of a bucket of Fabric data
omni.graph.core.Bundle.md
# Bundle ## Methods - `__init__(attribute_name: str, read_only: bool)` - Initialize the access points for the bundle attribute - `attribute_by_name(attribute_name: str)` - Get an attribute by name from the underlying buffer or the buffer masking it. - `clear()` - Empties out the bundle contents - `create_attribute(name: str, type_desc: str)` - Create an attribute inside the buffered bundle data structure | Method | Description | |--------|-------------| | (bundle_contents) | Convert a BundleContents object to a python Bundle. | | (to_insert) | Insert new content in the existing bundle | | (attribute_name) | Removes the attribute with the given name from the bundle, silently succeeding if it is not in the bundle. | ### Attributes | Attribute | Description | |-----------|-------------| | attribute_names | Returns the list of interface objects corresponding to the attributes contained within the bundle | | is_runtime_resident | Does the bundle content exist and is it valid | | name | The bundle's name | | runtime_accessor | exposes the runtime bundle accessor. | | size | Returns the number of attributes within this bundle, 0 if the bundle is not valid | | valid | Is the underlying bundle valid, or None if it does not even exist | ### omni.graph.core.Bundle.__init__ ```python __init__(attribute_name: str, read_only: bool) ``` Initialize the access points for the bundle attribute. **Parameters:** - `attribute_name` – the bundle’s name. This name will only be used if the bundle is nested. - `read_only` – Is the bundle data read-only? ### omni.graph.core.Bundle.attribute_by_name ```python attribute_by_name(attribute_name: str) -> Optional[RuntimeAttribute] ``` ``` ## omni.graph.core.Bundle.attribute_by_name Get an attribute by name from the underlying buffer or the buffer masking it. ### Parameters - **attribute_name** – the attribute being queried. ### Returns the named attribute within the bundle, or None if no such attribute exists in the bundle ## omni.graph.core.Bundle.clear Empties out the bundle contents ### Raises - **og.OmniGraphError** – if the bundle is not writable ## omni.graph.core.Bundle.create_attribute Create an attribute inside the buffered bundle data structure ### Parameters - **name** – name of the attribute to create - **type_desc** – python type object of the attribute to create. Accepts all Omnigraph types. Will attempt to convert non-omnigraph types, but raise an error if it fails. ### Returns the OmniAttribute it created. ### Raises - **OmniGraphError** if no type conversion was found. ## omni.graph.core.Bundle.from_accessor ——– FOR GENERATED CODE USE ONLY ——– Convert a BundleContents object to a python Bundle. ### Parameters - **bundle_contents** – the graph object representing the bundle ## omni.graph.core.Bundle.insert Insert a bundle, attribute, or tuple of attribute and name into the bundle. ### Parameters - **to_insert** – a Bundle, OmniAttribute, or a tuple containing an OmniAttribute and a string. Insert new content in the existing bundle **Parameters** - **to_insert** – Object to insert. It can be one of three different types of object: - **Bundle**: Another bundle, whose contents are entirely copied into this one - **RuntimeAttribute**: A single attribute from another bundle to be copied with the same name - **(RuntimeAttribute, str)**: A single attribute from another bundle and the name to use for the copy - **AttributeDescription**: Information required to create a brand new typed attribute **Returns** - Attribute object of the new attribute if inserting an attribute, else None remove(attribute_name: str) Removes the attribute with the given name from the bundle, silently succeeding if it is not in the bundle. **Parameters** - **attribute_name** – attribute to be deleted. property attribute_names: List[OmniAttribute] Returns the list of interface objects corresponding to the attributes contained within the bundle property is_runtime_resident Does the bundle content exist and is it valid **Type** - bool property name The bundle’s name property runtime_accessor: BundleContents exposes the runtime bundle accessor. **Returns** - the BundleContents object if it exists, None otherwise. property size The size of the bundle **Returns** - int: The number of attributes in the bundle ### Bundle Properties #### Size : int - Returns the number of attributes within this bundle, 0 if the bundle is not valid - **Type**: int #### Valid : Optional[bool] - Is the underlying bundle valid, or None if it does not even exist - **Type**: bool
omni.graph.core.BundleChanges.md
# BundleChanges ## Overview BundleChanges is designed for inspecting modifications within a bundle during its lifetime. The BundleChanges class enables the inspection of changes in a bundle’s attributes and child bundles during the lifetime of the BundleChanges instance. It keeps a record of modifications that have occurred, providing a suite of functionalities to inspect these changes. An important aspect of the BundleChanges class is that it automatically clears the changes upon its destruction, i.e., when the instance goes out of scope. This ensures that the lifetime of the recorded changes is tied to the lifetime of the BundleChanges instance. ### Example usage: ```python def compute(db) -> bool: with db.inputs.bundle.changes() as bundle_changes: if bundle_changes: # inspect changes else: return True # early exit, no changes ``` ## Methods - **Method 1** - **Method 2** - ... | Method | Description | |--------|-------------| | `__init__(bundle_changes, bundle[, clear_at_exit])` | Initialize bundle change tracking system for a bundle | | `activate()` | Activates the change tracking system for a bundle. | | `clear_changes()` | Clears the recorded changes. | | `deactivate()` | Deactivates the change tracking system for a bundle. | | `get_change(entry)` | Retrieves the change status of a bundle or attribute. | | `has_changed()` | Checks if the bundle has changed. | ### __init__(bundle_changes, bundle[, clear_at_exit]) Initialize bundle change tracking system for a bundle **Parameters:** - **context** – Evaluation context from which this bundle was extracted - **bundle** – Bundle for which changes are being tracked ### activate() Activates the change tracking system for a bundle. This method controls the change tracking system of a bundle. It’s only applicable for read-write bundles (when readOnly template parameter is false). For read-only bundles, this method will cause a compilation error if called. ### clear_changes() Clears the recorded changes. This method is used to manually clear the recorded changes of the bundle. ### deactivate() Deactivates the change tracking system for a bundle. ## Deactivate Deactivates the change tracking system for a bundle. This method controls the change tracking system of a bundle. It’s only applicable for read-write bundles (when readOnly template parameter is false). For read-only bundles, this method will cause a compilation error if called. ## get_change Retrieves the change status of a bundle or attribute. This method is used to check if a specific bundle or attribute has been modified within the lifetime of the BundleChanges instance. ### Parameters - **entry** – None, RuntimeAttribute or BundleContents to check if dirty. ## has_changed Checks if the bundle has changed. This method is used to check if any changes have been made to the bundle’s attributes or child bundles within the lifetime of the BundleChanges instance.
omni.graph.core.BundleChangeType.md
# BundleChangeType ## BundleChangeType ``` class omni.graph.core.BundleChangeType ``` Enumeration representing the type of change that occurred in a bundle. This enumeration is used to identify the kind of modification that has taken place in a bundle or attribute. It’s used as the return type for functions that check bundles and attributes, signaling whether those have been modified or not. Members: - NONE : Indicates that no change has occurred in the bundle. - MODIFIED : Indicates that the bundle has been modified. ### Methods - `__init__(self, value)` ### Attributes - `MODIFIED` - `NONE` - `name` - `value` omni.graph.core._omni_graph_core.BundleChangeType , value : int ) → None property name
omni.graph.core.BundleContainer.md
# BundleContainer ## Description ```python class omni.graph.core.BundleContainer(context: GraphContext, node: Node, attributes, gpu_bundles: List[str], read_only: bool = False, gpu_ptr_kinds: Optional[Dict[str, PtrToPtrKind]] = None) ``` ### Parameters - `context`: An instance of `GraphContext`. - `node`: An instance of `Node`. - `attributes`: Attributes for the bundle container. - `gpu_bundles`: A list of strings representing GPU bundles. - `read_only`: A boolean indicating if the container is read-only (default is `False`). - `gpu_ptr_kinds`: An optional dictionary mapping strings to `PtrToPtrKind` instances. ``` ## omni.graph.core.BundleContainer ### Description Bases: ```python object ``` --- FOR USE BY GENERATED CODE ONLY --- Simple container to manage the set of bundle objects used during a compute function by a node. This is initialized alongside attribute data in order to minimize the generated code. It will house a set of BundleContents objects, one per attribute that is a bundle type, with properties named after the attributes they represent. ### Attributes #### context Evaluation context for these bundles - Type: GraphContext #### node Owner of these bundles - Type: Node #### attributes Subset of node attributes to check for being bundles - Type: list[Attribute] #### gpu_bundles Subset of bundle attributes whose memory lives on the GPU - Type: list[str] #### read_only True if these attributes are read-only - Type: bool #### gpu_ptr_kinds Attribute array pointer locations for GPU-based array attributes - Type: dict[str, PtrToPtrKind] ### Methods #### __init__(context, node, attributes, gpu_bundles) Set up the list of members based on the list of node attributes. , **gpu_bundles** : List[str], **read_only** : bool = False, **gpu_ptr_kinds** : Optional[Dict[str, PtrToPtrKind]] = None )  Set up the list of members based on the list of node attributes. These will usually be a subset, e.g. just the inputs, to keep the higher level access simple **Parameters** - **context** (GraphContext) – Evaluation context for these bundles - **node** (Node) – Owner of these bundles - **attributes** (list[Attribute]) – Subset of node attributes to check for being bundles - **gpu_bundles** (list[str]) – Subset of bundle attributes whose memory lives on the GPU - **read_only** (bool) – True if these attributes are read-only - **gpu_ptr_kinds** (dict[str, PtrToPtrKind]) – Attribute array pointer locations for GPU-based array attributes
omni.graph.core.BundleContents.md
# BundleContents ## BundleContents ### Class Details ```python class omni.graph.core.BundleContents(context: ~omni.graph.core._omni_graph_core.GraphContext, node: ~omni.graph.core._omni_graph_core.Node, attribute_name: str, read_only: bool, gpu_by_default: bool, gpu_ptr_kind: ~omni.graph.core._omni_graph_core.PtrToPtrKind = <PtrToPtrKind.NA: 0>) ``` **Bases:** `object` --- FOR USE BY GENERATED CODE ONLY --- Manage the allowed types of attributes, providing a static set of convenience values ### Attributes #### context **Type:** [GraphContext](omni.graph.core.GraphContext.html#omni.graph.core.GraphContext) Evaluation context from which this bundle was extracted #### read_only **Type:** bool Is the bundle data read-only? ### Methods ``` | Method | Description | | --- | --- | | `__init__(context, node, attribute_name, ...)` | Initialize the access points for the bundle attribute | | `add_attributes(types, names)` | Add attributes to the bundle | | `attribute_by_name(attribute_name)` | Returns the named attribute within the bundle, or None if no such attribute exists in the bundle | | `changes([clear_at_exit])` | | | `clear()` | Empties out the bundle contents | | `insert(to_insert)` | Insert new content in the existing bundle | | `remove(attribute_name)` | Removes the attribute with the given name from the bundle, silently succeeding if it is not in the bundle | | `remove_attributes(names)` | Remove attributes from the bundle | ### Attributes | Attribute | Description | | --- | --- | | `attributes` | interface objects corresponding to the attributes contained within the bundle | | `bundle` | Underlying bundle of this object | | `path` | the path where this bundle's data is stored | | `size` | the number of attributes within this bundle, 0 if the bundle is not valid | | `valid` | Validity of the underlying bundle | ### __init__ `__init__(context: ~omni.graph.core._omni_graph_core.GraphContext, node: ~omni.graph.core._omni_graph_core.Node, attribute_name: str, ...)` ### __init__ ```python __init__( read_only: bool, gpu_by_default: bool, gpu_ptr_kind: ~omni.graph.core._omni_graph_core.PtrToPtrKind = <PtrToPtrKind.NA: 0> ) ``` Initialize the access points for the bundle attribute #### Parameters - **context** – Evaluation context from which this bundle was extracted - **node** – Node owning the bundle - **attribute_name** – Name of the bundle attribute - **read_only** – Is the bundle data read-only? - **gpu_by_default** – Are the bundle members on the GPU by default? - **gpu_ptr_kind** – On which device to pointers to GPU bundles live? ### add_attributes ```python add_attributes( types: List[Type], names: List[str] ) ``` Add attributes to the bundle #### Parameters - **types** – Vector of types - **names** – The names of each attribute Note it is required that size(types) == size(names) ### attribute_by_name ```python attribute_by_name( attribute_name: str ) -> Optional[RuntimeAttribute] ``` Returns the named attribute within the bundle, or None if no such attribute exists in the bundle #### Parameters - **attribute_name** – Name of the attribute to retrieve #### Returns - Bundle member with the given name, None if it was not found #### Return type - RuntimeAttribute ## BundleContents Methods ### clear Empties out the bundle contents Raises: - **og.OmniGraphError** – if the bundle is not writable ### insert Insert new content in the existing bundle Parameters: - **to_insert** – Object to insert. It can be one of three different types of object: - *Bundle*: Another bundle, whose contents are entirely copied into this one - *RuntimeAttribute*: A single attribute from another bundle to be copied with the same name - *(RuntimeAttribute, str)*: A single attribute from another bundle and the name to use for the copy - *AttributeDescription*: Information required to create a brand new typed attribute Returns: - wrapper to the new attribute if inserting an attribute, else None Return type: - RuntimeAttribute ### remove Removes the attribute with the given name from the bundle, silently succeeding if it is not in the bundle Parameters: - **attribute_name** – Name of the attribute to remove ### remove_attributes (This section is incomplete in the provided HTML snippet) ## Attributes ### remove_attributes Remove attributes from the bundle #### Parameters - **names** – The names of each attribute to be removed Note it is required that size(types) == size(names) ### attributes interface objects corresponding to the attributes contained within the bundle #### Type - list[RuntimeAttribute] ### bundle Underlying bundle of this object #### Type - Bundle ### path the path where this bundle’s data is stored #### Type - str ### size the number of attributes within this bundle, 0 if the bundle is not valid #### Type - int ### valid Validity of the underlying bundle #### Type - bool
omni.graph.core.BundleWriteBlock.md
# BundleWriteBlock ## BundleWriteBlock ``` class omni.graph.core.BundleWriteBlock(context: GraphContext, activate=True) ``` Bases: `object` Creates a thread-local scope to ensure that each bundle is marked as changed only once, regardless of the number of operations performed within the block. This optimization is an integral part of the bundle change tracking system, designed to minimize overhead associated with high-volume operations during frequent bundle manipulations. Example usage: ``` with omni.graph.core.BundleWriteBlock(graph_context): # …each bundle written to will be bumped exactly once… ``` You can optionally pass in a second parameter to deactivate the block: ``` with omni.graph.core.BundleWriteBlock(graph_context, False): # …the block is not active here… ``` ### Methods | Method | Description | |--------|-------------| | `__init__(context[, activate])` | | ``` def __init__(context: GraphContext, activate=True): pass ``` activate = True
omni.graph.core.Classes.md
# omni.graph.core Classes ## Classes Summary: | Class Name | Description | |------------|-------------| | Attribute | An attribute, defining a data type and value that belongs to a node | | AttributeData | Reference to data defining an attribute’s value | | AttributeDataValueHelper | Class to manage getting and setting of omni.graph.core.AttributeData values. | | AttributePortType | Port side of the attribute on its node | | AttributeRole | Interpretation applied to the attribute data | | AttributeType | Utilities for operating with the attribute data type class omni.graph.core.Type and related types | | AttributeValueHelper | Class to manage getting and setting of Attribute values. | | BaseDataType | Basic data type for attribute data | | BucketId | 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 | Value indicating whether a function call succeeded | | Graph | Object containing everything necessary to execute a connected set of nodes. | - GraphBackingType: Location of the data backing the graph - GraphContext: Execution context for a graph - GraphController: Helper class that provides a simple interface to modifying the contents of a graph - GraphEvaluationMode: How the graph evaluation is scheduled - GraphEvent: Graph modification event. - GraphPipelineStage: Pipeline stage in which the graph lives - GraphRegistry: Manager of the node types registered to OmniGraph. - GraphRegistryEvent: Graph Registry modification event. - GraphSettings: Container for the set of settings in a graph. This is a class instead of a tuple so that future - IBundle2: Provide read write access to recursive bundles. - IBundleChanges: Interface for monitoring and handling changes in bundles and attributes. - IBundleFactory: Interface to create new bundles - IBundleFactory2: IBundleFactory version 2. - IConstBundle2: Provide read only access to recursive bundles. - INodeCategories: Interface to the list of categories that a node type can belong to - INodeTypeForwarding: @brief Interface that creates a forward on a request for a node type to a different node type - INodeTypeForwarding2: @brief Interface that creates a forward on a request for a node type to a different node type - IPrimView: PrimView is an interface that provides a view to a set of prims for use with OmniGraph instancing. - ISchedulingHints: Interface to the list of scheduling hints that can be applied to a node type - ISchedulingHints2: 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** - 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 |
omni.graph.core.ComputeGraph.md
# ComputeGraph ## ComputeGraph class omni.graph.core.ComputeGraph Main OmniGraph interface registered with the extension system ### Methods | Method | Description | |--------|-------------| | __init__(*args, **kwargs) | | __init__(*args, **kwargs)
omni.graph.core.ComputeGraph_omni.graph.core.ComputeGraph.md
# ComputeGraph ## ComputeGraph ```python class omni.graph.core.ComputeGraph(pybind11_object) ``` Main OmniGraph interface registered with the extension system ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | | ```python def __init__(*args, **kwargs): pass ```
omni.graph.core.ConnectionInfo.md
# ConnectionInfo ## Methods - `__init__(self, attr, connection_type)` - Set up the connection info data ## Attributes - `attr` - Attribute being connected - `connection_type` - Type of connection ### `__init__` Method - Parameters: - `self` : [omni.graph.core._omni_graph_core.ConnectionInfo](omni.graph.core.ConnectionInfo) - `attr` : [omni.graph.core._omni_graph_core.Attribute](omni.graph.core.Attribute) - `connection_type` : [omni.graph.core._omni_graph_core.ConnectionType](omni.graph.core.ConnectionType) <em> connection_type: omni.graph.core._omni_graph_core.ConnectionType ) → None </em> Set up the connection info data ### Parameters - **attr** (omni.graph.core.Attribute) – Attribute in the connection - **connection_type** (omni.graph.core.ConnectionType) – Type of connection ### attr Attribute being connected ### connection_type Type of connection
omni.graph.core.ConnectionType.md
# ConnectionType ## Overview ConnectionType is a class that defines the type of connection. It is derived from `pybind11_object`. ### Members - **CONNECTION_TYPE_REGULAR**: Normal connection. - **CONNECTION_TYPE_DATA_ONLY**: Connection only represents data access, not execution flow. - **CONNECTION_TYPE_EXECUTION**: Connection only represents execution flow, not data access. ## Methods - **__init__(self, value)** ## Attributes - **CONNECTION_TYPE_DATA_ONLY** - **CONNECTION_TYPE_EXECUTION** - **CONNECTION_TYPE_REGULAR** - **name** - **value** <em class="sig-param"> <span class="n"> <a class="reference internal" href="#omni.graph.core.ConnectionType" title="omni.graph.core._omni_graph_core.ConnectionType"> <span class="pre"> omni.graph.core._omni_graph_core.ConnectionType </span> </a> </span> , <em class="sig-param"> <span class="n"> <span class="pre"> value </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </em> <dl class="py property"> <dt class="sig sig-object py" id="omni.graph.core.ConnectionType.name"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> name </span> </span> </dt> </dl>
omni.graph.core.ConnectionType_omni.graph.core.ConnectionType.md
# ConnectionType ## ConnectionType ``` ```markdown class omni.graph.core.ConnectionType ``` ```markdown Bases: pybind11_object ``` ```markdown Type of connection) ``` ```markdown Members: ``` ```markdown - CONNECTION_TYPE_REGULAR : Normal connection - CONNECTION_TYPE_DATA_ONLY : Connection only represents data access, not execution flow - CONNECTION_TYPE_EXECUTION : Connection only represents execution flow, not data access ``` ```markdown Methods ``` ```markdown - __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` ```markdown __init__(self, value) ``` ```markdown Attributes ``` ```markdown - CONNECTION_TYPE_DATA_ONLY - CONNECTION_TYPE_EXECUTION - CONNECTION_TYPE_REGULAR - name - value ``` <section> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.ConnectionType.__init__"> <span class="pre"> def </span> <span class="w"> </span> <span class="n"> <span class="pre"> __init__ </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <a class="reference internal" href="#omni.graph.core.ConnectionType" title="omni.graph.core._omni_graph_core.ConnectionType"> <span class="pre"> omni.graph.core._omni_graph_core.ConnectionType </span> </a> </span> , <em class="sig-param"> <span class="n"> <span class="pre"> value </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.graph.core.ConnectionType.name"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> name </span> </span> </dt> <dd> </dd> </dl> </dd> </dl> </section>
omni.graph.core.Controller.md
# Controller ## Controller ```python class omni.graph.core.Controller(*args, **kwargs) ``` Bases: - `GraphController` - `NodeController` - `DataView` - `ObjectLookup` Class to provide a simple interface to a variety OmniGraph manipulation functions. Provides functions for creating nodes, making and breaking connections, and setting values. Graph manipulation functions are undoable, value changes are not. Functions are set up to be as flexible as possible, accepting a wide variety of argument variations. Here is a summary of the interface methods you can access through this class, grouped by interface class. The ones marked with an “!” indicate that they have both a classmethod version and an object method version. In those cases the methods use object member values which have corresponding arguments in the classmethod version. (e.g. if the method uses the “update_usd” member value then the method will also have a “update_usd:bool” argument) ### Controller - **edit** ! - Perform a collection of edits on a graph (the union of all interfaces) - **evaluate** - Runs async evaluation on one or more graphs as a waitable (typically called from async tests) - **evaluate_sync** - Runs evaluation on one or more graphs immediately ### ObjectLookup - **attribute** - Looks up an og.Attribute from a description - **attribute_path** - Looks up an attribute string path from a description - **attribute_type** Looks up an og.Type from a description - **graph** Looks up an og.Graph from a description - **node** Looks up an og.Node from a description - **node_path** Looks up a node string path from a description - **prim** Looks up an Usd.Prim from a description - **prim_path** Looks up a Usd.Prim string path from a description - **split_graph_from_node_path** Separate a graph and a relative node path from a full node path ### GraphController - **connect** Makes connections between attribute pairs - **create_graph** Creates a new og.Graph - **create_node** Creates a new og.Node - **create_prim** Creates a new Usd.Prim - **create_variable** Creates a new og.IVariable - **delete_node** Deletes a list of og.Nodes - **disconnect** Breaks connections between attribute pairs - **disconnect_all** Breaks all connections to and from specific attributes - **expose_prim** Expose a USD prim to OmniGraph through an importing node ### NodeController - **create_attribute** Create a new dynamic attribute on a node - **promote_attribute** Promote a node attribute in a compound graph on the parenting compound node - **remove_attribute** Remove an existing dynamic attribute from a node - **safe_node_name** Get a node name in a way that’s safe for USD ### DataView - **get** Get the value of an attribute’s data - **get_array_size** Get the number of elements in an array attribute’s data - **set** Set the value of an attribute’s data ### omni.graph.core.Controller.__graph_id Graph on which the operations are to be performed. ### omni.graph.core.Controller.__path_to_object_map Dictionary of relative paths mapped on to their full path after creation so that future function calls can use either full paths or short-forms to specify the nodes. ### omni.graph.core.Controller.__update_usd If True then update the USD after the operations that affect it ### omni.graph.core.Controller.__undoable If True the operation is added to the undo queue, else it is done immediately and forgotten ### omni.graph.core.Controller.__allow_exists_attr If True then attribute creation operation won’t fail when the attribute already exists on the node it was being added to (default False) ### omni.graph.core.Controller.__allow_exists_node If True then node creation operation won’t fail when the node already exists in the scene graph (default False) ### omni.graph.core.Controller.__allow_exists_prim If True then prim creation operation won’t fail when the prim already exists in the scene graph (default False) ###  If True then prim creation operation won’t fail when the prim already exists in the scene graph (default False) ### Raises * **OmniGraphError** – If the requested operation could not be performed ### Methods | Method | Description | | --- | --- | | `__init__(*args, **kwargs)` | Set up state information. | | `edit(*args, **kwargs)` | Edit and/or create an OmniGraph from the given description. | | `evaluate(*args, **kwargs)` | Wait for the next Graph evaluation cycle - await this function to ensure it is finished before returning. | | `evaluate_sync(*args, **kwargs)` | Run the next Graph evaluation cycle immediately. | ### Attributes | Attribute | Description | | --- | --- | | `PrimCreationData_t(*args, **kwargs)` | alias of Union[Tuple[str | Path, dict[str | tuple[str | Type, any]], str], Tuple[str | Path, str], Tuple[str | Path, dict[str | tuple[str | Type, any]], str]] | ## TYPE_CHECKING If True then verbose type checking will happen in various locations so that more legible error messages can be emitted. ## __init__ Set up state information. You only need to create an instance of the Controller if you are going to use the edit() function more than once, when it needs to remember the node mapping used for creation. Args are passed on to the parent classes who have inits and interpreted by them as they see fit. ### Parameters - **graph_id** – If specified then operations are performed on this graph_id unless it is overridden in a particular function call. See GraphController.create_graph() for the data types accepted for the graph description. - **path_to_object_map** – Dictionary of relative paths mapped on to their full path after creation so that the edit_commands can use either full paths or short-forms to specify the nodes. - **update_usd** – If specified then override whether to update the USD after the operations (default False) - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) - **allow_exists_attr** – If True then attribute creation operation won’t fail when the attribute already exists on the node it was being added to (default False) - **allow_exists_node** – If True then node creation operation won’t fail when the node already exists in the scene graph (default False) - **allow_exists_prim** – If True then prim creation operation won’t fail when the prim already exists in the scene graph (default False) Check the help information for GraphController.__init__(), NodeController.__init__(), DataView.__init__(), and ObjectLookup.__init__() for details on what other constructor arguments are accepted. ## Keys alias of GraphSetupKeys ## edit classmethod edit(*args, **kwargs) → Tuple[Graph, List[Node], List[Prim], Dict[str, Union[Node]]] Edit and/or create an OmniGraph from the given description. This function provides a single call that will make a set of modifications to an OmniGraph. It can be used to create a new graph from scratch or to make changes to an existing graph. If the “undoable” mode is not set to False then a single undo will revert everything done via this call. The description below contains different sections that perform different operations on the graph. They are always done in the order listed to minimize conflicts. If you need to execute them in a different order then use multiple calls to edit(). This function can be called either from the class or using an instantiated object. When calling from an object context the arguments passed in will take precedence over the arguments provided to the constructor. Here are some of the legal ways to call the edit function: ```python # For example purposes "cmds()" is a function that returns a dictionary of editing commands (graph, _, _, _) = og.Controller.edit("/TestGraph", cmds()) new_controller = og.Controller(graph) new_controller.edit(cmds()) og.Controller.edit(graph, cmds()) new_controller.edit(graph, cmds()) new_controller.edit(graph, cmds(), undoable=False) # Overrides the normal undoable state of new_controller ``` Below is the list of the allowed operations, in the order in which they will be performed. The parameters are described as lists, though if you have only one parameter for a given operation you can pass it without it being in a list. ```python { OPERATION: [List, Of, Arguments] } { OPERATION: SingleArgument } ``` For brevity the shortcut “keys = og.Controller.Keys” is assumed to exist. - **keys.DELETE_NODES**: NodeSpecs_t - Deletes a node or list of nodes. If the node specification is a relative path then it must be in the list of full paths that the controller created in a previous call to edit(). ```python { keys.DELETE_NODES: ["NodeInGraph", "/Some/Other/Graph/Node", my_omnigraph_node] } ``` - **keys.CREATE_VARIABLES**: [(VariableName_t, VariableType_t)] or [(VariableName_t, VariableType_t, Any)] - Constructs a variable on the graph with the given name and type and an optional default value. The type can be specified as either a ogn type string (e.g. “float4”), or as an og.Type (e.g. og.Type(og.BaseDataType.FLOAT)) ```python { keys.CREATE_VARIABLES: [("velocity", "float3"), ("count", og.Type(og.BaseDataType.FLOAT), 4)] } ``` - **keys.CREATE_NODES**: [(Path_t, Union[NodeType_t, dict])] - Constructs a node of the given type at the given path. If the path is a relative one then it is added directly under the graph being edited. A map is remembered between the given path, relative or absolute, and the node created at it so that further editing functions can refer to the node by that name directly rather than trying to infer the final full name. ```python { keys.CREATE_NODES: [("NodeInGraph", "omni.graph.tutorial.SimpleData"), ("Inner/Node/Path", og.NodeType(node_type_name))] } ``` - The node type can also be a dictionary of editing commands. In that scenario, the created node becomes a compound node which uses the commands to construct a subgraph that defines its execution. ```python { keys.CREATE_NODES: [("CompoundNode", { keys.CREATE_NODES: ("NodesInCompound", "omni.graph.tutorial.SimpleData") })] } ``` - keys.CREATE_PRIMS: [(Path_t, {ATTR_NAME: (AttributeType_t, ATTR_VALUE)}, Optional(PRIM_TYPE))] > Constructs a prim at path “PRIM_PATH” containing a set of attributes with specified types and values. Only those attribute types supported by USD can be used here, though the type specification can be in OGN form - invalid types result in an error. Whereas relative paths on nodes are treated as being relative to the graph, for prims a relative path is relative to the stage root. Prims are not allowed inside an OmniGraph and attempts to create one there will result in an error. > > Note that the PRIM_TYPE can appear with or without an attribute definition. (Many prim types are part of a schema and do not require explicit attributes to be added.) ```python ``` - keys.EXPOSE_PRIMS: [(cls.PrimExposureType, Prim_t, NewNode_t)] > Exposes a prim to OmniGraph through creation of one of the node types designed to do that. The first member of the tuple is the method used to expose the prim. The prim path is the second member of the tuple and it must already exist in the USD stage. The third member of the tuple is a node name with the same restrictions as the name in the CREATE_NODES edit. ```python ``` - keys.CREATE_ATTRIBUTES: [(AttributeSpec_t, AttributeTypeSpec_t)] > Constructs one or more new dynamic attributes on nodes. The first argument of the tuple defines the location of the new attribute by path and/or node. The second argument of the tuple defines the type and port of the attribute in a flexible way (see the type definition for more details). Any combination of specifications can be used to define new attributes. Unspecified ports default the attribute to being an input. ```python ``` - keys.CONNECT: [(AttributeSpec_t, AttributeSpec_t)] > Makes a connection between the given source and destination attributes. The local name of a newly created node may be made as part of the node in the spec, or the node portion of the attribute path: ```python ``` - keys.DISCONNECT: [(AttributeSpec_t, AttributeSpec_t)] > Breaks a connection between the given source and destination attributes. The local name of a newly created node may be made as part of the node in the spec, or the node portion of the attribute path: ```python ``` - keys.DISCONNECT_ALL: [AttributeSpec_t] > Breaks all connections to and from the given attributes. The local name of a newly created node may be made as part of the node in the spec, or the node portion of the attribute path: ```python ``` - keys.PROMOTE_ATTRIBUTES: [(AttributeSpec_t, str)] > Promotes attributes on a node in a compound graph instance as attributes on the parent compound node with the given name. Only input and output attributes on a node in a compound graph can be promoted. The prefix of the promoted name is optional; the ‘inputs’ prefix will be prepended for input attributes, and the ‘outputs’ prefix will be prepended for output attributes if necessary. ```python {keys.PROMOTE_ATTRIBUTES: [("NodeInGraph.inputs:value", "inputs:new_name"), ("OtherNodeInGraph.outputs:value", "result")]} ``` - keys.SET_VALUES: [AttributeSpec_t, Any] or [AttributeSpec_t, Any, AttributeType_t] > Sets the value of the given list of attributes. ```python {keys.SET_VALUES: [("/World/Graph/Node.inputs:attr1", 1.0), (("inputs:attr2", node), 2.0)]} ``` > In the case of extended attribute types you may also need to supply a data type, which is the type the attribute will resolve to when the value is set. To supply a type, add it as a third parameter to the attribute value: ```python {keys.SET_VALUES: [("inputs:ext1", node), 2.0, "float"]} ``` Here’s a simple call that first deletes an existing node “/World/PushGraph/OldNode”, then creates two nodes of type “omni.graph.tutorials.SimpleData”, connects their “a_int” attributes, disconnects their “a_float” attributes and sets the input “a_int” of the source node to the value 5. It also creates two unused USD Prim nodes, one with a float attribute named “attrFloat” with value 2.0, and the other with a boolean attribute named “attrBool” with the value true. ```python controller = og.Controller() keys = og.Controller.Keys (graph, nodes_constructed, prims_constructed, path_to_object_map) = controller.edit("/World/PushGraph", { keys.DELETIONS: ["OldNode"], keys.CREATE_NODES: [("src", "omni.graph.tutorials.SimpleData"), ("dst", "omni.graph.tutorials.SimpleData")], keys.CREATE_PRIMS: [("Prim1", {"attrFloat": ("float", 2.0)}), ("Prim2", {"attrBool": ("bool", True)})], keys.CONNECT: [("src.outputs:a_int", "dst.inputs:a_int")], keys.DISCONNECT: [("src.outputs:a_float", "dst.inputs:a_float")], keys.SET_VALUES: [("src.inputs:a_int", 5)], keys.CREATE_VARIABLES: [("a_float_var", og.Type(og.BaseDataType.FLOAT)), ("a_bool_var", "bool", True)] }) ``` > Note > The controller object remembers where nodes are created so that you can use short forms for the node paths for convenience. That’s why in the above graph the node paths for creation and the node specifications in the connections just says “src” and “dst”. As they have no leading “/” they are treated as being relative to the graph path and will actually end up in “/World/PushGraph/src” and “/World/PushGraph/dst”. > Node specifications with a leading “/” are assumed to be absolute paths and must be inside the path of an existing or created graph. e.g. the NODES reference could have been “/World/PushGraph/src”, however using “/src” would have been an error. > This node path mapping is remembered across multiple calls to edit() so you can always use the shortform so long as you use the same Controller object. ``` ### Parameters - **graph_id** – Identifier that says which graph is being edited. See GraphController.create_graph() for the data types accepted for the graph description. - **edit_commands** – Dictionary of commands and parameters indicating what modifications are to be made to the specified graph. A strict set of keys is accepted. Each of the values in the dictionary can be either a single value or a list of values of the proscribed type. - **path_to_object_map** – Dictionary of relative paths mapped on to their full path after creation so that the edit_commands can use either full paths or short-forms to specify the nodes. - **update_usd** – If specified then override whether to update the USD after the operations (default False) - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) - **allow_exists_attr** – If True then attribute creation operation won’t fail when the attribute already exists on the node it was being added to (default False) - **allow_exists_node** – If True then node creation operation won’t fail when the node already exists in the scene graph (default False) - **allow_exists_prim** – If True then prim creation operation won’t fail when the prim already exists in the scene graph (default False) ### Returns - the og.Graph being used for the operation - the list of og.Nodes created by the operation - the list of Usd.Prims created by the operation - the map of node/prim path name to the created og.Node/Usd.Prim objects. Can usually be ignored; it will be used internally to manage the shortform names of the paths used in multiple commands. ### Return type (Graph, list[Node], list[Usd.Prim], dict[str, str]) ### Raises - **OmniGraphError** – if any of the graph creation instructions could not be fulfilled. The graph will be left in the partially constructed state it reached at the time of the error. ### evaluate ```python await og.Controller.evaluate() # Evaluates all graphs controller = og.Controller.edit("/TestGraph", {}) await controller.evaluate() # Evaluates only "/TestGraph" await og.Controller.evaluate("/TestGraph") # Evaluates only "/TestGraph" controller.evaluate(graph_id="/OtherGraph") # Evaluates only "/OtherGraph" (not its own "/TestGraph") ``` #### Parameters - **obj** – Either cls or self depending on how the function was called - **graph_id** (GraphSpecs_t) – Graph or list of graphs to evaluate - None means all existing graphs #### Raises - **OmniGraphError** – If the graph evaluated explicitly does not exist or if it is a pre-render or post-render graph. <em class="property"> <span class="pre"> classmethod </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> evaluate_sync </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> Run the next Graph evaluation cycle immediately. </p> <p> 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. </p> <div class="highlight-python notranslate"> <div class="highlight"> <pre><span></span><span class="n">og</span><span class="o">.</span><span class="n">Controller</span><span class="o">.</span><span class="n">evaluate_sync</span><span class="p">()</span> <span class="c1"># Evaluates all graphs</span> <span class="n">controller</span> <span class="o">=</span> <span class="n">og</span><span class="o">.</span><span class="n">Controller</span><span class="o">.</span><span class="n">edit</span><span class="p">(</span><span class="s2">"/TestGraph"</span><span class="p">,</span> <span class="p">{})</span> <span class="n">controller</span><span class="o">.</span><span class="n">evaluate_sync</span><span class="p">()</span> <span class="c1"># Evaluates only "/TestGraph"</span> <span class="n">og</span><span class="o">.</span><span class="n">Controller</span><span class="o">.</span><span class="n">evaluate_sync</span><span class="p">(</span><span class="s2">"/TestGraph"</span><span class="p">)</span> <span class="c1"># Evaluates only "/TestGraph"</span> <span class="n">controller</span><span class="o">.</span><span class="n">evaluate_sync</span><span class="p">(</span><span class="n">graph_id</span><span class="o">=</span><span class="s2">"/OtherGraph"</span><span class="p">)</span> <span class="c1"># Evaluates only "/OtherGraph" (not its own "/TestGraph")</span> </pre> </div> </div> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> obj </strong> – Either cls or self depending on how evaluate_sync() was called </p> </li> <li> <p> <strong> graph_id </strong> ( <em> GraphSpecs_t </em> ) – Graph or list of graphs to evaluate - None means all existing graphs </p> </li> </ul> </dd> <dt class="field-even"> Raises </dt> <dd class="field-even"> <p> <strong> OmniGraphError </strong> – If the graph evaluated explicitly does not exist or if it is a pre-render or post-render graph. </p> </dd> </dl> </dd> </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Controller.TYPE_CHECKING"> <span class="sig-name descname"> <span class="pre"> TYPE_CHECKING </span> </span> <em class="property"> <span class="w"> </span> <span class="p"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="pre"> True </span> </em> </dt> <dd> <p> If True then verbose type checking will happen in various locations so that more legible error messages can be emitted. Set it to False to run a little bit faster, with errors just reporting raw Python error messages. </p> </dd> </dl> </dd> </dl> </section> </div> </div> <footer> <hr/> </footer> </div> </div> </section> </div>
omni.graph.core.create_node_type.md
# create_node_type ## create_node_type ```markdown create_node_type(func: Optional[callable] = None, * , unique_name: Optional[str] = None, ui_name: Optional[str] = None, add_execution_pins: bool = False, metadata: Optional[Any] = None) ```markdown - **func**: Optional[callable] = None - **unique_name**: Optional[str] = None - **ui_name**: Optional[str] = None - **add_execution_pins**: bool = False - **metadata**: Optional[Any] = None ```markdown <span class="pre"> [ </span> </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"> str </span> <span class="p"> <span class="pre"> ] </span> </span> <span class="p"> <span class="pre"> ] </span> </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> None </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> callable </span> </span> </span> </dt> <dd> <p> Decorator to transform a Python function into an OmniGraph node type definition. The decorator is configured to allow use with and without parameters. When used without parameters all of the default values for the parameters are assumed. </p> <p> If the function is called from the __main__ context, as it would if it were executed from the script editor or from a file, then the decorator is assumed to be creating a short-lived node type definition and the default module name “__autonode__” is applied to indicate this. Any attempts to save a scene containing these short-term node types will be flagged as a warning. </p> <p class="rubric"> Examples </p> <div class="doctest highlight-default notranslate"> <div class="highlight"> <pre><span></span><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">omni.graph.core</span> <span class="k">as</span> <span class="nn">og</span> <span class="gp">&gt;&gt;&gt; </span><span class="nd">@og</span><span class="o">.</span><span class="n">create_node_type</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">double_float</span><span class="p">(</span><span class="n">a</span><span class="p">:</span> <span class="n">ogdt</span><span class="o">.</span><span class="n">Float</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">ogdt</span><span class="o">.</span><span class="n">Float</span><span class="p">:</span> <span class="gp">&gt;&gt;&gt; </span> <span class="k">return</span> <span class="n">a</span> <span class="o">*</span> <span class="mf">2.0</span> <span class="go">&gt;&gt;&gt;</span> <span class="gp">&gt;&gt;&gt; </span><span class="nd">@og</span><span class="o">.</span><span class="n">create_node_type</span><span class="p">(</span><span class="n">add_execution_pins</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span> <span class="gp">&gt;&gt;&gt; </span><span class="k">def</span> <span class="nf">double_float</span><span class="p">(</span><span class="n">a</span><span class="p">:</span> <span class="n">ogdt</span><span class="o">.</span><span class="n">Float</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="n">ogdt</span><span class="o">.</span><span class="n">Float</span><span class="p">:</span> <span class="gp">&gt;&gt;&gt; </span> <span class="k">return</span> <span class="n">a</span> <span class="o">*</span> <span class="mf">2.0</span> </pre> </div> </div> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> func </strong> – the function object being wrapped. Should be a pure python function object or any other callable which </p> </li> <li> <p> <strong> form </strong> ( <em> has an `__annotations__` property. If "None" then the decorator was called using the parameterized </em> ) – </p> </li> <li> <p> <strong> "@create_node_type </strong> – </p> </li> <li> <p> <strong> unique_name </strong> – Override the default unique name, which is the function name in the module namespace </p> </li> <li> <p> <strong> ui_name </strong> – Name that appears in the node type’s menu and node display. </p> </li> <li> <p> <strong> add_execution_pins </strong> – Include both input and output execution pins so that this can be used as a trigger node </p> </li> <li> <p> <strong> graph. </strong> ( <em> type in an action </em> ) – </p> </li> <li> <p> <strong> metadata </strong> – Dictionary of extra metadata to apply to the node type </p> </li> </ul> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> Decorated version of the function that will create the node type definition </p> </dd> </dl> </dd> </dl> </section> </div> </div> <footer> <hr/> </footer> </div> </div> </section> </div>
omni.graph.core.create_prim_view_from_prims.md
# create_prim_view_from_prims ## create_prim_view_from_prims Create a prim view from a list of prims ### Parameters - **prims** – List of strings or Sdf.Paths of the prim location
omni.graph.core.create_prim_view_from_query.md
# create_prim_view_from_query  ## create_prim_view_from_query  ### omni.graph.core.create_prim_view_from_query  ```python omni.graph.core.create_prim_view_from_query(include: list, exclude: list = []) -> omni.graph.core._omni_graph_core.IPrimView ``` Create a prim view from lists of tuples of (name, type) pairs, used to create a query that returns a subset of Prims in fabric. Note that the prim view returned may not return any Prims until it has been applied to a graph. #### Parameters - **include** – Attributes that must exist on the Prim to be returned by the query. - **exclude** – Attributes that must not exist on the Prim to be returned by the query.
omni.graph.core.Database.md
# Database ## Overview Base class for the generated database class for .ogn nodes (Python and C++ implementations). Defines some common functionality that is the same for nodes of all types, to help cut down on the amount of redundant generated code. Like the C++ equivalent, you can access the ABI data types normally passed to the compute as `db.abi_node()` and `db.abi_context()`. Derived classes will have these class member variables instantiated, which are manipulated here in order to keep the amount of generated code to a minimum. ### Methods - **__init__(node)** - Initialize the helper classes for roles and sizes - attribute values are defined in the derived classes. - **dynamic_attribute_data(node, port_type)** - Gets the dynamic attribute data class stored on each node for a given port type. - **get_internal_state(node, inst_id)** - Returns the internal state information on the node, or None if it does not exist. - **get_metadata(metadata_key[, attribute])** - Get metadata related to this node. ### omni.graph.core.Database Methods - **get_variable** *(name)* - Get the value of a variable with a given name. - **log_error** *(message[, add_context])* - Log an error message from a compute method, for when the compute data is inconsistent or unexpected. - **log_info** *(message)* - Log an information message from a compute method, when status information is required about the compute. - **log_warn** *(message)* - Log a warning message from a compute method, when the compute is consistent but produced no results. - **log_warning** *(message)* - Log a warning message from a compute method, when the compute is consistent but produced no results. - **move** *(dst, src)* - Deprecated function. - **per_instance_internal_state** *(node)* - Returns the internal state information on the node, or None if it does not exist. - **per_node_data** *(node)* - Returns the per-node data for the given node. - **per_node_errors** *(node)* - Returns the compute errors on the node, or [] if it does not exist. - **per_node_internal_state** *(node)* - (No description provided) - **set_dynamic_attribute_memory_location** *(on_gpu)* - Set the memory location from which dynamic attribute values will be retrieved. - **set_variable** *(name, value)* - Set the value of a variable. - **shared_internal_state** *(node)* - Returns the internal state information on the node, or None if it does not exist. ### omni.graph.core.Database Attributes - **INTERFACE** - Attribute interface definition - things that don't change between nodes of the same type. - **PER_NODE_DATA** - (Incomplete data) - **PER_NODE_DATA** - Dictionary for data that is different on every node of the same type. - **ROLE_BUNDLE** - DEPRECATED - use omni.graph.core.AttributeRole.BUNDLE - **ROLE_COLOR** - DEPRECATED - use omni.graph.core.AttributeRole.COLOR - **ROLE_EXECUTION** - DEPRECATED - use omni.graph.core.AttributeRole.EXECUTION - **ROLE_FRAME** - DEPRECATED - use omni.graph.core.AttributeRole.FRAME - **ROLE_MATRIX** - DEPRECATED - use omni.graph.core.AttributeRole.MATRIX - **ROLE_NORMAL** - DEPRECATED - use omni.graph.core.AttributeRole.NORMAL - **ROLE_OBJECT_ID** - DEPRECATED - use omni.graph.core.AttributeRole.OBJECT_ID - **ROLE_PATH** - DEPRECATED - use omni.graph.core.AttributeRole.PATH - **ROLE_POINT** - DEPRECATED - use omni.graph.core.AttributeRole.POSITION - **ROLE_QUATERNION** - DEPRECATED - use omni.graph.core.AttributeRole.QUATERNION - **ROLE_TARGET** - DEPRECATED - use omni.graph.core.AttributeRole.TARGET - **ROLE_TEXCOORD** - DEPRECATED - use omni.graph.core.AttributeRole.TEXCOORD - **ROLE_TIMECODE** - DEPRECATED - use omni.graph.core.AttributeRole.TIMECODE - **ROLE_TRANSFORM** - DEPRECATED - use omni.graph.core.AttributeRole.FRAME - **ROLE_VECTOR** - DEPRECATED - use omni.graph.core.AttributeRole.VECTOR - **abi_context** - (No description provided) | Property | Description | |----------|-------------| | abi_context | The graph context to which this database belongs | | abi_node | The node to which this database belongs | | internal_state | The internal state data on the node owning this database | | per_instance_state | The internal state data on the node owning this database | | shared_state | The internal state data on the node owning this database | ### __init__ Initialize the helper classes for roles and sizes - attribute values are defined in the derived classes **Parameters:** - **node** – Node to which the database belongs ### dynamic_attribute_data Gets the dynamic attribute data class stored on each node for a given port type **Parameters:** - **node** – Node on which the dynamic attributes should be found - **port_type** – Port type for the dynamic attributes to retrieve **Returns:** - Interface to the dynamic attributes on the given node **Return type:** - DynamicAttributeInterface ### get_internal_state ### Database Methods #### get_internal_state(node: Node, inst_id: str) Returns the internal state information on the node, or None if it does not exist. **Parameters:** - **node** – Node for which the internal state is to be retrieved **Returns:** - Internal state object attached to the given node **Return type:** - Any #### get_metadata(metadata_key: str, attribute: Optional[Attribute] = None) Get metadata related to this node. **Parameters:** - **metadata_key** – Name of the metadata value to return - **attribute** – Attribute on which the metadata lives. If None then look at the node type’s metadata **Returns:** - Metadata value string, or None if the named metadata key did not exist **Return type:** - str | None #### get_variable(name: str) Get the value of a variable with a given name. Returns None if the variable does not exist on the graph. **Parameters:** - **name** – Name of the variable to retrieve **Returns:** - Value of the variable, or None if it does not exist on this node’s graph **Return type:** - Any #### log_error(message: str) Logs an error message. **Parameters:** - **message** – The error message to log ### log_error Log an error message from a compute method, for when the compute data is inconsistent or unexpected. **Parameters** - **message** – Text of the message to log - **add_context** – If True then add the stack trace from the location of the log report ### log_info Log an information message from a compute method, when status information is required about the compute. Usually the compute will be successful, the information is for debugging or analysis. **Parameters** - **message** – Text of the message to log ### log_warn Log a warning message from a compute method, when the compute is consistent but produced no results. This method is identical to log_warning; both exist because there are different conventions in other code about which name to use, so to avoid wasted developer time fixing unimportant incorrect guesses both are implemented. **Parameters** - **message** – Text of the message to log ### log_warning Log a warning message from a compute method, when the compute is consistent but produced no results. This method is identical to log_warn; both exist because there are different conventions in other code about which name to use, so to avoid wasted developer time fixing unimportant incorrect guesses both are implemented. **Parameters** - **message** – Text of the message to log ### move Deprecated function. Will perform a copy instead of moving. **Parameters** - **dst** – Attribute - **src** – Attribute ### per_instance_internal_state(node: Node) Returns the internal state information on the node, or None if it does not exist **Parameters** - **node** – Node for which the internal state is to be retrieved **Returns** - Internal state object attached to the given node **Return type** - Any ### per_node_data(node: Node) Returns the per-node data for the given node **Parameters** - **node** – OmniGraph node for which the data is to be retrieved **Raises** - **og.OmniGraphError** – If the per-node data is missing, most likely because the node is not initialized ### per_node_errors(node: Node) Returns the compute errors on the node, or [] if it does not exist **Parameters** - **node** – Node for which the errors are to be retrieved **Returns** - List of errors reported on the node **Return type** - list[str] ### set_dynamic_attribute_memory_location(on_gpu: bool, gpu_ptr_kind: ~omni.graph.core._omni_graph_core.PtrToPtrKind = <PtrToPtrKind.NA: 0>) Set the memory location from which dynamic attribute values will be retrieved **Parameters** - **on_gpu** – If true the data will be returned from GPU memory, else from CPU memory - **gpu_ptr_kind** – (Default is <PtrToPtrKind.NA: 0>) **gpu_ptr_kind** – Ignored for CPU memory. For GPU memory specifies whether attribute data will be returned as a GPU pointer to the GPU memory, or a CPU pointer to the GPU memory. ## set_variable ```python set_variable(name: str, value: Any) ``` Set the value of a variable. `og.OmniGraphError` will be raised if the variable does not exist on the graph, or if there is type mismatch. ### Parameters - **name** – Name of the variable to set - **value** – New value for the variable ### Raises - **OmniGraphError** – If the variable did not exist or could not be set ## shared_internal_state ```python classmethod shared_internal_state(node: Node) ``` Returns the internal state information on the node, or None if it does not exist. ### Parameters - **node** – Node for which the internal state is to be retrieved ### Returns - Internal state object attached to the given node ### Return type - Any ## INTERFACE ```python INTERFACE = {} ``` Attribute interface definition - things that don’t change between nodes of the same type. ## PER_NODE_DATA ```python PER_NODE_DATA = {} ``` Dictionary for data that is different on every node of the same type. ## ROLE_BUNDLE DEPRECATED - use `omni.graph.core.AttributeRole.BUNDLE` ## ROLE_COLOR DEPRECATED - use `omni.graph.core.AttributeRole.COLOR` ## ROLE_EXECUTION DEPRECATED - use `omni.graph.core.AttributeRole.EXECUTION` ## ROLE_FRAME DEPRECATED - use `omni.graph.core.AttributeRole.FRAME` - **ROLE_FRAME** - DEPRECATED - use omni.graph.core.AttributeRole.FRAME - **ROLE_MATRIX** - DEPRECATED - use omni.graph.core.AttributeRole.MATRIX - **ROLE_NORMAL** - DEPRECATED - use omni.graph.core.AttributeRole.NORMAL - **ROLE_OBJECT_ID** - DEPRECATED - use omni.graph.core.AttributeRole.OBJECT_ID - **ROLE_PATH** - DEPRECATED - use omni.graph.core.AttributeRole.PATH - **ROLE_POINT** - DEPRECATED - use omni.graph.core.AttributeRole.POSITION - **ROLE_QUATERNION** - DEPRECATED - use omni.graph.core.AttributeRole.QUATERNION - **ROLE_TARGET** - DEPRECATED - use omni.graph.core.AttributeRole.TARGET - **ROLE_TEXCOORD** - DEPRECATED - use omni.graph.core.AttributeRole.TEXCOORD - **ROLE_TIMECODE** - DEPRECATED - use omni.graph.core.AttributeRole.TIMECODE - **ROLE_TRANSFORM** - DEPRECATED - use omni.graph.core.AttributeRole.FRAME - **ROLE_VECTOR** - DEPRECATED - use omni.graph.core.AttributeRole.VECTOR - **abi_context** - The graph context to which this database belongs - Type: GraphContext - **abi_node** - The node to which this database belongs - Type: Node ## Node ### internal_state property internal_state The internal state data on the node owning this database Type: Any ### per_instance_state property per_instance_state The internal state data on the node owning this database Type: Any ### shared_state property shared_state The internal state data on the node owning this database Type: Any
omni.graph.core.DataView.md
# DataView ## DataView Helper class for getting and setting attribute data values. The setting operation is undoable. Interfaces: - force_usd_update - get - get_array_size - gpu_ptr_kind - set All of the interface functions can either be called from an instantiation of this object or from a class method of the same name with an added attribute parameter that tells where to get and set values. ### Methods - **__init__(*args, **kwargs)** - Initializes the data view class to prepare it for evaluating or setting an attribute value. The arguments are flexible so that you can either construct an object that will persist its settings across all method calls, or you can pass in overrides to the method calls to use instead. - **force_usd_update([force_update])** - [Description not provided] - **get(*args, **kwargs)** - Returns the current value on the owned attribute. - **get_array_size(*args, **kwargs)** - Returns the current number of array elements on the owned attribute. - **set(*args, **kwargs)** - [Description not provided] ### Attributes | Attribute | Description | |--------------------------|-----------------------------------------------------------------------------------------------| | `gpu_ptr_kind` | The memory location of pointers to GPU arrays | ### DataView Class Methods #### `__init__(*args, **kwargs)` Initializes the data view class to prepare it for evaluating or setting an attribute value. The arguments are flexible so that you can either construct an object that will persist its settings across all method calls, or you can pass in overrides to the method calls to use instead. In the case of class method calls, the values passed in will be the only ones used. The “attribute” value can be used by keyword or positionally. All other arguments must specify their keyword. ```python og.Controller(update_usd=True) # Good og.Controller("inputs:attr") # Good og.Controller(update_usd=True, attribute="inputs:attr") # Good og.Controller("inputs:attr", True) # Bad ``` **Parameters:** - **attribute** – (AttributeWithValue_t) Description of an attribute object with data that can be accessed - **update_usd** – (bool) Should the modification to the value immediately update the USD? Defaults to True - **undoable** – (bool) Is the modification to the value undoable? Defaults to True - **on_gpu** – (bool) Is the data being modified on the GPU? Defaults to True - **gpu_ptr_kind** – (og.PtrToPtrKind) How should GPU array data be returned? Defaults to True - **instance** – (int) When working with instantiated graphs, an index representing the instance #### `get(*args, **kwargs)` Returns the current value on the owned attribute. This function can be called either from the class or using an instantiated object. The first argument is mandatory, being either the class or object. All others are by keyword or by position 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** – Attribute whose value is to be retrieved. If used in an object context and a value was provided in the constructor then this value overrides that value. It’s mandatory, so if it was not provided in the constructor or here then an error is raised. - **on_gpu** – Is the value stored on the GPU? - **reserved_element_count** – For array attributes, if not None then the array will pre-reserve this many elements - **return_type** – (Type) The type of the return value <details> <summary>展开查看转换后的markdown格式数据</summary> ### Attributes - **array_wrap** - For array attributes this specifies how the return data is to be wrapped. - **gpu_ptr_kind** - Type of data to return for GPU arrays (only used if on_gpu=True) - **instance** - When working with instantiated graphs, an index representing the instance ### Raises - **OmniGraphError** - If the current attribute is not valid or its value could not be retrieved ### get_array_size(*args, **kwargs) - Returns the current number of array elements on the owned attribute. - 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 get_array_size() was called - **attribute** - Attribute whose size is to be retrieved. If used in an object context and a value was provided in the constructor then this value overrides that value. It’s mandatory, so if it was not provided in the constructor or here then an error is raised. #### Raises - **OmniGraphError** - If the current attribute is not valid or is not an array type ### set(*args, **kwargs) - Sets the current value on the owned attribute. This is an undoable action. - This function can be called either from the class or using an instantiated object. Both the attribute and value argument are mandatory and will raise an error if omitted. The attribute value may optionally be set through the constructor instead, if this function is called from an object context. These arguments may be set positionally or by keyword. The remaining arguments are optional but must be specified by keyword only. In an object context the defaults will be taken from the constructor, else they will use the function defaults. #### Example ```python og.Controller.set("inputs:attr", new_value) # Good og.Controller("inputs:attr").set(new_value) # Good og.Controller.set("inputs:attr") # Bad - missing value og.Controller.set("inputs:attr", new_value, undoable=False) # Good og.Controller("inputs:attr", undoable=False).set(new_value) # Good ``` #### Parameters - **obj** - Either cls or self depending on how the function was called - **attribute** - Attribute whose value is to be set. If used in an object context and a value was provided ``` </details> - **set_attribute**(*attribute_name*, *value*, *on_gpu=False*, *update_usd=False*, *undoable=True*, *gpu_ptr_kind=None*) - **attribute_name** – The name of the attribute to set. It’s mandatory, so if it was not provided in the constructor or here then an error is raised. - **value** – The new value for the attribute. It’s mandatory, so if it was not provided in the constructor or here then an error is raised. - **on_gpu** – Is the value stored on the GPU? - **update_usd** – Should the value immediately propagate to USD? - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten - **gpu_ptr_kind** – Type of data to expect for GPU arrays (only used if on_gpu=True) - **Returns** - True if the value was set successfully - **Return type** - bool - **Raises** - **OmniGraphError** – If the current attribute is not valid or could not be set to the given value - **gpu_ptr_kind** : PtrToPtrKind - The memory location of pointers to GPU arrays - **Type** - PtrToPtrKind
omni.graph.core.DataWrapper.md
# DataWrapper ## DataWrapper Wrapper around typed memory data. This class provides no functionality for manipulating the data, only for inspecting it and extracting it for other code to manipulate it. e.g. you could extract CPU data as a numpy array and modify values, though you cannot change its size, or you could extract the pointer to the GPU data for passing in to a GPU-aware package like TensorFlow. External functions will perform these conversions. ### Attributes - **memory**: Address of the data in the memory space - **dtype**: Data type information for the individual data elements - **shape**: Shape of the data ### shape Array shape of the memory ### device Device on which the memory is located. ### gpu_ptr_kind Arrays of GPU pointers can either be on the GPU or the CPU, depending on where you want to reference them. If the shape is an array and device is cuda then this tells where ‘memory’ lives ### Methods | Method | Description | |--------|-------------| | `__init__(memory, dtype, shape, device[, ...])` | Sets up the wrapper for the passed-in data. | | `is_array()` | Checks to see if the data wrapped type is an array | #### __init__(memory, dtype, shape, device[, gpu_ptr_kind=PtrToPtrKind.NA: 0]) Sets up the wrapper for the passed-in data. **Parameters:** - **memory** – Integer containing the memory address of the data - **dtype** – Data type of the referenced data - **shape** – Array shape of the referenced data - **device** – Device on which the memory is located. - **gpu_ptr_kind** – Location of pointers that point to GPU arrays #### is_array() Checks to see if the data wrapped type is an array **Returns:** - True iff the data shape indicates that it is an arbitrary sized array of some kind **Return type:** - bool
omni.graph.core.data_shape_from_type.md
# data_shape_from_type ## data_shape_from_type Return the dtype,shape information that corresponds to the given attribute type. For easy testing gather sizes are set to 2 items and array sizes are set to 0 elements. e.g. a gathered bool[] would return a shape of ((0, 0)) **Parameters** - **attribute_type** – Type from which to infer the shape - **is_gathered** – Is the data shape for an array of the attribute type? **Returns** Data type and shape corresponding to the attribute type **Return type** (Dtype, DataWrapperShapeTypes)
omni.graph.core.deregister_node_type.md
# deregister_node_type **Permalink to this heading** ## deregister_node_type **Permalink to this definition** **omni.graph.core.deregister_node_type**(name: str) → bool Deregisters a python subnode type with OmniGraph. **Parameters:** - **name** (str) – Name of the Python node type being deregistered **Returns:** - True if the deregistration was successful, else False **Return type:** - bool
omni.graph.core.deregister_post_load_file_format_upgrade_callback.md
# deregister_post_load_file_format_upgrade_callback ## deregister_post_load_file_format_upgrade_callback ```python def deregister_post_load_file_format_upgrade_callback(postload_handle: int) -> None: ``` De-registers the postload callback to be invoked when the file format version changes. **Parameters:** - **postload_handle** (int) – The handle that was returned during the register_post_load_file_format_upgrade_callback call
omni.graph.core.deregister_pre_load_file_format_upgrade_callback.md
# deregister_pre_load_file_format_upgrade_callback ## deregister_pre_load_file_format_upgrade_callback ```python omni.graph.core.deregister_pre_load_file_format_upgrade_callback(preload_handle: int) -> None ``` De-registers the preload callback to be invoked when the file format version changes. ### Parameters - **preload_handle** (int) – The handle that was returned during the register_pre_load_file_format_upgrade_callback call
omni.graph.core.detach.md
# detach ## detach Detaches the graph from the currently attached stage.
omni.graph.core.developer_mode_active.md
# developer_mode_active ## developer_mode_active ```python omni.graph.core.developer_mode_active(ext_name: str) -> tuple[bool, list[str]] ``` Check to see if AutoNode developer mode is active on the given extension: :param ext_name: Name of the extension to check **Returns** - is the extension in developer mode?, list[str]: List of import paths specified) **Return type** - (bool ```
omni.graph.core.Device.md
# Device ## Device ```python class omni.graph.core.Device(device_name: str) ``` Bases: `object` Device type for memory location of the data types ### Methods | Method | Description | |--------|-------------| | `__init__(device_name)` | Initialize the device with the given name | ### Attributes | Attribute | Description | |-----------|-------------| | `cpu` | Is the device a CPU? | | `cuda` | Is the device a GPU programmed with CUDA? | ```python def __init__(device_name: str): Initialize the device with the given name ``` ```python cpu: bool cuda: bool ``` ### Device Properties #### cpu - **Description**: Is the device a CPU? - **Type**: bool #### cuda - **Description**: Is the device a GPU programmed with CUDA? - **Type**: bool
omni.graph.core.Dtype.md
# Dtype ## Dtype ```python class omni.graph.core.Dtype(tuple_count: Optional[int] = None, size: Optional[int] = None, base_type: Optional[BaseDataType] = None, ctype: Optional[object] = None) ``` ``` ``` - `tuple_count`: Optional[int] = None - `size`: Optional[int] = None - `base_type`: Optional[BaseDataType] = None - `ctype`: Optional[object] = None ``` ## Attributes - **tuple_count** - The number of atomic elements in this type - Type: int - **size** - The total size in bytes of this type - Type: int - **base_type** - The base data type of this type - Type: omni.graph.core._omni_graph_core.BaseDataType - **ctype** - The ctypes representation used by this data type in Fabric - Type: object ## Methods - **__init__**([tuple_count, size, base_type, ctype]) - **is_matrix_type**() - Returns true if the dtype is a matrix. ## Attributes - **base_type** - **ctype** - **size** - **tuple_count** ### Dtype Class #### `__init__(self, name: Optional[str] = None, base_type: Optional[BaseDataType] = None, ctype: Optional[object] = None)` - **Parameters**: - `name`: Optional[str] = None - `base_type`: Optional[BaseDataType] = None - `ctype`: Optional[object] = None - **Returns**: None #### `is_matrix_type()` - **Returns**: bool - **Description**: Returns true if the dtype is a matrix. Uses derived class knowledge to keep it simple.
omni.graph.core.DynamicAttributeAccess.md
# DynamicAttributeAccess ## DynamicAttributeAccess ``` class omni.graph.core.DynamicAttributeAccess(context_id: GraphContext, node: Node, attributes, dynamic_attributes: DynamicAttributeInterface) ``` Bases: `object` Base class for the generated classes that contain the access properties for all attributes. Each of the port containers, db.inputs/db.outputs/db.state, houses the attribute data access properties. These containers are constructed when the database is created, with hardcoded properties for all statically defined attributes. This class intercepts getattr/setattr/delattr calls to check to see if the property being requested is a dynamic attribute, and if so then it uses the properties stored in the per-node data as the access points. So the lookup sequence goes like this: - db -> og.Database - .inputs -> ValuesForInput(DynamicAttributeAccess) - .myAttribute -> DynamicAttributeAccess.__getattr__ -> ValuesForInput.__getattr__ (if the above fails) It makes the bold assumption that the attributes are all set up nicely; no duplicate names, invalid types, missing configuration, etc. Attributes use leading underscores to minimize name collisions with the dynamically added attributes. (Double underscores would have been preferable but would have made access from the derived classes problematic.) ``` ### Attributes #### _context Graph context used for evaluating this node #### _node The OmniGraph node to which this data belongs #### _attributes The set of attributes on this object’s port #### _dynamic_attributes Container holding the per-node specification of dynamic attributes, not visible to derived classes ### Methods | Method | Description | |--------|-------------| | `__init__(context_id, node, attributes, dynamic_attributes)` | Initialize common data used for all attribute port types | | `get_dynamic_attributes()` | Get the interface to the dynamic attributes | #### __init__(context_id, node, attributes, dynamic_attributes) Initialize common data used for all attribute port types **Parameters:** - `context_id`: Context of the evaluation - `node`: Node owning the attribute - `attributes`: List of attributes belonging to this accessor - `dynamic_attributes`: Interface to the dynamic attributes #### get_dynamic_attributes() Get the interface to the dynamic attributes **Returns:** - Direct access to the dynamic attributes managed by this class </dt> <dd> <p> avoiding the __getattr__ override </p> </dd> </dl> </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> DynamicAttributeInterface </p> </dd> </dl> </dd> </dl> </dd> </dl> </section> </div> </div> <footer> <hr/> </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script>
omni.graph.core.DynamicAttributeInterface.md
# DynamicAttributeInterface ## DynamicAttributeInterface Class providing a container for dynamic attribute access interfaces. One of these objects is created per-node, per-port, to contain getter and setter properties on dynamic attributes for their node and port type. These classes persist in the per-node data and their property members are updated based on the addition and removal of dynamic attributes from their node. The base class implementation for the attribute accessors, DynamicAttributeAccess, uses this to determine whether an attribute access request was made on a static or dynamic attribute. The per-node data on the database will contain one of these objects per port-type. When the database is created it will be attached to the primary attribute access classes via the base class below, DynamicAttributeAccess. ### _port_type Type of port managed by this class (only one allowed per instance). Single underscore only so that the base class of the attribute information can access it. ### _element_counts Dictionary of str:int values which maps the names of dynamic output array attributes to the of pending elements to allocate for their array data (required since Fabric takes the element counter as an argument to the data retrieval so it can’t be set ahead of time). It is set when a size is set, reset when a value is set, and read from Fabric when it’s value is requested. The key values will be the special attribute name that has “_size” appended to it (until such time as the attribute value can support size access itself). ### _interfaces Dictionary of str:og.Attribute values which maps the names of a dynamic attribute to the actual attribute on the node. ### Attributes #### _on_gpu If True then values are requested from the GPU memory, else the CPU memory #### _gpu_ptr_kind Ignored for CPU memory. For GPU memory specifies whether attribute data will be returned as a GPU pointer to the GPU memory, or a CPU pointer to the GPU memory. ### Methods #### __init__(port_type) Initialize the namespace used for attributes managed here #### add_attribute(new_attribute) Add in the interface for a newly created attribute. #### get(property_name) Returns the value of the named attribute #### has_attribute(property_name) Returns True if the given property name is a known dynamic attribute on this object #### remove_attribute(old_attribute) Remove the interface for a newly deleted attribute #### set(property_name[, locked, new_value]) Sets the value of the named attribute #### set_default_memory_location(on_gpu[, ...]) Set the default memory location from which dynamic attribute values will be retrieved. #### __init__(port_type: AttributePortType) Initialize the namespace used for attributes managed here - Parameters: - **port_type** – Port type for the dynamic attribute #### add_attribute(new_attribute: Attribute) Add in the interface for a newly created attribute. - This creates a new attribute on this object named for the new attribute. The value of that attribute is a pair of functions that will get and set the value for that attribute. Parameters ---------- new_attribute - Attribute that was just added Raises ------ og.OmniGraphError - If the attribute has a mismatched port type get --- get(property_name: str) -> Any Returns the value of the named attribute Parameters ---------- property_name - Name of the property within the namespace of this object’s port type Returns ------- Value of the attribute’s data Return type ----------- Any Raises ------ og.OmniGraphError - If the attribute is unknown has_attribute ------------- has_attribute(property_name: str) -> bool Returns True if the given property name is a known dynamic attribute on this object Parameters ---------- property_name - Name of the property to look for Returns ------- True if a dynamic attribute of the given name exists here Return type ----------- bool remove_attribute ---------------- remove_attribute(old_attribute: Attribute) Remove the interface for a newly deleted attribute Parameters ---------- old_attribute - Attribute that is about to be removed Raises ------ og.OmniGraphError - If the attribute has a mismatched port type, or the property didn’t exist set --- set(property_name: str, locked: bool = False, new_value) Sets the attribute with the given name and value, and optionally locks it Parameters ---------- property_name - Name of the property to set locked - If True, the attribute will be locked and cannot be modified new_value - The new value for the attribute <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> Sets the value of the named attribute </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> property_name </strong> – Name of the property within the namespace of this object’s port type </p> </li> <li> <p> <strong> locked </strong> – True if setting read-only values is currently locked (i.e. inside a compute) </p> </li> <li> <p> <strong> new_value </strong> – Value to be set on the attribute with the given name </p> </li> </ul> </dd> <dt class="field-even"> Raises </dt> <dd class="field-even"> <ul class="simple"> <li> <p> <strong> og.OmniGraphError </strong> – If the attribute is unknown </p> </li> <li> <p> <strong> og.ReadOnlyError </strong> – If writing is locked and the attribute is read-only </p> </li> </ul> </dd> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> True if the value was set </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> bool </p> </dd> </dl> </dd> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.DynamicAttributeInterface.set_default_memory_location"> <span class="sig-name descname"> <span class="pre"> set_default_memory_location </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> on_gpu: </span> <span class="pre"> bool </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> gpu_ptr_kind: </span> <span class="pre"> ~omni.graph.core._omni_graph_core.PtrToPtrKind </span> <span class="pre"> = </span> <span class="pre"> &lt;PtrToPtrKind.NA: </span> <span class="pre"> 0&gt; </span> </span> </em> <span class="sig-paren"> ) </span> </dt> <dd> <p> Set the default memory location from which dynamic attribute values will be retrieved. This is what will be used if you access dynamic attribute values in the same way you access regular attribute values - e.g. value = db.inputs.dyn_attr. </p> <p> The settings of the two flags will determine the type of memory returned for array attributes, such as float[], double[3][], and matrixd[4][], and non-array attributes such as int[4], uint, and bool. </p> <p> Array attributes </p> <table> <colgroup> <col style="width: 28%"/> <col style="width: 36%"/> <col style="width: 36%"/> </colgroup> <thead> <tr> <th> </th> <th> on_gpu=True </th> <th> on_gpu=False </th> </tr> </thead> <tbody> <tr> <td> og.PtrToPtrKind.CPU </td> <td> CPU Pointers to GPU arrays </td> <td> CPU Pointers to CPU arrays </td> </tr> <tr> <td> og.PtrToPtrKind.GPU </td> <td> GPU Pointers to GPU arrays </td> <td> CPU Pointers to CPU arrays </td> </tr> <tr> <td> og.PtrToPtrKind.NA </td> <td> GPU Pointers to GPU arrays </td> <td> CPU Pointers to CPU arrays </td> </tr> </tbody> </table> <p> Non-Array attributes are always returned as CPU values. </p> <p> There is currently no supported way of overriding these access methods. If not specified they will default to everything being on the CPU. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> on_gpu </strong> – If true then array attributes will be returned from GPU memory, else from CPU memory </p> </li> <li> <p> <strong> gpu_ptr_kind </strong> – Determines if there is a CPU memory wrapper around the GPU allocated memory, as above. </p> </li> </ul> </dd> </dl> </dd> </dl>
omni.graph.core.eAccessLocation.md
# eAccessLocation ## eAccessLocation Bases: `pybind11_object` What type of non-attribute data does this node access Members: - E_USD : Accesses the USD stage data - E_GLOBAL : Accesses data that is not part of the node or node type - E_STATIC : Accesses data that is shared by every instance of a particular node type - E_TOPOLOGY : Accesses information on the topology of the graph to which the node belongs ### Methods - `__init__(self, value)` ### Attributes - `E_GLOBAL` - `E_STATIC` - `E_TOPOLOGY` - `E_USD` - `name` - `value` ## Method: __init__ ``` __init__(self: omni.graph.core._omni_graph_core.eAccessLocation, value: int) -> None ## Property: name ``` property name ```
omni.graph.core.eAccessType.md
# eAccessType ## eAccessType ```python class omni.graph.core.eAccessType ``` Bases: `pybind11_object` How does the node access the data described by the enum eAccessLocation Members: - E_NONE: There is no access to data of the associated type - E_READ: There is only read access to data of the associated type - E_WRITE: There is only write access to data of the associated type - E_READ_WRITE: There is both read and write access to data of the associated type ### Methods ```python __init__(self, value) ``` ### Attributes - `E_NONE` - `E_READ` - `E_READ_WRITE` - `E_WRITE` - `name` - `value` ### __init__ __init__(self: omni.graph.core._omni_graph_core.eAccessType, value: int) -> None ### name property name
omni.graph.core.eComputeRule.md
# eComputeRule ## eComputeRule ```python class omni.graph.core.eComputeRule ``` Bases: `pybind11_object` How the node is allowed to be computed Members: - E_DEFAULT : Nodes are computed according to the default evaluator rules - E_ON_REQUEST : The evaluator may skip computing this node until explicitly requested with INode::requestCompute ### Methods ```python __init__(self, value) ``` ### Attributes - `E_DEFAULT` - `E_ON_REQUEST` - `name` - `value` ``` ## __init__ ```python __init__(self: omni.graph.core._omni_graph_core.eComputeRule, value) ``` ``` <em class="sig-param"> <span class="n"> <span class="pre"> value </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> <dt class="sig sig-object py" id="omni.graph.core.eComputeRule.name"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> name </span> </span> </dt>
omni.graph.core.eComputeRule_omni.graph.core.eComputeRule.md
# eComputeRule ## eComputeRule ```python class omni.graph.core.eComputeRule ``` Bases: `pybind11_object` How the node is allowed to be computed Members: - E_DEFAULT : Nodes are computed according to the default evaluator rules - E_ON_REQUEST : The evaluator may skip computing this node until explicitly requested with INode::requestCompute ### Methods ```python __init__(self, value) ``` ### Attributes - `E_DEFAULT` - `E_ON_REQUEST` - `name` - `value` ``` </em> , <em class="sig-param"> <span class="n"> <span class="pre"> value </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.graph.core.eComputeRule.name"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> name </span> </span> </dt> <dd> </dd> </dl> </dd> </dl> </section> </div> </div> <footer> <hr/> </footer> </div> </div>
omni.graph.core.ePurityStatus.md
# ePurityStatus ## ePurityStatus - **Bases**: `pybind11_object` The purity of the node implementation. For some context, a “pure” node is one whose initialize, compute, and release methods are entirely deterministic, i.e. they will always produce the same output attribute values for a given set of input attribute values, and do not access, rely on, or otherwise mutate data external to the node’s scope. ### Members - **E_IMPURE**: Node is assumed to not be pure - **E_PURE**: Node can be considered pure if explicitly specified by the node author ### Methods - `__init__(self, value)` ### Attributes - **E_IMPURE** - **E_PURE** - `name` - `value` ``` <span class="pre"> omni.graph.core._omni_graph_core.ePurityStatus </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> value </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> <a class="headerlink" href="#omni.graph.core.ePurityStatus.__init__" title="Permalink to this definition">  </a> </dt> <dd> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.graph.core.ePurityStatus.name"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> name </span> </span> <a class="headerlink" href="#omni.graph.core.ePurityStatus.name" title="Permalink to this definition">  </a> </dt> <dd> </dd> </dl> </dd> </dl> </section> </div> </div> <footer> <hr/> </footer> </div> </div> </section> </div> <script> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script>
omni.graph.core.ePurityStatus_omni.graph.core.ePurityStatus.md
# ePurityStatus ## ePurityStatus - **Bases**: `pybind11_object` - **Description**: The purity of the node implementation. For some context, a “pure” node is one whose initialize, compute, and release methods are entirely deterministic, i.e. they will always produce the same output attribute values for a given set of input attribute values, and do not access, rely on, or otherwise mutate data external to the node’s scope. - **Members**: - `E_IMPURE`: Node is assumed to not be pure. - `E_PURE`: Node can be considered pure if explicitly specified by the node author. ### Methods - `__init__(self, value)`: ### Attributes - `E_IMPURE` - `E_PURE` - `name` - `value`
omni.graph.core.eThreadSafety.md
# eThreadSafety ## eThreadSafety ```python class omni.graph.core.eThreadSafety ``` Bases: `pybind11_object` How thread safe is the node during evaluation Members: - E_SAFE : Nodes can be evaluated in multiple threads safely - E_UNSAFE : Nodes cannot be evaluated in multiple threads safely - E_UNKNOWN : The thread safety status of the node type is unknown ### Methods - `__init__(self, value)` ### Attributes - `E_SAFE` - `E_UNKNOWN` - `E_UNSAFE` - `name` - `value` ## __init__ ```python __init__(self, value) ``` : omni.graph.core._omni_graph_core.eThreadSafety value : int ) → None property name
omni.graph.core.eVariableScope.md
# eVariableScope ## eVariableScope ``` Bases: `pybind11_object` Scope in which the variable has been made available Members: - E_PRIVATE : Variable is accessible only to its graph - E_READ_ONLY : Variable can be read by other graphs - E_PUBLIC : Variable can be read/written by other graphs ### Methods - `__init__(self, value)` ### Attributes - `E_PRIVATE` - `E_PUBLIC` - `E_READ_ONLY` - `name` - `value` : omni.graph.core._omni_graph_core.eVariableScope , value : int ) → None property name
omni.graph.core.ExecutionAttributeState.md
# ExecutionAttributeState ## Overview Bases: `pybind11_object` Current execution state of an attribute [DEPRECATED: See omni.graph.action.IActionGraph] ### Members - DISABLED : Execution is disabled - ENABLED : Execution is enabled - ENABLED_AND_PUSH : Output attribute connection is enabled and the node is pushed to the evaluation stack - LATENT_PUSH : Push this node as a latent event for the current entry point - LATENT_FINISH : Output attribute connection is enabled and the latent state is finished for this node ### Methods - `__init__(self, value)` ### Attributes - `DISABLED` - `ENABLED` - `ENABLED_AND_PUSH` - `LATENT_FINISH` - `LATENT_PUSH` | name | value | | ---- | ----- | | name | | | value | | __init__(self: omni.graph.core._omni_graph_core.ExecutionAttributeState, value: int) -> None property name
omni.graph.core.ExtendedAttributeType.md
# ExtendedAttributeType ## ExtendedAttributeType - **Bases:** `pybind11_object` - **Description:** Extended attribute type, if any ### Members - `EXTENDED_ATTR_TYPE_REGULAR` : Deprecated: use `og.ExtendedAttributeType.REGULAR` - `EXTENDED_ATTR_TYPE_UNION` : Deprecated: use `og.ExtendedAttributeType.UNION` - `EXTENDED_ATTR_TYPE_ANY` : Deprecated: use `og.ExtendedAttributeType.ANY` - `REGULAR` : Attribute has a fixed data type - `UNION` : Attribute has a list of allowable types of data - `ANY` : Attribute can take any type of data ### Methods - `__init__(self, value)` ### Attributes - `ANY` - `EXTENDED_ATTR_TYPE_ANY` - `EXTENDED_ATTR_TYPE_REGULAR` - `EXTENDED_ATTR_TYPE_UNION` - `REGULAR` - `UNION`
omni.graph.core.ExtensionInformation.md
# ExtensionInformation ## Public Interface - get_node_types_by_extension() - get_nodes_by_extension() ## Methods ### `__init__()` - Initialize the caches to be empty ### `get_node_types_by_extension()` - Returns a tuple of two dictionaries. ### `get_nodes_by_extension()` - Returns a tuple of three dictionaries. ## Attributes ### `KEY_UNKNOWN_EXTENSION` ## get_node_types_by_extension ``` ```python get_node_types_by_extension() -> Dict[str, List[str]] ``` Returns a tuple of two dictionaries. The first is the dictionary of enabled extensions to the list of nodes in the scene whose node types they implement, the second is the same thing for disabled extensions. ## get_nodes_by_extension ```python get_nodes_by_extension() -> Tuple[Dict[str, List[str]], Dict[str, List[str]]] ``` Returns a tuple of three dictionaries. - Map of enabled extensions to the list of nodes in the scene whose node types they implement - Map of disabled extensions to the list of nodes in the scene whose node types they implement
omni.graph.core.FileFormatVersion.md
# FileFormatVersion ## FileFormatVersion - **Bases**: `pybind11_object` - **Description**: Version number for the OmniGraph file format ### Methods - `__init__(self, major_version, minor_version)` - **Description**: Set up the values defining the file format version ### Attributes - `majorVersion` - **Description**: Major version, introduces incompatibilities - `minorVersion` - **Description**: Minor version, introduces compatible changes only #### `__init__` Method - **Parameters**: - `self` : `omni.graph.core._omni_graph_core.FileFormatVersion` - `major_version` : `int` - `minor_version` : `int` ### omni.graph.core.FileFormatVersion.__init__ **Parameters** - **major_version** (int) – Major version, introduces incompatibilities - **minor_version** (int) – Minor version, introduces compatible changes only #### Description Set up the values defining the file format version ### omni.graph.core.FileFormatVersion.majorVersion **Description** Major version, introduces incompatibilities ### omni.graph.core.FileFormatVersion.minorVersion **Description** Minor version, introduces compatible changes only
omni.graph.core.FunctionResult.md
# FunctionResult ## FunctionResult ``` class omni.graph.core.FunctionResult ``` Bases: pybind11_object Value indicating whether a function call succeeded Members: - FAILURE : The function call failed - SUCCESS : The function call succeeded - DEFERRED : The action invoked by the function call has been deferred ### Methods - __init__(self, value) ### Attributes - DEFERRED - FAILURE - SUCCESS - name - value __init__(self, value) <em class="sig-param"> <span class="n"> <span class="pre"> omni.graph.core._omni_graph_core.FunctionResult </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> value </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.graph.core.FunctionResult.name"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> name </span> </span> </dt> <dd> </dd> </dl> </dd> </dl> </section> </div> </div> <footer> <hr/> </footer>
omni.graph.core.Functions.md
# omni.graph.core Functions ## Functions Summary: | Function 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 | | | Function Name | Description | |---------------|-------------| | 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.get_all_graphs.md
# get_all_graphs ## get_all_graphs ```python omni.graph.core.get_all_graphs() -> List[omni.graph.core._omni_graph_core.Graph] ``` Get all of the top-level non-orchestration graphs **Returns:** A list of the top level graphs (non-orchestration) in OmniGraph. **Return type:** list[omni.graph.core.Graph] ```
omni.graph.core.get_all_graphs_and_subgraphs.md
# get_all_graphs_and_subgraphs  ## get_all_graphs_and_subgraphs → List[omni.graph.core._omni_graph_core.Graph] ### Description Get all of the non-orchestration graphs ### Returns - A list of the (non-orchestration) in OmniGraph. ### Return type - list[omni.graph.core.Graph]
omni.graph.core.get_bundle_tree_factory_interface.md
# get_bundle_tree_factory_interface ## get_bundle_tree_factory_interface ```python omni.graph.core.get_bundle_tree_factory_interface() ``` Gets an object that can interface with an IBundleFactory **Returns:** Object that can interface with the bundle tree **Return type:** [omni.graph.core.IBundleFactory](omni.graph.core.IBundleFactory.html#omni.graph.core.IBundleFactory) ```
omni.graph.core.get_compute_cuda_device.md
# get_compute_cuda_device ## get_compute_cuda_device ```python omni.graph.core.get_compute_cuda_device() -> int ``` Gets the CUDA device ID used by OmniGraph. - **Returns**: The CUDA device used by OmniGraph. - **Return type**: int ```
omni.graph.core.get_compute_graph_contexts.md
# get_compute_graph_contexts ## get_compute_graph_contexts ```python omni.graph.core.get_compute_graph_contexts() -> List[omni.graph.core.GraphContext] ``` Gets all of the current graph contexts **Returns:** A list of all graph contexts in OmniGraph. **Return type:** list[omni.graph.core.GraphContext] ```
omni.graph.core.get_global_orchestration_graphs.md
# get_global_orchestration_graphs ## get_global_orchestration_graphs ```python omni.graph.core.get_global_orchestration_graphs() -> List[omni.graph.core._omni_graph_core.Graph] ``` Gets the global orchestration graphs **Returns:** A list of the global orchestration graphs that house all other graphs. **Return type:** list[omni.graph.core.Graph] ```
omni.graph.core.get_global_orchestration_graphs_in_pipeline_stage.md
# get_global_orchestration_graphs_in_pipeline_stage ## get_global_orchestration_graphs_in_pipeline_stage ```python omni.graph.core.get_global_orchestration_graphs_in_pipeline_stage(pipeline_stage: omni.graph.core.GraphPipelineStage) -> List[omni.graph.core.Graph] ``` Returns a list of the global orchestration graphs that house all other graphs for a given pipeline stage. **Parameters:** - **pipeline_stage** (`omni.graph.core.GraphPipelineStage`) – The pipeline stage in question **Returns:** - A list of the global orchestration graphs in the given pipeline stage **Return type:** - list[`omni.graph.core.Graph`] ```
omni.graph.core.get_graphs_in_pipeline_stage.md
# get_graphs_in_pipeline_stage  ## get_graphs_in_pipeline_stage  ### omni.graph.core.get_graphs_in_pipeline_stage → List[omni.graph.core._omni_graph_core.Graph] #### Parameters - **pipeline_stage** (omni.graph.core.GraphPipelineStage) – The pipeline stage in question #### Returns - The list of graphs belonging to the pipeline stage #### Return type - list[omni.graph.core.Graph]
omni.graph.core.get_graph_by_path.md
# get_graph_by_path ## get_graph_by_path ```python omni.graph.core.get_graph_by_path(path: str) -> object ``` Finds the graph with the given path. ### Parameters - **path** (str) – The path of the graph. For example “/World/PushGraph” ### Returns - The matching graph, or None if it was not found. ### Return type - [omni.graph.core.Graph](omni.graph.core.Graph.html#omni.graph.core.Graph) ```
omni.graph.core.get_graph_settings.md
# get_graph_settings  ## get_graph_settings  ### get_graph_settings  #### get_graph_settings  ##### get_graph_settings  ###### get_graph_settings  ####### get_graph_settings  ###### get_graph_settings  ##### get_graph_settings  #### get_graph_settings  ### get_graph_settings  ## get_graph_settings  # get_graph_settings 
omni.graph.core.get_kit_version.md
# get_kit_version Returns the currently running version of Kit as a tuple of (major, minor) numbers. ## Returns - Major, minor version of Kit running, or (0, 0) if the Kit version could not be determined. ## Return type - (int, int)
omni.graph.core.get_node_by_path.md
# get_node_by_path ## get_node_by_path ```python omni.graph.core.get_node_by_path(path: str) -> object ``` Get a node that lives at a given path **Parameters:** - **path** (str) – Path at which to find the node **Returns:** - The node corresponding to a node path in OmniGraph, None if no node was found at that path. **Return type:** - [omni.graph.core.Node](omni.graph.core.Node.html#omni.graph.core.Node)
omni.graph.core.get_node_categories_interface.md
# get_node_categories_interface ## get_node_categories_interface ```python omni.graph.core.get_node_categories_interface() ``` - **Returns**: Object that can interface with the category data - **Return type**: [omni.graph.core.INodeCategories](omni.graph.core.INodeCategories.html#omni.graph.core.INodeCategories) Gets an object for accessing the node categories
omni.graph.core.get_node_type.md
# get_node_type  ## get_node_type  ### omni.graph.core.get_node_type  Returns the registered node type object with the given name. #### Parameters - **node_type_name** (str) – Name of the registered NodeType to find and return #### Returns - NodeType object registered with the given name, None if it is not registered #### Return type - [omni.graph.core.NodeType](omni.graph.core.NodeType.html#omni.graph.core.NodeType)
omni.graph.core.get_node_type_forwarding_interface.md
# get_node_type_forwarding_interface ## get_node_type_forwarding_interface ```python omni.graph.core.get_node_type_forwarding_interface() ``` - **Deprecated:** Use `get_node_type_forwarding_interface2()` instead.
omni.graph.core.get_node_type_forwarding_interface2.md
# get_node_type_forwarding_interface2 ## get_node_type_forwarding_interface2 ```python omni.graph.core.get_node_type_forwarding_interface2() ``` - **Returns**: Object that can interface with the node type forward data - **Return type**: [omni.graph.core.INodeTypeForwarding2](#omni.graph.core.INodeTypeForwarding2) Gets an object for accessing the node type forwarding
omni.graph.core.get_port_type_namespace.md
# get_port_type_namespace ## get_port_type_namespace ``` ```markdown omni.graph.core.get_port_type_namespace(port_type: AttributePortType) -> str ``` ```markdown Returns a string representing the namespace attributes of the named port type reside in ```
omni.graph.core.get_registered_nodes.md
# get_registered_nodes ## get_registered_nodes ```python omni.graph.core.get_registered_nodes() -> List[str] ``` Get the currently registered node type names **Returns:** - The list of names of node types currently registered **Return type:** - list[str] ```
omni.graph.core.Graph.md
# Graph ## Class omni.graph.core.Graph **Bases:** `pybind11_object` Object containing everything necessary to execute a connected set of nodes. ### Methods - **`__init__(*args, **kwargs)`** - **`change_pipeline_stage(self, newPipelineStage)`** - Change the pipeline stage that this graph is in (simulation, pre-render, post-render, on-demand) - **`create_graph_as_node(self, name, path, ...)`** - Creates a graph that is wrapped by a node in the current graph. - **`create_node(self, path, node_type, use_usd)`** - Given the path to the node and the type of the node, creates a node of that type at that path. - **`create_subgraph(self, subgraphPath[, ...])`** - Given the path to the subgraph, create the subgraph at that path. - **`create_variable(self, name, type)`** - Creates a variable on the graph. - **deregister_error_status_change_callback** - De-registers the error status change callback to be invoked when the error status of nodes change during evaluation. - **destroy_node**(self, node_path, update_usd) - Given the path to the node, destroys the node at that path. - **evaluate**(self) - Tick the graph by causing it to evaluate. - **find_variable**(self, name) - Find the variable with the given name in the graph. - **get_context**(self) - Gets the context associated to the graph - **get_default_graph_context**(self) - Gets the default context associated with this graph - **get_evaluator_name**(self) - Gets the name of the evaluator being used on this graph - **get_event_stream**(self) - Get the event stream the graph uses for notification of changes. - **get_graph_backing_type**(self) - Gets the data type backing this graph - **get_handle**(self) - Gets a unique handle identifier for this graph - **get_instance_count**(self) - Gets the number of instances this graph has - **get_node**(self, path) - Given a path to the node, returns the object for the node. - **get_nodes**(self) - Gets the list of nodes currently in this graph - **get_owning_compound_node**(self) - Returns the compound node for which this graph is the compound subgraph of. - **get_parent_graph**(self) - Gets the immediate parent graph of this graph | Method | Description | |--------|-------------| | `get_path_to_graph(self)` | Gets the path to this graph | | `get_pipeline_stage(self)` | Gets the pipeline stage to which this graph belongs | | `get_subgraph(self, path)` | Gets the subgraph living at the given path below this graph | | `get_subgraphs(self)` | Gets the list of subgraphs under this graph | | `get_variables(self)` | Returns the list of variables defined on the graph. | | `inspect(self, inspector)` | Runs the inspector on the graph | | `is_auto_instanced(self)` | Returns whether this graph is an auto instance or not. | | `is_compound_graph(self)` | Returns whether this graph is a compound graph. | | `is_disabled(self)` | Checks to see if the graph is disabled | | `is_valid(self)` | Checks to see if the graph object is valid | | `register_error_status_change_callback(self, ...)` | Registers a callback to be invoked after graph evaluation for all the nodes whose error status changed during the evaluation. | | `reload_from_stage(self)` | Force the graph to reload by deleting it and re-parsing from the stage. | | `reload_settings(self)` | Reload the graph settings. | | `remove_variable(self, variable)` | Removes the given variable from the graph. | | `rename_node(self, path, new_path)` | Given the path to the node, renames the node at that path. | | Method | Description | |--------|-------------| | `rename_subgraph(self, path, new_path)` | Renames the path of a subgraph | | `set_auto_instancing_allowed(self, arg0)` | Allows (or not) this graph to be an auto-instance, ie. | | `set_disabled(self, disable)` | Sets whether this graph object is to be disabled or not. | | `set_prim_view(self, view)` | Apply a view to a graph: a view is a way to dynamically maintain a list of instances for a graph. | | `set_usd_notice_handling_enabled(self, enable)` | Sets whether this graph object has USD notice handling enabled. | | `usd_notice_handling_enabled(self)` | Checks whether this graph has USD notice handling enabled. | ### Attributes | Attribute | Description | |-----------|-------------| | `CURRENT_FILE_FORMAT_VERSION` | | | `evaluation_mode` | The evaluation mode sets how the graph will be evaluated. | ### Methods ```python __init__(self, *args, **kwargs) ``` ```python change_pipeline_stage(self, newPipelineStage: omni.graph.core._omni_graph_core.GraphPipelineStage) -> None ``` Change the pipeline stage that this graph is in (simulation, pre-render, post-render, on-demand) Parameters: - `newPipelineStage` (omni.graph.core.GraphPipelineStage) – The new pipeline stage of the graph ``` ## create_graph_as_node ```python create_graph_as_node(self: omni.graph.core._omni_graph_core.Graph, name: str, path: str, evaluator: str, is_global_graph: bool, is_backed_by_usd: bool, backing_type: omni.graph.core._omni_graph_core.GraphBackingType, pipeline_stage: omni.graph.core._omni_graph_core.GraphPipelineStage, evaluation_mode: omni.graph.core._omni_graph_core.GraphEvaluationMode = <GraphEvaluationMode.GRAPH_EVALUATION_MODE_AUTOMATIC: 0>) -> omni.graph.core._omni_graph_core.Node ``` Creates a graph that is wrapped by a node in the current graph. ### Parameters - **name** (str) – The name of the node - **path** (str) – The path to the graph - **evaluator** (str) – The name of the evaluator to use for the graph - **is_global_graph** (bool) – Whether this is a global graph - **is_backed_by_usd** (bool) – Whether the constructs are to be backed by USD - **backing_type** (omni.graph.core.GraphBackingType) – The kind of cache backing this graph - **pipeline_stage** (omni.graph.core.GraphPipelineStage) – What stage in the pipeline the global graph is at (simulation, pre-render, post-render) - **evaluation_mode** (omni.graph.core.GraphEvaluationMode) – What mode to use when evaluating the graph ### Returns - Node wrapping the graph that was created ### Return type - omni.graph.core.Node Given the path to the node and the type of the node, creates a node of that type at that path. **Parameters** - **path** (`str`) – The path to the node - **node_type** (`str`) – The type of the node - **use_usd** (`bool`) – Whether or not to create the USD backing for the node **Returns** - The newly created node **Return type** - omni.graph.core.Node Given the path to the subgraph, create the subgraph at that path. **Parameters** - **subgraphPath** (`str`) – The path to the subgraph - **evaluator** (`str`) – The evaluator type - **createUsd** (`bool`) – Whether or not to create the USD backing for the node **Returns** - Subgraph object created for the given path. **Return type** - omni.graph.core.Graph ### Graph.create_variable Creates a variable on the graph. #### Parameters - **name** (str) – The name of the variable - **type** (omni.graph.core.Type) – The type of the variable to create. #### Returns A reference to the newly created variable, or None if the variable could not be created. #### Return type omni.graph.core.IVariable ### Graph.deregister_error_status_change_callback De-registers the error status change callback to be invoked when the error status of nodes change during evaluation. #### Parameters - **status_change_handle** (int) – The handle that was returned during the register_error_status_change_callback call ### Graph.destroy_node Given the path to the node, destroys the node at that path. #### Parameters - **node_path** (str) – The path to the node - **update_usd** (bool) – Whether or not to destroy the USD backing for the node ## Graph Methods ### destroy - **Description**: Destroys the node. - **Returns**: True if the node was successfully destroyed - **Return type**: bool ### evaluate - **Description**: Tick the graph by causing it to evaluate. - **Parameters**: - `self` : omni.graph.core._omni_graph_core.Graph - **Returns**: None ### find_variable - **Description**: Find the variable with the given name in the graph. - **Parameters**: - `name` (str) – The name of the variable to find. - **Returns**: The variable with the given name, or None if not found. - **Return type**: omni.graph.core.IVariable | None ### get_context - **Description**: Gets the context associated to the graph - **Returns**: The context associated to the graph - **Return type**: omni.graph.core.GraphContext ### get_default_graph_context - **Description**: Gets the default context associated with this graph - **Returns**: The default context associated with this graph - **Return type**: omni.graph.core.GraphContext ### Returns The default graph context associated with this graph. ### Return type omni.graph.core.GraphContext ### get_evaluator_name ```python get_evaluator_name(self: omni.graph.core._omni_graph_core.Graph) -> str ``` Gets the name of the evaluator being used on this graph #### Returns The name of the graph evaluator (dirty_push, push, execution) #### Return type str ### get_event_stream ```python get_event_stream(self: omni.graph.core._omni_graph_core.Graph) -> carb.events._events.IEventStream ``` Get the event stream the graph uses for notification of changes. #### Returns Event stream to monitor for graph changes #### Return type carb.events.IEventStream ### get_graph_backing_type ```python get_graph_backing_type(self: omni.graph.core._omni_graph_core.Graph) -> omni.graph.core._omni_graph_core.GraphBackingType ``` Gets the data type backing this graph #### Returns Returns the type of data structure backing this graph #### Return type omni.graph.core.GraphBackingType ### get_handle ```python get_handle(self: omni.graph.core._omni_graph_core.Graph) -> int ``` Gets a unique handle identifier for this graph #### Returns Unique handle identifier for this graph #### Return type int ### get_instance_count ```python get_instance_count(self: omni.graph.core._omni_graph_core.Graph) -> int ``` Gets the number of instances this graph has. **Returns:** - The number of instances the graph has (0 if the graph is standalone). - **Return type:** int ### get_node ```python get_node(self: omni.graph.core._omni_graph_core.Graph, path: str) -> omni.graph.core._omni_graph_core.Node ``` Given a path to the node, returns the object for the node. **Parameters:** - **path** (str) – The path to the node **Returns:** - Node object for the given path, None if it does not exist - **Return type:** omni.graph.core.Node ### get_nodes ```python get_nodes(self: omni.graph.core._omni_graph_core.Graph) -> List[omni.graph.core._omni_graph_core.Node] ``` Gets the list of nodes currently in this graph. **Returns:** - The nodes in this graph. - **Return type:** list[omni.graph.core.Node] ### get_owning_compound_node ```python get_owning_compound_node(self: omni.graph.core._omni_graph_core.Graph) -> ??? ``` ??? ``` Returns the compound node for which this graph is the compound subgraph of. Returns: - (og.Node) If this graph is a compound graph, the owning compound node. Otherwise, this an invalid node is returned. get_parent_graph(self: omni.graph.core._omni_graph_core.Graph) -> object - Gets the immediate parent graph of this graph - Returns: The immediate parent graph of this graph (may be None) - Return type: omni.graph.core.Graph | None get_path_to_graph(self: omni.graph.core._omni_graph_core.Graph) -> str - Gets the path to this graph - Returns: The path to this graph (may be empty). - Return type: str get_pipeline_stage(self: omni.graph.core._omni_graph_core.Graph) -> omni.graph.core._omni_graph_core.GraphPipelineStage - Gets the pipeline stage to which this graph belongs - Returns: The type of pipeline stage of this graph (simulation, pre-render, post-render) - Return type: omni.graph.core.PipelineStage get_subgraph(self: omni.graph.core._omni_graph_core.Graph, path: str) -> ... - ... ## omni.graph.core._omni_graph_core.Graph ### get_subgraph Gets the subgraph living at the given path below this graph #### Parameters - **path** (str) – Path to the subgraph to find #### Returns - Subgraph at the path, or None if not found #### Return type - omni.graph.core.Graph | None ### get_subgraphs Gets the list of subgraphs under this graph #### Returns - List of graphs that are subgraphs of this graph #### Return type - list[omni.graph.core.Graph] ### get_variables Returns the list of variables defined on the graph. #### Returns - The current list of variables on the graph. #### Return type - list[omni.graph.core.IVariable] ### inspect Runs the inspector on the graph #### Parameters - **inspector** (omni.inspect.Inspector) – The inspector to run #### Returns - True if the inspector was successfully run on the graph, False if it is not supported #### Return type - bool bool is_auto_instanced(self: omni.graph.core._omni_graph_core.Graph) -> bool  Returns whether this graph is an auto instance or not. An auto instance is a graph that got merged as an instance with all other similar graphs in the stage. - Returns: True if this graph is an auto instance - Return type: bool is_compound_graph(self: omni.graph.core._omni_graph_core.Graph) -> bool  Returns whether this graph is a compound graph. A compound graph is subgraph that controlled by a compound node. - Returns: True if this graph is a compound graph - Return type: bool is_disabled(self: omni.graph.core._omni_graph_core.Graph) -> bool  Checks to see if the graph is disabled - Returns: True if this graph object is disabled. - Return type: bool is_valid(self: omni.graph.core._omni_graph_core.Graph) -> bool  Checks to see if the graph object is valid - Returns: True if this graph object is valid. - Return type: bool register_error_status_change_callback(self: omni.graph.core._omni_graph_core.Graph) -> bool  ## omni.graph.core.Graph.register_error_status_change_callback Registers a callback to be invoked after graph evaluation for all the nodes whose error status changed during the evaluation. The callback receives a list of the nodes whose error status changed. ### Parameters - **callback** (callable) – The callback function ### Returns A handle that can 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.Graph.reload_from_stage Force the graph to reload by deleting it and re-parsing from the stage. This is potentially destructive if you have internal state information in any nodes. ## omni.graph.core.Graph.reload_settings Reload the graph settings. ## omni.graph.core.Graph.remove_variable Removes the given variable from the graph. ### Parameters - **variable** (omni.graph.core.IVariable) – The variable to remove. ### Returns True if the variable was successfully removed, False otherwise. ### Return type bool ## omni.graph.core.Graph.rename_node ### rename_node ```python rename_node(self: omni.graph.core._omni_graph_core.Graph, path: str, new_path: str) -> bool ``` Given the path to the node, renames the node at that path. **Parameters:** - **path** (str) – The path to the node - **new_path** (str) – The new path **Returns:** - True if the node was successfully renamed **Return type:** - bool ### rename_subgraph ```python rename_subgraph(self: omni.graph.core._omni_graph_core.Graph, path: str, new_path: str) -> bool ``` Renames the path of a subgraph **Parameters:** - **path** (str) – Path to the subgraph being renamed - **new_path** (str) – New path for the subgraph ### set_auto_instancing_allowed ```python set_auto_instancing_allowed(self: omni.graph.core._omni_graph_core.Graph, arg0: bool) -> bool ``` Allows (or not) this graph to be an auto-instance, ie. to be executed vectorized as an instance amongst all other identical graph **Parameters:** - **allowed** (bool) – Whether this graph is allowed to be an auto instance. ### Returns - Whether this graph was allowed to be an auto instance before this call. ### Return type - bool ### set_disabled - **Parameters** - **disable** (bool) – True if the graph is to be disabled ### set_prim_view - Apply a view to a graph: a view is a way to dynamically maintain a list of instances for a graph. - **Parameters** - **view** (IPrimViewPtr) – The view to apply to that graph - **Returns** - whether or not the view has been successfully applied to the graph. - **Return type** - bool ### set_usd_notice_handling_enabled - Sets whether this graph object has USD notice handling enabled. - **Parameters** - **enable** (bool) – True to enable USD notice handling, False to disable. ### usd_notice_handling_enabled - (self: omni.graph.core._omni_graph_core.Graph, enable: bool) -> None ## omni.graph.core.Graph.usd_notice_handling_enabled Checks whether this graph has USD notice handling enabled. ### Returns - True if USD notice handling is enabled on this graph. - Return type: bool ## omni.graph.core.Graph.evaluation_mode The evaluation mode sets how the graph will be evaluated. - GRAPH_EVALUATION_MODE_AUTOMATIC - Evaluate the graph in Standalone mode when there are no relationships to it, otherwise it will be evaluated in Instanced mode. - GRAPH_EVALUATION_MODE_STANDALONE - Evaluates the graph with the graph Prim as the graph target, and ignore Prims with relationships to the graph Prim. Use this mode when constructing self-contained graphs that evaluate independently. - GRAPH_EVALUATION_MODE_INSTANCED - Evaluates only when the graph there are relationships from OmniGraphAPI interfaces. Each Prim with a relationship to the graph Prim will cause an evaluation, with the Graph Target set to path of Prim with the OmniGraphAPI interface. Use this mode when the graph represents as an asset or template that can be applied to multiple Prims. ### Type - omni.graph.core.GraphEvaluationMode
omni.graph.core.GraphBackingType.md
# GraphBackingType ## GraphBackingType - **Bases:** `pybind11_object` - **Description:** Location of the data backing the graph ### Members - `GRAPH_BACKING_TYPE_FLATCACHE_SHARED` : Deprecated: Use `GRAPH_BACKING_TYPE_FABRIC_SHARED` - `GRAPH_BACKING_TYPE_FLATCACHE_WITH_HISTORY` : Deprecated: Use `GRAPH_BACKING_TYPE_FABRIC_WITH_HISTORY` - `GRAPH_BACKING_TYPE_FLATCACHE_WITHOUT_HISTORY` : Deprecated: Use `GRAPH_BACKING_TYPE_FABRIC_WITHOUT_HISTORY` - `GRAPH_BACKING_TYPE_FABRIC_SHARED` : Data is a regular Fabric instance - `GRAPH_BACKING_TYPE_FABRIC_WITH_HISTORY` : Data is a Fabric instance without any history - `GRAPH_BACKING_TYPE_FABRIC_WITHOUT_HISTORY` : Data is a Fabric instance with a ring buffer of history - `GRAPH_BACKING_TYPE_NONE` : No data is stored for the graph - `GRAPH_BACKING_TYPE_UNKNOWN` : The data backing is not currently known ### Methods - `__init__(self, value)` ### Attributes - `GRAPH_BACKING_TYPE_FABRIC_SHARED` - `GRAPH_BACKING_TYPE_FABRIC_WITHOUT_HISTORY` - `GRAPH_BACKING_TYPE_FABRIC_WITH_HISTORY` - `GRAPH_BACKING_TYPE_FLATCACHE_SHARED` - `GRAPH_BACKING_TYPE_FLATCACHE_WITHOUT_HISTORY` | GRAPH_BACKING_TYPE_FLATCACHE_WITH_HISTORY | | --- | | GRAPH_BACKING_TYPE_NONE | | GRAPH_BACKING_TYPE_UNKNOWN | | name | | value | ### __init__ ```python __init__(self: omni.graph.core._omni_graph_core.GraphBackingType, value: int) -> None ``` ### name ``` property name ``` ```
omni.graph.core.GraphContext.md
# GraphContext ## GraphContext - **Bases:** `pybind11_object` - **Description:** Execution context for a graph ### Methods - `__init__(*args, **kwargs)` - `get_attribute_as_bool(self, attribute[, ...])` - Deprecated. - `get_attribute_as_boolarray(self, attribute)` - Deprecated. - `get_attribute_as_double(self, attribute[, ...])` - Deprecated. - `get_attribute_as_doublearray(self, attribute)` - Deprecated. - `get_attribute_as_float(self, attribute[, ...])` - Deprecated. | 方法名 | 描述 | | --- | --- | | `get_attribute_as_floatarray(self, attribute)` | get_attribute_as_floatarray is deprecated. | | `get_attribute_as_half(self, attribute[, ...])` | get_attribute_as_half is deprecated. | | `get_attribute_as_halfarray(self, attribute)` | get_attribute_as_halfarray is deprecated. | | `get_attribute_as_int(self, arg0, arg1, arg2, ...)` | get_attribute_as_int is deprecated. | | `get_attribute_as_int64(self, attribute[, ...])` | get_attribute_as_int64 is deprecated. | | `get_attribute_as_int64array(self, attribute)` | get_attribute_as_int64array is deprecated. | | `get_attribute_as_intarray(self, arg0, arg1, ...)` | get_attribute_as_intarray is deprecated. | | `get_attribute_as_nested_doublearray(self, ...)` | get_attribute_as_nested_doublearray is deprecated. | | `get_attribute_as_nested_floatarray(self, ...)` | get_attribute_as_nested_floatarray is deprecated. | | `get_attribute_as_nested_halfarray(self, ...)` | get_attribute_as_nested_halfarray is deprecated. | | `get_attribute_as_nested_intarray(self, attribute)` | get_attribute_as_nested_intarray is deprecated. | | `get_attribute_as_string(self, attribute[, ...])` | get_attribute_as_string is deprecated. | | `get_attribute_as_uchar(self, attribute[, ...])` | get_attribute_as_uchar is deprecated. | | `get_attribute_as_uchararray(self, attribute)` | get_attribute_as_uchararray is deprecated. | - `get_attribute_as_uint(self, attribute[, ...])` is deprecated. - `get_attribute_as_uint64(self, attribute[, ...])` is deprecated. - `get_attribute_as_uint64array(self, attribute)` is deprecated. - `get_attribute_as_uintarray(self, attribute)` is deprecated. - `get_bundle(self, path)` - Get the bundle object as read-write. - `get_elapsed_time(self)` - Returns the time between last evaluation of the graph and "now" - `get_elem_count(*args, **kwargs)` - Overloaded function. - `get_frame(self)` - Returns the global playback time in frames - `get_graph(self)` - Gets the graph associated with this graph context - `get_graph_target(self[, index])` - Get the Prim path of the graph target. - `get_input_bundle(*args, **kwargs)` - Overloaded function. - `get_input_target_bundles(self, node, ...[, ...])` - Get all input targets in the relationship with the given name on the specified compute node. - `get_is_playing(self)` - Returns the state of global playback - `get_output_bundle(*args, **kwargs)` - Overloaded function. - `get_time(self)` - Returns the current time Returns the global playback time get_time_since_start(self) Returns the elapsed time since the app started inspect(self, inspector) Runs the inspector on the graph context is_valid(self) Checks to see if this graph context object is valid set_bool_attribute(self, arg0, arg1) set_bool_attribute is deprecated. set_boolarray_attribute(self, arg0, arg1) set_boolarray_attribute is deprecated. set_double_attribute(self, arg0, arg1) set_double_attribute is deprecated. set_double_matrix_attribute(self, arg0, arg1) set_double_matrix_attribute is deprecated. set_doublearray_attribute(self, arg0, arg1) set_doublearray_attribute is deprecated. set_float_attribute(self, arg0, arg1) set_float_attribute is deprecated. set_floatarray_attribute(self, arg0, arg1) set_floatarray_attribute is deprecated. set_half_attribute(self, arg0, arg1) set_half_attribute is deprecated. set_halfarray_attribute(self, arg0, arg1) set_halfarray_attribute is deprecated. set_int64_attribute(self, arg0, arg1) set_int64_attribute is deprecated. set_int64array_attribute(self, arg0, arg1) set_int64array_attribute is deprecated. set_int_attribute(self, arg0, arg1) | Method | Description | |--------|-------------| | `set_int_attribute(self, arg0, arg1)` | set_int_attribute is deprecated. | | `set_intarray_attribute(self, arg0, arg1)` | set_intarray_attribute is deprecated. | | `set_nested_doublearray_attribute(self, arg0, ...)` | set_nested_doublearray_attribute is deprecated. | | `set_nested_floatarray_attribute(self, arg0, arg1)` | set_nested_floatarray_attribute is deprecated. | | `set_nested_halfarray_attribute(self, arg0, arg1)` | set_nested_halfarray_attribute is deprecated. | | `set_nested_intarray_attribute(self, arg0, arg1)` | set_nested_intarray_attribute is deprecated. | | `set_string_attribute(self, arg0, arg1)` | set_string_attribute is deprecated. | | `set_uchar_attribute(self, arg0, arg1)` | set_uchar_attribute is deprecated. | | `set_uchararray_attribute(self, arg0, arg1)` | set_uchararray_attribute is deprecated. | | `set_uint64_attribute(self, arg0, arg1)` | set_uint64_attribute is deprecated. | | `set_uint64array_attribute(self, arg0, arg1)` | set_uint64array_attribute is deprecated. | | `set_uint_attribute(self, arg0, arg1)` | set_uint_attribute is deprecated. | | `set_uintarray_attribute(self, arg0, arg1)` | set_uintarray_attribute is deprecated. | | `write_bucket_to_backing(self, bucket_id)` | This method was internal, and is now obsolete: it does not function anymore. | ### omni.graph.core.GraphContext.__init__ ```python __init__(self, *args, **kwargs) ``` ### omni.graph.core.GraphContext.get_attribute_as_bool ```python get_attribute_as_bool(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> bool ``` get_attribute_as_bool is deprecated. Use og.Controller.get() instead. ### omni.graph.core.GraphContext.get_attribute_as_boolarray ```python get_attribute_as_boolarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) ``` <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_boolarray"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_boolarray </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> numpy.ndarray </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> bool </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_boolarray" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_boolarray is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_double"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_double </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> float </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_double" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_double is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_doublearray"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_doublearray </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> float </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_doublearray" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_doublearray is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_doublearray"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_doublearray </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> :</span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> =</span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> )</span> </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> numpy.ndarray </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> numpy.float64 </span> <span class="p"> <span class="pre"> ]</span> </span> </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_doublearray" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_doublearray is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_float"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_float </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> :</span> </span> <span class="w"> </span> <span class="n"> <a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> :</span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> =</span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> )</span> </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> float </span> </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_float" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_float is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_floatarray"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_floatarray </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> :</span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> =</span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> )</span> </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> float </span> </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_floatarray" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_floatarray is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> ### get_attribute_as_floatarray ```python def get_attribute_as_floatarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.float32]: pass ``` **Deprecated:** Use `og.Controller.get()` instead. ### get_attribute_as_half ```python def get_attribute_as_half(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float: pass ``` **Deprecated:** Use `og.Controller.get()` instead. ### get_attribute_as_halfarray ```python def get_attribute_as_halfarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float: pass ``` **Deprecated:** Use `og.Controller.get()` instead. ```python omni.graph.core._omni_graph_core.Attribute ``` ```python getDefault : bool = False ``` ```python write : bool = False ``` ```python writeElemCount : int = 0 ``` ```python → numpy.ndarray [numpy.float32] ``` ```python get_attribute_as_int(self : omni.graph.core._omni_graph_core.GraphContext, arg0 : omni.graph.core._omni_graph_core.Attribute, arg1 : bool, arg2 : bool, arg3 : int) → int ``` ```markdown get_attribute_as_int is deprecated. Use og.Controller.get() instead. ``` ```python get_attribute_as_int64(self : omni.graph.core._omni_graph_core.GraphContext, attribute : omni.graph.core._omni_graph_core.Attribute, getDefault : bool) ``` get_attribute_as_int64 is deprecated. Use og.Controller.get() instead. get_attribute_as_int64array is deprecated. Use og.Controller.get() instead. get_attribute_as_intarray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_intarray - **Parameters**: - `arg0 : omni.graph.core._omni_graph_core.Attribute` - `arg1 : bool` - `arg2 : bool` - `arg3 : int` - **Returns**: `numpy.ndarray[numpy.int32]` - **Note**: get_attribute_as_intarray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_nested_doublearray - **Parameters**: - `self : omni.graph.core._omni_graph_core.GraphContext` - `attribute : omni.graph.core._omni_graph_core.Attribute` - `getDefault : bool = False` - `write : bool = False` - `writeElemCount : int = 0` - **Returns**: `numpy.ndarray[numpy.float64]` - **Note**: get_attribute_as_nested_doublearray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_nested_floatarray - **Parameters**: - `self : omni.graph.core._omni_graph_core.GraphContext` - `attribute : omni.graph.core._omni_graph_core.Attribute` - `getDefault : bool = False` - `write : bool = False` - `writeElemCount : int = 0` - **Returns**: `numpy.ndarray[numpy.float32]` - **Note**: get_attribute_as_nested_floatarray is deprecated. Use og.Controller.get() instead. get_attribute_as_nested_floatarray( attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) → numpy.ndarray[numpy.float32] get_attribute_as_nested_halfarray( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) → numpy.ndarray[numpy.float32] get_attribute_as_nested_floatarray is deprecated. Use og.Controller.get() instead. get_attribute_as_nested_halfarray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_nested_intarray ```python get_attribute_as_nested_intarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.int32] ``` get_attribute_as_nested_intarray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_string ```python get_attribute_as_string(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> str ``` ### get_attribute_as_string get_attribute_as_string is deprecated. Use og.Controller.get() instead. ### get_attribute_as_uchar (self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> int get_attribute_as_uchar is deprecated. Use og.Controller.get() instead. ### get_attribute_as_uchararray (self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> int get_attribute_as_uchararray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_uchararray - **Deprecated**: Use `og.Controller.get()` instead. ### get_attribute_as_uint - **Deprecated**: Use `og.Controller.get()` instead. ### get_attribute_as_uint64 - **Deprecated**: Use `og.Controller.get()` instead. ### get_attribute_as_uint64 ( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) → int get_attribute_as_uint64 is deprecated. Use og.Controller.get() instead. ### get_attribute_as_uint64array ( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) → numpy.ndarray[numpy.uint64] get_attribute_as_uint64array is deprecated. Use og.Controller.get() instead. ### get_attribute_as_uintarray ( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) → numpy.ndarray[numpy.uint64] get_attribute_as_uintarray is deprecated. Use og.Controller.get() instead. <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_uintarray"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_uintarray </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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"> read </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> numpy.ndarray </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> numpy.uint32 </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </span> </dt> <dd> <p> get_attribute_as_uintarray is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_bundle"> <span class="sig-name descname"> <span class="pre"> get_bundle </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> path </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> str </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <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> Get the bundle object as read-write. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <p> <strong> path </strong> ( <em> str </em> ) – the path to the bundle </p> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> The bundle object at the path, None if there isn’t one </p> </dd> <dt class="field-odd"> Return type </dt> <dd class="field-odd"> <p> <a class="reference internal" href="omni.graph.core.IBundle2.html#omni.graph.core.IBundle2" title="omni.graph.core.IBundle2"> omni.graph.core.IBundle2 </a> </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_elapsed_time"> <span class="sig-name descname"> <span class="pre"> get_elapsed_time </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </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"> float </span> </span> </span> </dt> <dd> <p> Returns the time between last evaluation of the graph and “now” </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> the elapsed time </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> float </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_elem_count"> <span class="sig-name descname"> <span class="pre"> get_elem_count </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> </dl> ### omni.graph.core.GraphContext.get_elem_count Overloaded function. 1. get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, attribute_data: omni::graph::core::Py_AttributeData) -> int 2. get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute) -> int get_elem_count is deprecated. Use og.Controller.get_array_size() instead. ``` ```markdown ### omni.graph.core.GraphContext.get_frame Returns the global playback time in frames - **Returns**: the global playback time in frames - **Return type**: float ``` ```markdown ### omni.graph.core.GraphContext.get_graph Gets the graph associated with this graph context - **Returns**: The graph associated with this graph context. - **Return type**: omni.graph.core.Graph ``` ```markdown ### omni.graph.core.GraphContext.get_graph_target Get the Prim path of the graph target. The graph target is defined as the parent Prim of the compute graph, except during instancing - where OmniGraph executes a graph once for each Prim. In the case of instancing, the graph target will change at each execution to be the path of the instance. If this is called outside of graph execution, the path of the graph Prim is returned, or an empty token if the graph does not have a Prim associated with it. - **Parameters**: - **index** (int) – The index of instance to fetch. By default, the graph context index is used. - **Returns**: The prim path of the current graph target. - **Return type**: str <p> str </p> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_input_bundle"> <span class="sig-name descname"> <span class="pre"> get_input_bundle </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.GraphContext.get_input_bundle" title="Permalink to this definition">  </a> </dt> <dd> <p> Overloaded function. </p> <ol class="arabic"> <li> <p> get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) -&gt; omni.graph.core._omni_graph_core.IConstBundle2 </p> <blockquote> <div> <p> Get the bundle object as read only. </p> <dl class="simple"> <dt> Args: </dt> <dd> <p> path (str): the path to the bundle </p> </dd> <dt> Returns: </dt> <dd> <p> omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one </p> </dd> </dl> </div> </blockquote> </li> <li> <p> get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -&gt; omni.graph.core._omni_graph_core.IConstBundle2 </p> <blockquote> <div> <p> Get a bundle object that is an input attribute. </p> <dl class="simple"> <dt> Args: </dt> <dd> <p> node (omni.graph.core.Node): the node on which the bundle can be found attribute_name (str): the name of the input attribute instance (int): an instance index when getting value on an instantiated graph </p> </dd> <dt> Returns: </dt> <dd> <p> omni.graph.core.IConstBundle2: The bundle object at the path, None if there isn’t one </p> </dd> </dl> </div> </blockquote> </li> </ol> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_input_target_bundles"> <span class="sig-name descname"> <span class="pre"> get_input_target_bundles </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> node </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.Node.html#omni.graph.core.Node" title="omni.graph.core._omni_graph_core.Node"> <span class="pre"> omni.graph.core._omni_graph_core.Node </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute_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"> instance </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 18446744073709551614 </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 class="p"> <span class="pre"> [ </span> </span> <a class="reference internal" href="omni.graph.core.IConstBundle2.html#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 class="p"> <span class="pre"> ] </span> </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_input_target_bundles" title="Permalink to this definition">  </a> </dt> <dd> <p> Get all input targets in the relationship with the given name on the specified compute node. </p> <p> The targets are returned as bundle objects. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> node </strong> (<a class="reference internal" href="omni.graph.core.Node.html#omni.graph.core.Node" title="omni.graph.core.Node"><em>omni.graph.core.Node</em></a>) – the node on which the input targets can be found </p> </li> <li> <p> <strong> attribute_name </strong> (<em>str</em>) – the name of the relationship attribute </p> </li> <li> <p> <strong> instance </strong> (<em>int</em>) – an instance index when getting value on an instantiated graph </p> </li> </ul> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> The list of input targets, as bundle objects. ### Return type - list[omni.graph.core.IConstBundle2] ### get_is_playing - **Function**: get_is_playing(self: omni.graph.core._omni_graph_core.GraphContext) - **Returns**: - True if playback has started, False if playback is stopped - **Return type**: bool ### get_output_bundle - **Function**: get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, *args, **kwargs) - **Description**: Overloaded function. - 1. get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) -> omni.graph.core._omni_graph_core.IBundle2 - **Description**: Get a bundle object that is an output attribute. - **Args**: - path (str): the path to the bundle - **Returns**: omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one - 2. get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> omni.graph.core._omni_graph_core.IBundle2 - **Description**: Get a bundle object that is an output attribute. - **Args**: - node (omni.graph.core.Node): the node on which the bundle can be found - attribute_name (str): the name of the output attribute - instance (int): an instance index when getting value on an instantiated graph - **Returns**: omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one ### get_time - **Function**: get_time(self: omni.graph.core._omni_graph_core.GraphContext) - **Returns**: - the global playback time in seconds - **Return type**: float ### get_time_since_start - **Function**: get_time_since_start(self: omni.graph.core._omni_graph_core.GraphContext) - **Returns**: - the time since the start of global playback - **Return type**: float ### get_time_since_start Returns the elapsed time since the app started #### Returns - the number of seconds since the app started in seconds #### Return type - float ### inspect Runs the inspector on the graph context #### Parameters - **inspector** (`omni.inspect.Inspector`) – The inspector to run #### Returns - True if the inspector was successfully run on the context, False if it is not supported #### Return type - bool ### is_valid Checks to see if this graph context object is valid #### Returns - True if this object is valid #### Return type - bool ### set_bool_attribute set_bool_attribute is deprecated. Use og.Controller.set() instead. ### set_boolarray_attribute ### set_boolarray_attribute ```python set_boolarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[bool], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_boolarray_attribute is deprecated. Use og.Controller.set() instead. ### set_double_attribute ```python set_double_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_double_attribute is deprecated. Use og.Controller.set() instead. ### set_double_matrix_attribute ```python set_double_matrix_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_double_matrix_attribute is deprecated. Use og.Controller.set() instead. ### set_doublearray_attribute ```python set_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_doublearray_attribute is deprecated. Use og.Controller.set() instead. ### set_doublearray_attribute ```python set_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_doublearray_attribute is deprecated. Use og.Controller.set() instead. ### set_float_attribute ```python set_float_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_float_attribute is deprecated. Use og.Controller.set() instead. ### set_floatarray_attribute ```python set_floatarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_floatarray_attribute is deprecated. Use og.Controller.set() instead. ### set_half_attribute ```python set_half_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_half_attribute is deprecated. Use og.Controller.set() instead. ### set_half_attribute ```python def set_half_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute) -> None: ``` set_half_attribute is deprecated. Use og.Controller.set() instead. ### set_halfarray_attribute ```python def set_halfarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None: ``` set_halfarray_attribute is deprecated. Use og.Controller.set() instead. ### set_int64_attribute ```python def set_int64_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None: ``` set_int64_attribute is deprecated. Use og.Controller.set() instead. ### set_int64array_attribute ```python def set_int64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None: ``` set_int64array_attribute is deprecated. Use og.Controller.set() instead. ### set_int64array_attribute ```python set_int64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` - **Deprecated**: Use `og.Controller.set()` instead. ### set_int_attribute ```python set_int_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` - **Deprecated**: Use `og.Controller.set()` instead. ### set_intarray_attribute ```python set_intarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` - **Deprecated**: Use `og.Controller.set()` instead. ### set_nested_doublearray_attribute ```python set_nested_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` - **Deprecated**: Use `og.Controller.set()` instead. ### set_nested_doublearray_attribute ```python set_nested_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` **Deprecated:** Use `og.Controller.set()` instead. ### set_nested_floatarray_attribute ```python set_nested_floatarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` **Deprecated:** Use `og.Controller.set()` instead. ### set_nested_halfarray_attribute ```python set_nested_halfarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` **Deprecated:** Use `og.Controller.set()` instead. ### set_nested_intarray_attribute ```python set_nested_intarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[int]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` **Deprecated:** Use `og.Controller.set()` instead. **set_nested_intarray_attribute**( **arg0**: List[List[int]], **arg1**: omni.graph.core._omni_graph_core.Attribute ) -> None **set_string_attribute**( **self**: omni.graph.core._omni_graph_core.GraphContext, **arg0**: str, **arg1**: omni.graph.core._omni_graph_core.Attribute ) -> None **set_uchar_attribute**( **self**: omni.graph.core._omni_graph_core.GraphContext, **arg0**: int, **arg1**: omni.graph.core._omni_graph_core.Attribute ) -> None **set_uchararray_attribute**( **self**: omni.graph.core._omni_graph_core.GraphContext, **arg0**: int ) -> None --- **set_nested_intarray_attribute** is deprecated. Use og.Controller.set() instead. **set_string_attribute** is deprecated. Use og.Controller.set() instead. **set_uchar_attribute** is deprecated. Use og.Controller.set() instead. **set_uchararray_attribute** is deprecated. Use og.Controller.set() instead. ### set_uchararray_attribute ```python set_uchararray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_uchararray_attribute is deprecated. Use og.Controller.set() instead. ### set_uint64_attribute ```python set_uint64_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_uint64_attribute is deprecated. Use og.Controller.set() instead. ### set_uint64array_attribute ```python set_uint64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_uint64array_attribute is deprecated. Use og.Controller.set() instead. ### set_uint_attribute ```python set_uint_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_uint_attribute is deprecated. Use og.Controller.set() instead. ### set_uint_attribute ```python set_uint_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_uint_attribute is deprecated. Use og.Controller.set() instead. ### set_uintarray_attribute ```python set_uintarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_uintarray_attribute is deprecated. Use og.Controller.set() instead. ### write_bucket_to_backing ```python write_bucket_to_backing(self: omni.graph.core._omni_graph_core.GraphContext, bucket_id: omni::fabric::BucketId) -> None ``` 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. ```
omni.graph.core.GraphContext_omni.graph.core.GraphContext.md
# GraphContext Execution context for a graph ## Methods - `__init__(*args, **kwargs)` - `get_attribute_as_bool(self, attribute[, ...])` - get_attribute_as_bool is deprecated. - `get_attribute_as_boolarray(self, attribute)` - get_attribute_as_boolarray is deprecated. - `get_attribute_as_double(self, attribute[, ...])` - get_attribute_as_double is deprecated. - `get_attribute_as_doublearray(self, attribute)` - get_attribute_as_doublearray is deprecated. - `get_attribute_as_float(self, attribute[, ...])` - get_attribute_as_float is deprecated. | 方法名 | 描述 | | --- | --- | | `get_attribute_as_floatarray(self, attribute)` | get_attribute_as_floatarray is deprecated. | | `get_attribute_as_half(self, attribute[, ...])` | get_attribute_as_half is deprecated. | | `get_attribute_as_halfarray(self, attribute)` | get_attribute_as_halfarray is deprecated. | | `get_attribute_as_int(self, arg0, arg1, arg2, ...)` | get_attribute_as_int is deprecated. | | `get_attribute_as_int64(self, attribute[, ...])` | get_attribute_as_int64 is deprecated. | | `get_attribute_as_int64array(self, attribute)` | get_attribute_as_int64array is deprecated. | | `get_attribute_as_intarray(self, arg0, arg1, ...)` | get_attribute_as_intarray is deprecated. | | `get_attribute_as_nested_doublearray(self, ...)` | get_attribute_as_nested_doublearray is deprecated. | | `get_attribute_as_nested_floatarray(self, ...)` | get_attribute_as_nested_floatarray is deprecated. | | `get_attribute_as_nested_halfarray(self, ...)` | get_attribute_as_nested_halfarray is deprecated. | | `get_attribute_as_nested_intarray(self, attribute)` | get_attribute_as_nested_intarray is deprecated. | | `get_attribute_as_string(self, attribute[, ...])` | get_attribute_as_string is deprecated. | | `get_attribute_as_uchar(self, attribute[, ...])` | get_attribute_as_uchar is deprecated. | | `get_attribute_as_uchararray(self, attribute)` | get_attribute_as_uchararray is deprecated. | - `get_attribute_as_uint(self, attribute[, ...])` is deprecated. - `get_attribute_as_uint64(self, attribute[, ...])` is deprecated. - `get_attribute_as_uint64array(self, attribute)` is deprecated. - `get_attribute_as_uintarray(self, attribute)` is deprecated. - `get_bundle(self, path)` - Get the bundle object as read-write. - `get_elapsed_time(self)` - Returns the time between last evaluation of the graph and "now" - `get_elem_count(*args, **kwargs)` - Overloaded function. - `get_frame(self)` - Returns the global playback time in frames - `get_graph(self)` - Gets the graph associated with this graph context - `get_graph_target(self[, index])` - Get the Prim path of the graph target. - `get_input_bundle(*args, **kwargs)` - Overloaded function. - `get_input_target_bundles(self, node, ...[, ...])` - Get all input targets in the relationship with the given name on the specified compute node. - `get_is_playing(self)` - Returns the state of global playback - `get_output_bundle(*args, **kwargs)` - Overloaded function. - `get_time(self)` - Returns the current time of the graph context Returns the global playback time ```python get_time_since_start(self) ``` Returns the elapsed time since the app started ```python inspect(self, inspector) ``` Runs the inspector on the graph context ```python is_valid(self) ``` Checks to see if this graph context object is valid ```python set_bool_attribute(self, arg0, arg1) ``` set_bool_attribute is deprecated. ```python set_boolarray_attribute(self, arg0, arg1) ``` set_boolarray_attribute is deprecated. ```python set_double_attribute(self, arg0, arg1) ``` set_double_attribute is deprecated. ```python set_double_matrix_attribute(self, arg0, arg1) ``` set_double_matrix_attribute is deprecated. ```python set_doublearray_attribute(self, arg0, arg1) ``` set_doublearray_attribute is deprecated. ```python set_float_attribute(self, arg0, arg1) ``` set_float_attribute is deprecated. ```python set_floatarray_attribute(self, arg0, arg1) ``` set_floatarray_attribute is deprecated. ```python set_half_attribute(self, arg0, arg1) ``` set_half_attribute is deprecated. ```python set_halfarray_attribute(self, arg0, arg1) ``` set_halfarray_attribute is deprecated. ```python set_int64_attribute(self, arg0, arg1) ``` set_int64_attribute is deprecated. ```python set_int64array_attribute(self, arg0, arg1) ``` set_int64array_attribute is deprecated. ```python set_int_attribute(self, arg0, arg1) ``` set_int_attribute is deprecated. | Method | Description | |--------|-------------| | set_int_attribute(self, arg0, arg1) | set_int_attribute is deprecated. | | set_intarray_attribute(self, arg0, arg1) | set_intarray_attribute is deprecated. | | set_nested_doublearray_attribute(self, arg0, ...) | set_nested_doublearray_attribute is deprecated. | | set_nested_floatarray_attribute(self, arg0, arg1) | set_nested_floatarray_attribute is deprecated. | | set_nested_halfarray_attribute(self, arg0, arg1) | set_nested_halfarray_attribute is deprecated. | | set_nested_intarray_attribute(self, arg0, arg1) | set_nested_intarray_attribute is deprecated. | | set_string_attribute(self, arg0, arg1) | set_string_attribute is deprecated. | | set_uchar_attribute(self, arg0, arg1) | set_uchar_attribute is deprecated. | | set_uchararray_attribute(self, arg0, arg1) | set_uchararray_attribute is deprecated. | | set_uint64_attribute(self, arg0, arg1) | set_uint64_attribute is deprecated. | | set_uint64array_attribute(self, arg0, arg1) | set_uint64array_attribute is deprecated. | | set_uint_attribute(self, arg0, arg1) | set_uint_attribute is deprecated. | | set_uintarray_attribute(self, arg0, arg1) | set_uintarray_attribute is deprecated. | | write_bucket_to_backing(self, bucket_id) | This method was internal, and is now obsolete: it does not function anymore. | ### omni.graph.core.GraphContext.__init__ ```python __init__(self, *args, **kwargs) ``` ### omni.graph.core.GraphContext.get_attribute_as_bool ```python get_attribute_as_bool(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> bool ``` get_attribute_as_bool is deprecated. Use og.Controller.get() instead. ### omni.graph.core.GraphContext.get_attribute_as_boolarray ```python get_attribute_as_boolarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) ``` ### get_attribute_as_boolarray ```python get_attribute_as_boolarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[bool] ``` get_attribute_as_boolarray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_double ```python get_attribute_as_double(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float ``` get_attribute_as_double is deprecated. Use og.Controller.get() instead. ### get_attribute_as_doublearray ```python get_attribute_as_doublearray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float[] ``` get_attribute_as_doublearray is deprecated. Use og.Controller.get() instead. <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_doublearray"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_doublearray </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> numpy.ndarray </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> numpy.float64 </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_doublearray" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_doublearray is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_float"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_float </span> </span> <span class="sig-paren"> ( </span> <em class="sig-param"> <span class="n"> <span class="pre"> self </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> float </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_float" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_float is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_floatarray"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_floatarray </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> float </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_floatarray" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_floatarray is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> ### get_attribute_as_floatarray ```python get_attribute_as_floatarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.float32] ``` - **Deprecated**: Use `og.Controller.get()` instead. ### get_attribute_as_half ```python get_attribute_as_half(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float ``` - **Deprecated**: Use `og.Controller.get()` instead. ### get_attribute_as_halfarray ```python get_attribute_as_halfarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float ``` - **Deprecated**: Use `og.Controller.get()` instead. ```python get_attribute_as_halfarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.float32] ``` get_attribute_as_halfarray is deprecated. Use og.Controller.get() instead. ```python get_attribute_as_int(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute, arg1: bool, arg2: bool, arg3: int) -> int ``` get_attribute_as_int is deprecated. Use og.Controller.get() instead. ```python get_attribute_as_int64(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool) ``` get_attribute_as_int64 is deprecated. Use og.Controller.get() instead. get_attribute_as_int64array is deprecated. Use og.Controller.get() instead. get_attribute_as_intarray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_intarray ```python def get_attribute_as_intarray( self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute, arg1: bool, arg2: bool, arg3: int ) -> numpy.ndarray[numpy.int32] ``` get_attribute_as_intarray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_nested_doublearray ```python def get_attribute_as_nested_doublearray( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) -> numpy.ndarray[numpy.float64] ``` get_attribute_as_nested_doublearray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_nested_floatarray ```python def get_attribute_as_nested_floatarray( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) -> numpy.ndarray[numpy.float32] ``` get_attribute_as_nested_floatarray is deprecated. Use og.Controller.get() instead. get_attribute_as_nested_floatarray( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) → numpy.ndarray[numpy.float32] get_attribute_as_nested_floatarray is deprecated. Use og.Controller.get() instead. get_attribute_as_nested_halfarray( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) → numpy.ndarray[numpy.float32] get_attribute_as_nested_halfarray is deprecated. Use og.Controller.get() instead. ## get_attribute_as_nested_intarray ```python get_attribute_as_nested_intarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.int32] ``` get_attribute_as_nested_intarray is deprecated. Use og.Controller.get() instead. ## get_attribute_as_string ```python get_attribute_as_string(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> str ``` <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> str </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_string" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_string is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_uchar"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_uchar </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> int </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_uchar" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_uchar is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_uchararray"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_uchararray </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </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.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> getDefault </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> , <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> , <em class="sig-param"> <span class="n"> <span class="pre"> writeElemCount </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> <span class="w"> </span> <span class="o"> <span class="pre"> = </span> </span> <span class="w"> </span> <span class="default_value"> <span class="pre"> 0 </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> int </span> </span> </span> <a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_uchararray" title="Permalink to this definition">  </a> </dt> <dd> <p> get_attribute_as_uchararray is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> ### get_attribute_as_uchararray ```python get_attribute_as_uchararray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.uint8] ``` get_attribute_as_uchararray is deprecated. Use og.Controller.get() instead. ### get_attribute_as_uint ```python get_attribute_as_uint(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> int ``` get_attribute_as_uint is deprecated. Use og.Controller.get() instead. ### get_attribute_as_uint64 ```python get_attribute_as_uint64(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> int ``` get_attribute_as_uint64 is deprecated. Use og.Controller.get() instead. ### get_attribute_as_uint64 ```python get_attribute_as_uint64( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) -> int ``` get_attribute_as_uint64 is deprecated. Use og.Controller.get() instead. ### get_attribute_as_uint64array ```python get_attribute_as_uint64array( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) -> numpy.ndarray[numpy.uint64] ``` get_attribute_as_uint64array is deprecated. Use og.Controller.get() instead. ### get_attribute_as_uintarray ```python get_attribute_as_uintarray( self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0 ) -> numpy.ndarray[numpy.uint64] ``` get_attribute_as_uintarray is deprecated. Use og.Controller.get() instead. <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_uintarray"> <span class="sig-name descname"> <span class="pre"> get_attribute_as_uintarray </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute </span> </span> <span class="p"> <span class="pre"> :</span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> str </span> </span> </em> <span class="sig-paren"> )</span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> numpy.ndarray </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> numpy.uint32 </span> <span class="p"> <span class="pre"> ]</span> </span> </span> </span> <dd> <p> get_attribute_as_uintarray is deprecated. Use og.Controller.get() instead. </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_bundle"> <span class="sig-name descname"> <span class="pre"> get_bundle </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </span> </a> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> path </span> </span> <span class="p"> <span class="pre"> :</span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> str </span> </span> </em> <span class="sig-paren"> )</span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> omni.graph.core._omni_graph_core.IBundle2 </span> </span> </span> <dd> <p> Get the bundle object as read-write. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <p> <strong> path </strong> ( <em> str </em> ) – the path to the bundle </p> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> The bundle object at the path, None if there isn’t one </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.GraphContext.get_elapsed_time"> <span class="sig-name descname"> <span class="pre"> get_elapsed_time </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.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext"> <span class="pre"> omni.graph.core._omni_graph_core.GraphContext </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"> float </span> </span> </span> <dd> <p> Returns the time between last evaluation of the graph and “now” </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> the elapsed time </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> float </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_elem_count"> <span class="sig-name descname"> <span class="pre"> get_elem_count </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> </dl> ### get_elem_count Overloaded function. 1. get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, attribute_data: omni::graph::core::Py_AttributeData) -> int 2. get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute) -> int get_elem_count is deprecated. Use og.Controller.get_array_size() instead. ### get_frame Returns the global playback time in frames - Returns: the global playback time in frames - Return type: float ### get_graph Gets the graph associated with this graph context - Returns: The graph associated with this graph context. - Return type: omni.graph.core.Graph ### get_graph_target Get the Prim path of the graph target. Parameters: - **index** (int) – The index of instance to fetch. By default, the graph context index is used. Returns: - The prim path of the current graph target. Return type: str <p> str </p> ### get_input_bundle ```python get_input_bundle(*args, **kwargs) ``` Overloaded function. 1. ```python get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) -> omni.graph.core._omni_graph_core.IConstBundle2 ``` Get the bundle object as read only. ``` Args: path (str): the path to the bundle Returns: omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one ``` 2. ```python get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> omni.graph.core._omni_graph_core.IConstBundle2 ``` Get a bundle object that is an input attribute. ``` Args: node (omni.graph.core.Node): the node on which the bundle can be found attribute_name (str): the name of the input attribute instance (int): an instance index when getting value on an instantiated graph Returns: omni.graph.core.IConstBundle2: The bundle object at the path, None if there isn’t one ``` ### get_input_target_bundles ```python get_input_target_bundles(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> List[omni.graph.core._omni_graph_core.IConstBundle2] ``` Get all input targets in the relationship with the given name on the specified compute node. The targets are returned as bundle objects. Parameters: - **node** (omni.graph.core.Node) – the node on which the input targets can be found - **attribute_name** (str) – the name of the relationship attribute - **instance** (int) – an instance index when getting value on an instantiated graph Returns: The list of input targets, as bundle objects. ``` ### Return type - list[omni.graph.core.IConstBundle2] ### get_is_playing - **Function:** get_is_playing(self: omni.graph.core._omni_graph_core.GraphContext) - **Returns:** True if playback has started, False if playback is stopped - **Return type:** bool ### get_output_bundle - **Function:** get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, *args, **kwargs) - **Description:** Overloaded function. - 1. get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) -> omni.graph.core._omni_graph_core.IBundle2 - **Description:** Get a bundle object that is an output attribute. - **Args:** - path (str): the path to the bundle - **Returns:** omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one - 2. get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> omni.graph.core._omni_graph_core.IBundle2 - **Description:** Get a bundle object that is an output attribute. - **Args:** - node (omni.graph.core.Node): the node on which the bundle can be found - attribute_name (str): the name of the output attribute - instance (int): an instance index when getting value on an instantiated graph - **Returns:** omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one ### get_time - **Function:** get_time(self: omni.graph.core._omni_graph_core.GraphContext) - **Returns:** the global playback time in seconds - **Return type:** float ### get_time_since_start - **Function:** get_time_since_start(self: omni.graph.core._omni_graph_core.GraphContext) - **Returns:** the time since start of global playback - **Return type:** float ### get_time_since_start Returns the elapsed time since the app started #### Returns - the number of seconds since the app started in seconds #### Return type - float ### inspect Runs the inspector on the graph context #### Parameters - **inspector** (`omni.inspect.Inspector`) – The inspector to run #### Returns - True if the inspector was successfully run on the context, False if it is not supported #### Return type - bool ### is_valid Checks to see if this graph context object is valid #### Returns - True if this object is valid #### Return type - bool ### set_bool_attribute set_bool_attribute is deprecated. Use og.Controller.set() instead. ### set_boolarray_attribute ### set_boolarray_attribute ```python set_boolarray_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[bool], arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` set_boolarray_attribute is deprecated. Use og.Controller.set() instead. ### set_double_attribute ```python set_double_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` set_double_attribute is deprecated. Use og.Controller.set() instead. ### set_double_matrix_attribute ```python set_double_matrix_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` set_double_matrix_attribute is deprecated. Use og.Controller.set() instead. ### set_doublearray_attribute ```python set_doublearray_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` set_doublearray_attribute is deprecated. Use og.Controller.set() instead. ### set_doublearray_attribute ```python set_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_doublearray_attribute is deprecated. Use og.Controller.set() instead. ### set_float_attribute ```python set_float_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_float_attribute is deprecated. Use og.Controller.set() instead. ### set_floatarray_attribute ```python set_floatarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_floatarray_attribute is deprecated. Use og.Controller.set() instead. ### set_half_attribute ```python set_half_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_half_attribute is deprecated. Use og.Controller.set() instead. ### set_half_attribute ```python set_half_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_half_attribute is deprecated. Use og.Controller.set() instead. ### set_halfarray_attribute ```python set_halfarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_halfarray_attribute is deprecated. Use og.Controller.set() instead. ### set_int64_attribute ```python set_int64_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_int64_attribute is deprecated. Use og.Controller.set() instead. ### set_int64array_attribute ```python set_int64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_int64array_attribute is deprecated. Use og.Controller.set() instead. ### set_int64array_attribute ```python set_int64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_int64array_attribute is deprecated. Use og.Controller.set() instead. ### set_int_attribute ```python set_int_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_int_attribute is deprecated. Use og.Controller.set() instead. ### set_intarray_attribute ```python set_intarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_intarray_attribute is deprecated. Use og.Controller.set() instead. ### set_nested_doublearray_attribute ```python set_nested_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None ``` set_nested_doublearray_attribute is deprecated. Use og.Controller.set() instead. ### set_nested_doublearray_attribute ```python set_nested_doublearray_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` **Deprecated:** Use `og.Controller.set()` instead. ### set_nested_floatarray_attribute ```python set_nested_floatarray_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` **Deprecated:** Use `og.Controller.set()` instead. ### set_nested_halfarray_attribute ```python set_nested_halfarray_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` **Deprecated:** Use `og.Controller.set()` instead. ### set_nested_intarray_attribute ```python set_nested_intarray_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[int]], arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` **Deprecated:** Use `og.Controller.set()` instead. arg0 : arg1 : omni.graph.core._omni_graph_core.Attribute ) → None set_nested_intarray_attribute is deprecated. Use og.Controller.set() instead. set_string_attribute ( self : omni.graph.core._omni_graph_core.GraphContext, arg0 : str, arg1 : omni.graph.core._omni_graph_core.Attribute ) → None set_string_attribute is deprecated. Use og.Controller.set() instead. set_uchar_attribute ( self : omni.graph.core._omni_graph_core.GraphContext, arg0 : int, arg1 : omni.graph.core._omni_graph_core.Attribute ) → None set_uchar_attribute is deprecated. Use og.Controller.set() instead. set_uchararray_attribute ( self : omni.graph.core._omni_graph_core.GraphContext, arg0 : int ) ### set_uchararray_attribute ```python set_uchararray_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` **Deprecated**: Use og.Controller.set() instead. ### set_uint64_attribute ```python set_uint64_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` **Deprecated**: Use og.Controller.set() instead. ### set_uint64array_attribute ```python set_uint64array_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` **Deprecated**: Use og.Controller.set() instead. ### set_uint_attribute ```python set_uint_attribute( self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute ) -> None ``` **Deprecated**: Use og.Controller.set() instead. ### set_uint_attribute ```python def set_uint_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg1: omni.graph.core._omni_graph_core.Attribute) -> None: pass ``` **Deprecated:** Use `og.Controller.set()` instead. ### set_uintarray_attribute ```python def set_uintarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None: pass ``` **Deprecated:** Use `og.Controller.set()` instead. ### write_bucket_to_backing ```python def write_bucket_to_backing(self: omni.graph.core._omni_graph_core.GraphContext, bucket_id: omni::fabric::BucketId) -> None: pass ``` **Obsolete:** This method does not function anymore. Use the USD API directly to write back to USD. ```
omni.graph.core.GraphController.md
# GraphController ## GraphController Helper class that provides a simple interface to modifying the contents of a graph ### Methods - **__init__(*args, **kwargs)** - Initializes the class with a particular configuration. - **connect(*args, **kwargs)** - Create a connection between two attributes - **create_graph(*args, **kwargs)** - Create a graph from the description - **create_node(*args, **kwargs)** - Create an OmniGraph node of the given type and version at the given path. - **create_prim(*args, **kwargs)** - Create a prim node containing a predefined set of attribute values and a ReadPrim OmniGraph node for it | Method | Description | | --- | --- | | `create_variable(*args, **kwargs)` | Creates a variable with the given name on the graph | | `delete_node(*args, **kwargs)` | Deletes one or more OmniGraph nodes. | | `disconnect(*args, **kwargs)` | Break a connection between two attributes | | `disconnect_all(*args, **kwargs)` | Break all connections to and from an attribute | | `expose_prim(*args, **kwargs)` | Create a new compute node attached to an ordinary USD prim or list of prims. | | `exposed_attribute_name(exposure_type)` | Returns the name of the attribute that will be used to expose the prim for a given exposure type | | `get_variable_default_value(variable_id)` | Gets the default value of the given variable | | `node_type_to_expose(exposure_type)` | Returns the type of node that will be used to expose the prim for a given exposure type | | `set_variable_default_value(variable_id, value)` | Sets the default value of a variable object. | ### Attributes | Attribute | Description | | --- | --- | | `ExposePrimNode_t(*args, **kwargs)` | Typing for information required to expose a prim in a node | | `ExposePrimNodes_t(*args, **kwargs)` | Typing for information required to expose a list of prims in nodes | | `PrimExposureType_t(*args, **kwargs)` | Flexible type to specify how to expose the prim | ### `__init__(*args, **kwargs)` ## Class Initialization 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. Both arguments are optional, and there may be other arguments present that will be ignored. ### Parameters - **update_usd** (`bool`) – Should any graphs, nodes, and prims referenced in operations be updated immediately to USD? (default `True`) - **undoable** (`bool`) – If `True` the operations performed with this instance of the class are added to the undo queue, else they are done immediately and forgotten (default `True`) - **allow_exists_node** – If `True` then succeed creation of a node when matching path, type, and version already exists. It is still a failure if one of those properties on the existing node does not match. - **allow_exists_prim** – If `True` then succeed creation of a prim when matching path and type already exists. It is still a failure if type on the existing prim does not match. ## PrimExposureType Class Bases: `Enum` Value that specifies the method of exposing USD prims to OmniGraph ### Attributes - **AS_ATTRIBUTES** (`'attributes'`) – Expose the prim via a node that creates outputs for all of the prim’s attributes - **AS_BUNDLE** (`'bundle'`) – Expose the prim via a node that creates a single output bundle with all of the prim’s attributes - **AS_WRITABLE** (`'writable'`) – Expose the prim to be written to via a node that creates inputs for the prim’s attributes ## connect Method Create a connection between two attributes. 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 the source end of the connection - **dst_spec** – Specification of the attribute to be the destination end of the connection - **update_usd** – If specified then override whether to delete the node’s USD backing (default `True`) ### create_graph **classmethod** `create_graph(*args, **kwargs)` - **Returns**: Graph - **Description**: Create a graph from the description. 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. The second argument can be positional or by keyword and is mandatory, resulting in an error if omitted. 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. #### Code Example ```python new_graph = og.GraphController.create_graph("/TestGraph") controller = og.GraphController(undoable=True) controller.create_graph({"graph_path": "/UndoableGraph", "evaluator_name": "execution"}) ``` #### Parameters - **obj** – Either cls or self, depending on how the function was called - **graph_id** – Parameters describing the graph to be created. If the graph is just a path then a default graph will be created at that location. If the identifier is a dictionary then it will be interpreted as a set of parameters describing the type of graph to create: - **graph_path**: Full path to the graph prim to be created to house the OmniGraph - **evaluator_name**: Type of evaluator the graph should use (default push) - **fc_backing_type**: og.GraphBackingType that tells you what kind of Fabric to use for graph data (default og.GraphBackingType.GRAPH_BACKING_TYPE_FABRIC_SHARED) - **pipeline_stage**: og.GraphPipelineStage that tells you which pipeline stage this graph fits into (default og.GraphPipelineStage.GRAPH_PIPELINE_STAGE_SIMULATION) - **evaluation_mode**: og.GraphEvaluationMode that tells you which evaluation mode this graph uses (default og.GraphEvaluationMode.GRAPH_EVALUATION_MODE_AUTOMATIC) - **update_usd** (bool) – If specified then override whether to create the graph with a USD backing (default True) - **undoable** (bool) – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) #### Returns - The created graph #### Return type - omni.graph.core.Graph #### Raises - **OmniGraphError** – if the graph creation failed for any reason ### create_node **GraphController.create_node**(*obj*, *node_id*, *node_type_id*, *allow_exists=False*, *version=None*, *update_usd=True*, *undoable=True*) - **Description**: Create an OmniGraph node of the given type and version at the given path. - 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. “node_id” and “node_type_id” are mandatory, and can be specified either as positional or keyword arguments. All others are by keyword only and optional, defaulting to the value set in the constructor in the object context where available, and the function defaults elsewhere. - **Usage**: ```python og.GraphController.create_node("/MyGraph/MyNode", "omni.graph.nodes.NodeType") og.GraphController(update_usd=True).create_node("/MyGraph/MyNode", "omni.graph.nodes.NodeType") og.GraphController.create_node("/MyGraph/MyNode", "omni.graph.nodes.NodeType", update_usd=True) og.GraphController.create_node(node_id="/MyGraph/MyNode", node_type="omni.graph.nodes.NodeType") ``` - **Parameters**: - **obj** – Either cls or self, depending on how the function was called - **node_id** – Absolute path, or (Relative Path, Graph) where the node will be constructed. If an absolute path was passed in it must be part of an existing graph. - **node_type_id** – Unique identifier for the type of node to create (name or og.NodeType) - **allow_exists** – If True then succeed if a node with matching path, type, and version already exists. It is still a failure if one of those properties on the existing node does not match. - **version** – Version of the node type to create. By default it creates the most recent. - **update_usd** – If specified then override whether to create the node with a USD backing or not (default True) - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) - **Raises**: - **og.OmniGraphError** – If one or more of the nodes could not be added to the scene for some reason. - **Returns**: - Node(s) added to the scene - **Return type**: - omni.graph.core.Node | list[omni.graph.core.Node] ### create_prim **GraphController.create_prim**(*obj*, *prim_path*, *undoable=True*, *update_usd=True*, *allow_exists=False*, *version=None*) - **Description**: Create a prim node containing a predefined set of attribute values and a ReadPrim OmniGraph node for it. - 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. The “prim_path” is mandatory and can appear as either a positional or keyword argument. All others are optional, also by position or keyword, defaulting to the value set in the constructor in the object context if available, and the function defaults elsewhere. - **Usage**: ```python og.GraphController.create_prim("/MyPrim") og.GraphController(undoable=False).create_prim("/MyPrim", undoable=True) # Will be undoable ``` - **Parameters**: - **obj** – Either cls or self, depending on how the function was called - **prim_path** – Path to the prim to be created - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) - **update_usd** – If specified then override whether to create the node with a USD backing or not (default True) - **allow_exists** – If True then succeed if a node with matching path, type, and version already exists. It is still a failure if one of those properties on the existing node does not match. - **version** – Version of the node type to create. By default it creates the most recent. - **Returns**: - Prim - **Return type**: - Prim ```python og.GraphController().create_prim(prim_path="/MyPrim", prim_type="MyPrimType") og.GraphController.create_prim("/MyPrim") ``` ### Parameters - **obj** – Either cls or self depending on how the function was called - **prim_path** – Location of the prim - **attribute_values** – Dictionary of {NAME: (TYPE, VALUE)} for all prim attributes. The TYPE recognizes OGN format, SDF format, or og.Type values. The VALUE should be in a format suitable for passing to pxr::UsdAttribute.Set() - **prim_type** – The type of prim to create. (default “OmniGraphPrim”) - **allow_exists** – If True then succeed if a prim with matching path and type already exists. It is still a failure if type on the existing prim does not match. - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) ### Returns - Prim created ### Return type - Usd.Prim ### Raises - **OmniGraphError** – If any of the attribute specifications could not be applied to the prim, or if the prim could not be created. ### create_variable ```python classmethod create_variable(*args, **kwargs) → IVariable ``` Creates a variable with the given name on the graph. 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 - **graph_id** – The graph to create a variable on - **name** – The name of the variable to create - **var_type** – The type of the variable to create, either a string or an OG.Type - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) - **default_value** – The default value of the variable to set, or None to not set a default value. (default None) #### Raises - **OmniGraphError** – If the variable can’t be created #### Returns - The created variable #### Return type - omni.graph.core.IVariable ``` ### delete_node ```python classmethod delete_node(*args, **kwargs) ``` ``` ) → bool Deletes one or more OmniGraph nodes. 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_id** – Specification of a node or list of nodes to be deleted - **graph_id** – Only required if the node_id does not contain enough information to uniquely identify it - **ignore_if_missing** – If True then succeed even if no node with a matching path exists - **update_usd** – If specified then override whether to delete the node’s USD backing (default True) - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) Raises ------ - **OmniGraphError** – If the node does not exist Returns ------- - True if the node was successfully deleted Return type ------------ - bool ``` classmethod disconnect ( *args , **kwargs ) Break a connection between two attributes 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 that is the source end of the connection - **dst_spec** – Specification of the attribute that is the destination end of the connection - **update_usd** – If specified then override whether to delete the node’s USD backing (default True) - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) Raises ------ - **OmniGraphError** – If attributes could not be found or the disconnection fails ``` classmethod disconnect_all ( *args , **kwargs ) Break all connections to and from an attribute 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 that is the source end of the connection - **dst_spec** – Specification of the attribute that is the destination end of the connection - **update_usd** – If specified then override whether to delete the node’s USD backing (default True) - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) Raises ------ - **OmniGraphError** – If attributes could not be found or the disconnection fails ``` - **obj** – Either cls or self depending on how the function was called - **attribute_spec** – Attribute whose connections are to be removed. (attr or (attr, node) pair) - **update_usd** – If specified then override whether to delete the node’s USD backing (default True) - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) Raises: - **OmniGraphError** – If attribute could not be found, connection didn’t exist, or disconnection fails ``` ```markdown classmethod expose_prim(*args, **kwargs) -> Node Create a new compute node attached to an ordinary USD prim or list of prims. 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 - **exposure_type** – Method for exposing the prim to OmniGraph - **prim_id** – Identifier of an existing prim in the USD stage - **node_path_id** – Identifier of a node path that is valid but does not currently exist - **update_usd** – If specified then override whether to delete the node’s USD backing (default True) - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) Returns: - Node exposing the prim to OmniGraph Return type: - omni.graph.core.Node Raises: - **og.OmniGraphError** – if the prim does not exist, or the node path already exists ``` ```markdown classmethod exposed_attribute_name(exposure_type: PrimExposureType_t) -> str Returns the name of the attribute that will be used to expose the prim for a given exposure type Parameters: - **exposure_type** – Type of exposure desired Returns: - Name of the attribute at which a connection should be made to the prim for exposure Return type: - str ``` ### omni.graph.core.GraphController.get_variable_default_value ```python def get_variable_default_value(variable_id: 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]) -> Any ``` - **Description**: Gets the default value of the given variable - **Parameters**: - **variable_id** – The variable whose value is to be set - **Returns**: The default value of the variable. - **Return type**: Any - **Raises**: - **OmniGraphError** – If the variable is not valid or does not have valid usd backing. ### omni.graph.core.GraphController.node_type_to_expose ```python @classmethod def node_type_to_expose(exposure_type: PrimExposureType_t) -> str ``` - **Description**: Returns the type of node that will be used to expose the prim for a given exposure type - **Parameters**: - **exposure_type** – Type of exposure desired - **Returns**: Node type of the appropriate omni.graph.core.Node to use to expose the prim - **Return type**: str ``` ### omni.graph.core.GraphController.set_variable_default_value ```python @classmethod def set_variable_default_value(variable_id: str | pxr.Sdf.Path) -> None ``` - **Description**: [Description of the function] - **Parameters**: - **variable_id** – The variable ID - **Returns**: None - **Return type**: None ``` Sets the default value of a variable object. Parameters: - **variable_id** – The variable whose value is to be set - **value** – The value to set Raises: - **OmniGraphError** – If the variable is not valid, does not have valid usd backing, or value - **is not a compatible type** – Typing for information required to expose a prim in a node alias of Tuple[str | Path | Node | Prim | Typed | Graph, str | Path | tuple[str | Path | Graph | Prim | Typed]] </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.GraphController.ExposePrimNodes_t"> <span class="sig-name descname"> <span class="pre"> ExposePrimNodes_t </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.GraphController.ExposePrimNodes_t" title="Permalink to this definition">  </a> </dt> <dd> <p> Typing for information required to expose a list of prims in nodes </p> <p> alias of <code> Union </code> [ <code> Tuple </code> [ <code> str </code> | <code> Path </code> | <code> Node </code> | <code> Prim </code> | <code> Typed </code> | <code> Graph </code> , <code> str </code> | <code> Path </code> | <code> tuple </code> [ <code> str </code> | <code> Path </code> | <code> Graph </code> | <code> Prim </code> | <code> Typed </code> ]], <code> List </code> [ <code> Tuple </code> [ <code> str </code> | <code> Path </code> | <code> Node </code> | <code> Prim </code> | <code> Typed </code> | <code> Graph </code> , <code> str </code> | <code> Path </code> | <code> tuple </code> [ <code> str </code> | <code> Path </code> | <code> Graph </code> | <code> Prim </code> | <code> Typed </code> ]]] </p> </dd> </dl> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.GraphController.PrimExposureType_t"> <span class="sig-name descname"> <span class="pre"> PrimExposureType_t </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.GraphController.PrimExposureType_t" title="Permalink to this definition">  </a> </dt> <dd> <p> Flexible type to specify how to expose the prim alias of ``` ``` Union ``` ``` str ``` , ``` PrimExposureType ``` ```
omni.graph.core.GraphEvaluationMode.md
# GraphEvaluationMode ## GraphEvaluationMode ``` Bases: `pybind11_object` How the graph evaluation is scheduled Members: - GRAPH_EVALUATION_MODE_AUTOMATIC : Evaluation is scheduled based on graph type - GRAPH_EVALUATION_MODE_STANDALONE : Evaluation is scheduled as a single graph - GRAPH_EVALUATION_MODE_INSTANCED : Evaluation is scheduled by instances ### Methods - `__init__(self, value)` ### Attributes - `GRAPH_EVALUATION_MODE_AUTOMATIC` - `GRAPH_EVALUATION_MODE_INSTANCED` - `GRAPH_EVALUATION_MODE_STANDALONE` - `name` - `value` **self** : **omni.graph.core._omni_graph_core.GraphEvaluationMode**, **value** : **int** ) → **None** **property** **name**
omni.graph.core.GraphEvaluationMode_omni.graph.core.GraphEvaluationMode.md
# GraphEvaluationMode ## GraphEvaluationMode Bases: `pybind11_object` How the graph evaluation is scheduled Members: - GRAPH_EVALUATION_MODE_AUTOMATIC : Evaluation is scheduled based on graph type - GRAPH_EVALUATION_MODE_STANDALONE : Evaluation is scheduled as a single graph - GRAPH_EVALUATION_MODE_INSTANCED : Evaluation is scheduled by instances ### Methods - `__init__`(self, value) ### Attributes - `GRAPH_EVALUATION_MODE_AUTOMATIC` - `GRAPH_EVALUATION_MODE_INSTANCED` - `GRAPH_EVALUATION_MODE_STANDALONE` - `name` - `value` <em> <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.GraphEvaluationMode </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> value </span> </span> <span class="p"> <span class="pre"> : </span> </span> <span class="w"> </span> <span class="n"> <span class="pre"> int </span> </span> </em> ) <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> None </span> </span> </span> </dt> <dd> </dd> </dl> <dl class="py property"> <dt class="sig sig-object py" id="omni.graph.core.GraphEvaluationMode.name"> <em class="property"> <span class="pre"> property </span> <span class="w"> </span> </em> <span class="sig-name descname"> <span class="pre"> name </span> </span> </dt> <dd> </dd> </dl> </dd> </dl> </section> </div> </div> <footer> <hr/> </footer> </div> </div> </section> </div>
omni.graph.core.GraphEvent.md
# GraphEvent ## GraphEvent Bases: `pybind11_object` Graph modification event. Members: - CREATE_VARIABLE : Variable was created - REMOVE_VARIABLE : Variable was removed - VARIABLE_TYPE_CHANGE : Variable type was changed ### Methods - `__init__(self, value)` ### Attributes - `CREATE_VARIABLE` - `REMOVE_VARIABLE` - `VARIABLE_TYPE_CHANGE` - `name` - `value` : omni.graph.core._omni_graph_core.GraphEvent , value: int ) → None property name name
omni.graph.core.GraphPipelineStage.md
# GraphPipelineStage ## GraphPipelineStage Pipeline stage in which the graph lives Members: - GRAPH_PIPELINE_STAGE_SIMULATION: The regular evaluation stage - GRAPH_PIPELINE_STAGE_PRERENDER: The stage that evaluates just before rendering - GRAPH_PIPELINE_STAGE_POSTRENDER: The stage that evaluates just after rendering - GRAPH_PIPELINE_STAGE_ONDEMAND: The stage evaluating only when requested - GRAPH_PIPELINE_STAGE_UNKNOWN: The stage is not currently known ### Methods - `__init__(self, value)` ### Attributes - `GRAPH_PIPELINE_STAGE_ONDEMAND` - `GRAPH_PIPELINE_STAGE_POSTRENDER` - `GRAPH_PIPELINE_STAGE_PRERENDER` - `GRAPH_PIPELINE_STAGE_SIMULATION` - `GRAPH_PIPELINE_STAGE_UNKNOWN` | name | | ---- | | value | ```init__``` ( self : omni.graph.core._omni_graph_core.GraphPipelineStage , value : int ) → None ```property``` name ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ``` ```
omni.graph.core.GraphRegistry.md
# GraphRegistry Manager of the node types registered to OmniGraph. ## Methods - `__init__(self)` - `get_event_stream(self)` - Get the event stream for the graph registry change notification. - `get_node_type_version(self, node_type_name)` - Finds the version number of the given node type. - `inspect(self, inspector)` - Runs the inspector on the graph registry ## Methods ### get_event_stream ```python get_event_stream(self: omni.graph.core._omni_graph_core.GraphRegistry) -> carb.events._events.IEventStream ``` Get the event stream for the graph registry change notification. The events that are raised are specified by GraphRegistryEvent. The payload for the added and removed events is the name of the node type being added or removed, and uses the key “node_type”. **Returns:** Event stream to monitor for graph registry changes **Return type:** carb.events.IEventStream ### get_node_type_version ```python get_node_type_version(self: omni.graph.core._omni_graph_core.GraphRegistry, node_type_name: str) -> int ``` Finds the version number of the given node type. **Parameters:** - **node_type_name** (str) – Name of the node type to check **Returns:** Version number registered for the node type, None if it is not registered **Return type:** int ### inspect ```python inspect(self: omni.graph.core._omni_graph_core.GraphRegistry, inspector: omni::core::Api<omni::inspect::IInspector_abi>) -> bool ``` Runs the inspector on the graph registry **Parameters:** - **inspector** (omni.inspect.Inspector) – The inspector to run **Returns:** True if the inspector was successfully run on the graph registry, False if it is not supported **Return type:** bool
omni.graph.core.GraphRegistryEvent.md
# GraphRegistryEvent ## GraphRegistryEvent ```python class omni.graph.core.GraphRegistryEvent ``` **Bases:** `pybind11_object` **Description:** Graph Registry modification event. **Members:** - `NODE_TYPE_ADDED`: Node type was registered - `NODE_TYPE_REMOVED`: Node type was deregistered - `NODE_TYPE_NAMESPACE_CHANGED`: Namespace of a node type changed - `NODE_TYPE_CATEGORY_CHANGED`: Category of a node type changed - `STAGE_PRE_ATTACH`: A stage is being attached ### Methods ```python __init__(self, value) ``` ### Attributes - `NODE_TYPE_ADDED` - `NODE_TYPE_CATEGORY_CHANGED` - `NODE_TYPE_NAMESPACE_CHANGED` - `NODE_TYPE_REMOVED` - `STAGE_PRE_ATTACH` - `name` ```
omni.graph.core.GraphRegistryEvent_omni.graph.core.GraphRegistryEvent.md
# GraphRegistryEvent ## GraphRegistryEvent Bases: `pybind11_object` Graph Registry modification event. Members: - NODE_TYPE_ADDED : Node type was registered - NODE_TYPE_REMOVED : Node type was deregistered - NODE_TYPE_NAMESPACE_CHANGED : Namespace of a node type changed - NODE_TYPE_CATEGORY_CHANGED : Category of a node type changed - STAGE_PRE_ATTACH : A stage is being attached ### Methods - `__init__(self, value)` ### Attributes - `NODE_TYPE_ADDED` - `NODE_TYPE_CATEGORY_CHANGED` - `NODE_TYPE_NAMESPACE_CHANGED` - `NODE_TYPE_REMOVED` - `STAGE_PRE_ATTACH` - `name` | Column 1 | Column 2 | |----------|----------| | `value` | | | `value` | | __init__(self: omni.graph.core._omni_graph_core.GraphRegistryEvent, value: int) -> None property name
omni.graph.core.GraphSettings.md
# GraphSettings ## GraphSettings ```python class omni.graph.core.GraphSettings(evaluator_type: str = 'push', file_format_version: ~typing.Tuple[int, int] = (0, 0), fabric_backing: str = &lt;GraphBackingType.GRAPH_BACKING_TYPE_FLATCACHE_SHARED: 0&gt;, pipeline_stage: str = &lt;GraphPipelineStage.GRAPH_PIPELINE_STAGE_SIMULATION: 10&gt;, evaluation_mode: str = &lt;GraphEvaluationMode.GRAPH_EVALUATION_MODE_STANDALONE: 1&gt;) ``` Bases: `object` Container for the set of settings in a graph. This is a class instead of a tuple so that future additions to the settings do not break backward compatibility ### Methods | Method | Description | |--------|-------------| | `__init__(evaluator_type, file_format_version, fabric_backing, pipeline_stage, evaluation_mode)` | | ### Attributes | Attribute | Description | |-----------|-------------| | `evaluation_mode` | | ``` | Property | Description | |----------|-------------| | `evaluation_mode` | Default evaluation mode of the graph | | `evaluator_type` | Type of evaluator to use by default on the graph | | `fabric_backing` | Type of data backing the graph has | | `file_format_version` | File format version used when creating the graph | | `pipeline_stage` | Pipeline stage to which the graph belongs | ### `__init__(evaluator_type: str = 'push', file_format_version: ~typing.Tuple[int, int] = (0, 0), fabric_backing: str = &lt;GraphBackingType.GRAPH_BACKING_TYPE_FLATCACHE_SHARED: 0&gt;, pipeline_stage: str = &lt;GraphPipelineStage.GRAPH_PIPELINE_STAGE_SIMULATION: 10&gt;, evaluation_mode: str = &lt;GraphEvaluationMode.GRAPH_EVALUATION_MODE_STANDALONE: 1&gt;) -> None` - **Parameters**: - `evaluator_type`: Type of evaluator, default 'push' - `file_format_version`: Tuple of integers, default (0, 0) - `fabric_backing`: Type of data backing, default &lt;GraphBackingType.GRAPH_BACKING_TYPE_FLATCACHE_SHARED: 0&gt; - `pipeline_stage`: Pipeline stage, default &lt;GraphPipelineStage.GRAPH_PIPELINE_STAGE_SIMULATION: 10&gt; - `evaluation_mode`: Evaluation mode, default &lt;GraphEvaluationMode.GRAPH_EVALUATION_MODE_STANDALONE: 1&gt; - **Returns**: None ### `evaluation_mode: str = &lt;GraphEvaluationMode.GRAPH_EVALUATION_MODE_STANDALONE: 1&gt;` - **Description**: Default evaluation mode of the graph ### `evaluator_type: str = 'push'` - **Description**: Type of evaluator to use by default on the graph ### `fabric_backing: str = &lt;GraphBackingType.GRAPH_BACKING_TYPE_FLATCACHE_SHARED: 0&gt;` - **Description**: Type of data backing the graph has ### fabric_backing Type of data backing the graph has ### file_format_version File format version used when creating the graph ### pipeline_stage Pipeline stage to which the graph belongs
omni.graph.core.IBundle2.md
# IBundle2 ## Class ```python class omni.graph.core.IBundle2(_IBundle2) ``` Provide read write 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 - `clear_contents(self[, bundle_metadata, ...])` - Removes all attributes and child bundles from this bundle, but keeps the bundle itself. - `copy_attribute(*args, **kwargs)` - Overloaded function. - `copy_attributes(*args, **kwargs)` - Overloaded function. ``` ```code copy_attributes ``` (*args, **kwargs) Overloaded function. ```code copy_bundle ``` (self, source_bundle[, overwrite]) Copy bundle data and metadata from the source bundle to this bundle. ```code copy_child_bundle ``` (*args, **kwargs) Overloaded function. ```code copy_child_bundles ``` (*args, **kwargs) Overloaded function. ```code create_attribute ``` (self, name, type, element_count) Creates attribute based on provided name and type. ```code create_attribute_like ``` (self, pattern_attribute) Use input attribute as pattern to create attribute in this bundle. ```code create_attribute_metadata ``` (*args, **kwargs) Overloaded function. ```code create_attributes ``` (self, names, types) Creates attributes based on provided names and types. ```code create_attributes_like ``` (self, pattern_attributes) Use input attributes as pattern to create attributes in this bundle. ```code create_bundle_metadata ``` (*args, **kwargs) Overloaded function. ```code create_child_bundle ``` (self, path) Creates immediate child bundle under specified path in this bundle. ```code create_child_bundles ``` (self, paths) Creates immediate child bundles under specified paths in this bundle. ```code get_attribute_by_name ``` (*args, **kwargs) Overloaded function. ```code get_attribute_data ``` (self[, write]) DEPRECATED - use get_attributes() instead ```code get_attribute_data_count ``` (self) DEPRECATED - use get_attribute_count() instead <tr class="row-even"> <td> <p> <code>get_attribute_metadata_by_name(*args, **kwargs)</code> </p> </td> <td> <p> Overloaded function. </p> </td> </tr> <tr class="row-odd"> <td> <p> <code>get_attribute_names_and_types(self)</code> </p> </td> <td> <p> DEPRECATED - use get_attribute_names() or get_attribute_types() instead </p> </td> </tr> <tr class="row-even"> <td> <p> <code>get_attributes(self)</code> </p> </td> <td> <p> Searches for attributes in this bundle by using attribute names. </p> </td> </tr> <tr class="row-odd"> <td> <p> <code>get_attributes_by_name(self, names)</code> </p> </td> <td> <p> Searches for attributes in this bundle by using attribute names. </p> </td> </tr> <tr class="row-even"> <td> <p> <code>get_bundle_metadata_by_name(*args, **kwargs)</code> </p> </td> <td> <p> Overloaded function. </p> </td> </tr> <tr class="row-odd"> <td> <p> <code>get_child_bundle(self, index)</code> </p> </td> <td> <p> Get the child bundle by index. </p> </td> </tr> <tr class="row-even"> <td> <p> <code>get_child_bundle_by_name(self, name)</code> </p> </td> <td> <p> Lookup for child under specified name. </p> </td> </tr> <tr class="row-odd"> <td> <p> <code>get_child_bundles(self)</code> </p> </td> <td> <p> Get all child bundle handles in this bundle. </p> </td> </tr> <tr class="row-even"> <td> <p> <code>get_child_bundles_by_name(self, names)</code> </p> </td> <td> <p> Lookup for children under specified names. </p> </td> </tr> <tr class="row-odd"> <td> <p> <code>get_metadata_storage(self)</code> </p> </td> <td> <p> DEPRECATED - DO NOT USE </p> </td> </tr> <tr class="row-even"> <td> <p> <code>get_parent_bundle(self)</code> </p> </td> <td> <p> Get the parent of this bundle </p> </td> </tr> <tr class="row-odd"> <td> <p> <code>get_prim_path(self)</code> </p> </td> <td> <p> DEPRECATED - use get_path() instead </p> </td> </tr> <tr class="row-even"> <td> <p> <code>insert_attribute(self, attribute_to_copy, name)</code> </p> </td> <td> <p> DEPRECATED - use copy_attribute() instead </p> </td> </tr> <tr class="row-odd"> <td> <p> <code>insert_bundle(self, bundle_to_copy)</code> </p> </td> <td> <p> DEPRECATED - use copy_bundle() instead. </p> </td> </tr> <tr class="row-even"> <td> <p> <code>is_read_only(self)</code> </p> </td> <td> Returns if this interface is read-only. is_valid (self) DEPRECATED - use bool cast instead link_attribute (*args, **kwargs) Overloaded function. link_attributes (*args, **kwargs) Overloaded function. link_child_bundle (*args, **kwargs) Overloaded function. link_child_bundles (*args, **kwargs) Overloaded function. remove_all_attributes (self) Remove all attributes from this bundle. remove_all_child_bundles (self) Remove all child bundles from this bundle. remove_attribute (*args, **kwargs) Overloaded function. remove_attribute_metadata (*args, **kwargs) Overloaded function. remove_attributes (*args, **kwargs) Overloaded function. remove_attributes_by_name (self, names) Looks up the attributes by names and remove their data and metadata. remove_bundle_metadata (*args, **kwargs) Overloaded function. remove_child_bundle (self, bundle) Looks up the bundle and if it is child of the bundle then remove it. remove_child_bundles (self, bundles) Looks up the bundles and if they are children of the bundle then remove them. remove_child_bundles_by_name (self, names) <p>Looks up child bundles by name and remove their data and metadata.</p> <p>Attributes</p> <dl> <dt>__init__(*args, **kwargs)</dt> <dd> <p>Overloaded function.</p> <ol> <li>__init__(self: omni.graph.core._omni_graph_core.IBundle2, arg0: omni.core._core.IObject) -&gt; None</li> <li>__init__(self: omni.graph.core._omni_graph_core.IBundle2) -&gt; None</li> </ol> </dd> </dl> <dl> <dt>add_attribute(self: omni.graph.core._omni_graph_core.IBundle2, type: omni::graph::core::Py_Type, name: str) -&gt; omni::graph::core::Py_AttributeData</dt> <dd><p>DEPRECATED - use create_attribute() instead.</p></dd> </dl> <dl> <dt>add_attributes(self: omni.graph.core._omni_graph_core.IBundle2, types: List[omni::graph::core::Py_Type], names: List[str]) -&gt; None</dt> <dd><p>DEPRECATED - use create_attributes() instead.</p></dd> </dl> <dl> <dt>clear(self: omni.graph.core._omni_graph_core.IBundle2) -&gt; None</dt> <dd><p>DEPRECATED - use clear_contents() instead</p></dd> </dl> <dl> <dt>clear_contents(self: omni.graph.core._omni_graph_core.IBundle2, bundle_metadata: bool = True, attributes: bool = True) -&gt; None</dt> <dd><p>DEPRECATED - use clear_contents() instead</p></dd> </dl> ### clear_contents Removes all attributes and child bundles from this bundle, but keeps the bundle itself. #### Parameters - **bundle_metadata** (bool) – Clears bundle metadata in this bundle. - **attributes** (bool) – Clears attributes in this bundle. - **child_bundles** (bool) – Clears child bundles in this bundle. #### Returns - Success if successfully cleared. #### Return type - omni.core.Result ### copy_attribute Overloaded function. 1. copy_attribute(self: omni.graph.core._omni_graph_core.IBundle2, attribute: omni::graph::core::Py_AttributeData, overwrite: bool = True) -> omni::graph::core::Py_AttributeData - Create new attribute by copying existing one, including its data. - Created attribute is owned by this bundle. - Args: - attribute (omni.graph.core.AttributeData): Attribute whose data type is to be copied. - overwrite (bool): Overwrite existing attribute in this bundle. - Returns: - omni.graph.core.AttributeData: Copied attribute. 2. copy_attribute(self: omni.graph.core._omni_graph_core.IBundle2, name: str, attribute: omni::graph::core::Py_AttributeData, overwrite: bool = True) -> omni::graph::core::Py_AttributeData - Create new attribute by copying existing one, including its data. - Created attribute is owned by this bundle. - Args: - name (str): The new name for copied attribute. - attribute (omni.graph.core.AttributeData): Attribute whose data type is to be copied. - overwrite (bool): Overwrite existing attribute in this bundle. - Returns: - omni.graph.core.AttributeData: Copied attribute. ### copy_attributes Overloaded function. 1. copy_attributes(self: omni.graph.core._omni_graph_core.IBundle2, attributes: List[omni::graph::core::Py_AttributeData], overwrite: bool = True) -> List[omni::graph::core::Py_AttributeData] - Create new attributes by copying existing ones, including their data. - Names of new attributes are taken from source attributes. - Created attributes are owned by this bundle. - Args: - attributes (list[omni.graph.core.AttributeData]): Attributes whose data type is to be copied. - overwrite (bool): Overwrite existing attributes in this bundle. - Returns: - list[omni.graph.core.AttributeData]: Copied attributes. ### Returns: - list[omni.graph.core.AttributeData]: A list of copied attributes. ### copy_attributes(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str], attributes: List[omni::graph::core::Py_AttributeData], overwrite: bool = True) -> List[omni::graph::core::Py_AttributeData] Create new attributes by copying existing ones, including their data, with possibility of giving them new names. Created attributes are owned by this bundle. #### Args: - names (list[str]): Names for the new attributes. - attributes (list[omni.graph.core.AttributeData]): Attributes whose data type is to be copied. - overwrite (bool): Overwrite existing attributes in this bundle. #### Returns: - list[omni.graph.core.AttributeData]: A list of copied attributes. ### copy_bundle(self: omni.graph.core._omni_graph_core.IBundle2, source_bundle: omni.graph.core._omni_graph_core.IConstBundle2, overwrite: bool = True) -> None Copy bundle data and metadata from the source bundle to this bundle. #### Parameters: - source_bundle (omni.graph.core.IConstBundle2): Bundle whose data is to be copied. - overwrite (bool): Overwrite existing content of the bundle. ### copy_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, *args, **kwargs) Overloaded function. 1. copy_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, bundle: omni.graph.core._omni_graph_core.IConstBundle2, name: Optional[str] = None) -> omni.graph.core._omni_graph_core.IBundle2 Create new child bundle by copying existing one, with possibility of giving child a new name. Created bundle is owned by this bundle. #### Args: - bundle (omni.graph.core.IConstBundle2): Bundle whose data is to be copied. - name (str): Name of new child. #### Returns: - omni.graph.core.IBundle2: Newly copied bundle. 2. copy_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, name: str, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.IBundle2 Create new child bundle by copying existing one, with possibility of giving child a new name. Created bundle is owned by this bundle. #### Args: - name (str): Name of new child. - bundle (omni.graph.core.IConstBundle2): Bundle whose data is to be copied. #### Returns: - omni.graph.core.IBundle2: Newly copied bundle. Overloaded function. 1. copy_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2], names: Optional[List[str]] = None) -> List[omni.graph.core._omni_graph_core.IBundle2] Create new child bundles by copying existing ones, with possibility of giving children new names. Created bundles are owned by this bundle. Args: - bundles (list[omni.graph.core.IConstBundle2]): Bundles whose data is to be copied. - names (list[str]): Names of new children. Returns: - list[omni.graph.core.IBundle2]: Newly copied bundles. 2. copy_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str], bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.IBundle2] Create new child bundles by copying existing ones, with possibility of giving children new names. Created bundles are owned by this bundle. Args: - names (list[str]): Names of new children. - bundles (list[omni.graph.core.IConstBundle2]): Bundles whose data is to be copied. Returns: - list[omni.graph.core.IBundle2]: Newly copied bundles. Creates attribute based on provided name and type. Created attribute is owned by this bundle. Parameters: - name (str) – Name of the attribute. - type (omni.graph.core.Type) – Type of the attribute. - element_count (int) – Number of elements in the array. Returns: - Newly created attribute. Return type: - omni.graph.core.AttributeData ## create_attribute_like Use input attribute as pattern to create attribute in this bundle. The name and type are taken from pattern attribute, data is not copied. Created attribute is owned by this bundle. ### Parameters - **pattern_attribute** (`omni.graph.core.AttributeData`) – Attribute whose name and type is to be used to create new attribute. ### Returns - Newly created attribute. ### Return type - `omni.graph.core.AttributeData` ## create_attribute_metadata Overloaded function. 1. create_attribute_metadata(self: omni.graph.core._omni_graph_core.IBundle2, attribute: str, field_names: List[str], field_types: List[omni::graph::core::Py_Type]) -> List[omni::graph::core::Py_AttributeData] - Create attribute metadata fields. - Args: - attribute (str): Name of the attribute. - field_names (list[str]): Names of new metadata field. - field_types (list[omni.graph.core.Type]): Types of new metadata field. - element_count (int): Number of elements in the array. - Returns: - list[omni.graph.core.AttributeData]: Newly created metadata fields. 2. create_attribute_metadata(self: omni.graph.core._omni_graph_core.IBundle2, attribute: str, field_name: str, field_type: omni::graph::core::Py_Type, element_count: int = 0) -> omni::graph::core::Py_AttributeData - Create attribute metadata field. - Args: - attribute (str): Name of the attribute. - field_name (str): Name of new metadata field. - field_type (omni.graph.core.Type): Type of new metadata field. - Returns: - omni.graph.core.AttributeData: Newly created metadata field. ## create_attributes Creates attributes based on provided names and types. Created attributes are owned by this bundle. ### Parameters - **names** (list[str]) – Names of the attributes. - **types** (list[omni.graph.core.Type]) – Types of the attributes. ### Returns - A list of created attributes. ### Return type - list[omni.graph.core.AttributeData] ## create_attributes_like Use input attributes as pattern to create attributes in this bundle. Names and types for new attributes are taken from pattern attributes, data is not copied. Created attributes are owned by this bundle. ### Parameters - **pattern_attributes** (list[omni.graph.core.AttributeData]) – Attributes whose name and type is to be used to create new attributes. ### Returns - A list of newly created attributes. ### Return type - list[omni.graph.core.AttributeData] ## create_bundle_metadata Overloaded function. 1. create_bundle_metadata(self: omni.graph.core._omni_graph_core.IBundle2, field_names: List[str], field_types: List[omni::graph::core::Py_Type]) -> List[omni::graph::core::Py_AttributeData] - Creates bundle metadata fields based on provided names and types. - Created fields are owned by this bundle. **Args:** - field_names (list[str]): Names of the fields. - field_types (list[omni.graph.core.Type]): Types of the fields. - element_count (int): Number of elements in the array. **Returns:** - list[omni.graph.core.AttributeData]: A list of created fields. 2. create_bundle_metadata(self: omni.graph.core._omni_graph_core.IBundle2, field_name: str, field_type: omni::graph::core::Py_Type, element_count: int = 0) -> omni::graph::core::Py_AttributeData - Creates bundle metadata field based on provided name and type. - Created field are owned by this bundle. **Args:** - field_name (str): Name of the field. - field_type (omni.graph.core.Type): Type of the field. **Returns:** - omni.graph.core.AttributeData: Created field. ## create_child_bundle Creates immediate child bundle under specified path in this bundle. Created bundle is owned by this bundle. This method does not work recursively. Only immediate child can be created. ### Parameters - **path** (str) – New child path in this bundle. ### Returns - Created child bundle. ## Return type omni.graph.core.IBundle2 ## create_child_bundles ```python create_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, paths: List[str]) -> List[omni.graph.core._omni_graph_core.IBundle2] ``` Creates immediate child bundles under specified paths in this bundle. Created bundles are owned by this bundle. This method does not work recursively. Only immediate children can be created. ### Parameters **paths** (list[str]) – New children paths in this bundle. ### Returns A list of created child bundles. ### Return type list[omni.graph.core.IBundle2] ## get_attribute_by_name ```python get_attribute_by_name(self: omni.graph.core._omni_graph_core.IBundle2, *args, **kwargs) ``` Overloaded function. 1. get_attribute_by_name(self: omni.graph.core._omni_graph_core.IBundle2, name: str, readOnly: bool) -> omni::graph::core::Py_AttributeData 2. get_attribute_by_name(self: omni.graph.core._omni_graph_core.IBundle2, name: str) -> omni::graph::core::Py_AttributeData DEPRECATED - use get_attribute_by_name(name) instead ### 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. ## get_attribute_data ```python get_attribute_data(self: omni.graph.core._omni_graph_core.IBundle2, write: bool = False) ``` ### get_attribute_data DEPRECATED - use get_attributes() instead ### get_attribute_data_count DEPRECATED - use get_attribute_count() instead ### get_attribute_metadata_by_name(*args, **kwargs) Overloaded function. 1. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IBundle2, 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.IBundle2, 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_names_and_types DEPRECATED - use get_attribute_names() or get_attribute_types() instead ### get_attributes 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_attributes_by_name ```python get_attributes_by_name(self: omni.graph.core._omni_graph_core.IBundle2, 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 get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IBundle2, *args, **kwargs) ``` Overloaded function. 1. ```python get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IBundle2, 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 get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IBundle2, 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_child_bundle ```python get_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, index: int) ``` ## omni.graph.core._omni_graph_core.IBundle2 ### get_child_bundle 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.IBundle2 ### get_child_bundle_by_name Lookup for child under specified name. #### Parameters - **path** (str) – Name 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.IBundle2 ### 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.IBundle2] ### get_child_bundles_by_name Get child bundles by name. #### Parameters - **names** (List[str]) – Names of the child bundles to retrieve. #### Returns - List of child bundles matching the provided names. #### Return type - list[omni.graph.core.IBundle2] <span class="pre"> ] </span> </span> </span> </em> <span class="sig-paren"> ) </span> <span class="sig-return"> <span class="sig-return-icon"> → </span> <span class="sig-return-typehint"> <span class="pre"> List </span> <span class="p"> <span class="pre"> [ </span> </span> <span class="pre"> omni.graph.core._omni_graph_core.IBundle2 </span> <span class="p"> <span class="pre"> ] </span> </span> </span> </span> </dt> <dd> <p> Lookup for children under specified names. </p> <dl class="field-list simple"> <dt class="field-odd"> Parameters </dt> <dd class="field-odd"> <p> <strong> names </strong> ( <em> list </em> <em> [ </em> <em> str </em> <em> ] </em> ) – Names of child bundles in this bundle. </p> </dd> <dt class="field-even"> Returns </dt> <dd class="field-even"> <p> A list of found child bundles in this bundle. </p> </dd> <dt class="field-odd"> Return type </dt> <dd class="field-odd"> <p> list[ <span class="pre"> omni.graph.core.IBundle2 </span> ] </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IBundle2.get_metadata_storage"> <span class="sig-name descname"> <span class="pre"> get_metadata_storage </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.IBundle2 </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._omni_graph_core.IBundle2 </span> </span> </span> </dt> <dd> <p> DEPRECATED - DO NOT USE </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IBundle2.get_parent_bundle"> <span class="sig-name descname"> <span class="pre"> get_parent_bundle </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.IBundle2 </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._omni_graph_core.IBundle2 </span> </span> </span> </dt> <dd> <p> Get the parent of this bundle </p> <dl class="field-list simple"> <dt class="field-odd"> Returns </dt> <dd class="field-odd"> <p> The parent of this bundle, or invalid bundle if there is no parent. </p> </dd> <dt class="field-even"> Return type </dt> <dd class="field-even"> <p> <span class="pre"> omni.graph.core.IBundle2 </span> </p> </dd> </dl> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IBundle2.get_prim_path"> <span class="sig-name descname"> <span class="pre"> get_prim_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"> <span class="pre"> omni.graph.core._omni_graph_core.IBundle2 </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> DEPRECATED - use get_path() instead </p> </dd> </dl> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.IBundle2.insert_attribute"> <span class="sig-name descname"> <span class="pre"> insert_attribute </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.IBundle2 </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> attribute_to_copy: </span> <span class="pre"> omni::graph::core::Py_AttributeData </span> </span> </em> , <em class="sig-param"> <span class="n"> <span class="pre"> name: </span> <span class="pre"> ### insert_attribute ```python insert_attribute(self: omni.graph.core._omni_graph_core.IBundle2, attribute_to_copy: omni::graph::core::Py_AttributeData) -> omni::graph::core::Py_AttributeData ``` DEPRECATED - use copy_attribute() instead ### insert_bundle ```python insert_bundle(self: omni.graph.core._omni_graph_core.IBundle2, bundle_to_copy: omni.graph.core._omni_graph_core.IConstBundle2) -> None ``` DEPRECATED - use copy_bundle() instead. ### is_read_only ```python is_read_only(self: omni.graph.core._omni_graph_core.IConstBundle2) -> bool ``` Returns if this interface is read-only. ### is_valid ```python is_valid(self: omni.graph.core._omni_graph_core.IBundle2) -> bool ``` DEPRECATED - use bool cast instead ### link_attribute ```python link_attribute(self: omni.graph.core._omni_graph_core.IBundle2, *args, **kwargs) ``` Overloaded function. 1. ```python link_attribute(self: omni.graph.core._omni_graph_core.IBundle2, target_attribute: omni::graph::core::Py_AttributeData) -> omni::graph::core::Py_AttributeData ``` Adds an attribute to this bundle as link with names taken from target attribute. Added attribute is a link to other attribute that is part of another bundle. The link is owned by this bundle, but target of the link is not. Removing link from this bundle does not destroy the data link points to. Args: - target_attribute (omni.graph.core.AttributeData): Attribute whose data is to be added. Returns: - omni.graph.core.AttributeData: Attribute that is a link. 2. ```python link_attribute(self: omni.graph.core._omni_graph_core.IBundle2, link_name: str, target_attribute: omni::graph::core::Py_AttributeData) -> omni::graph::core::Py_AttributeData ``` Adds an attribute to this bundle as link with custom name. Added attribute is a link to other attribute that is part of another bundle. The link is owned by this bundle, but target of the link is not. Removing link from this bundle does not destroy the data link points to. ### Args: - link_name (str): Name for new link. - target_attribute (omni.graph.core.AttributeData): Attribute whose data is to be added. ### Returns: - omni.graph.core.AttributeData: Attribute that is a link. ### link_attributes(*args, **kwargs) Overloaded function. 1. link_attributes(self: omni.graph.core._omni_graph_core.IBundle2, target_attributes: List[omni::graph::core::Py_AttributeData]) -> List[omni::graph::core::Py_AttributeData] - Adds a set of attributes to this bundle as links with names taken from target attributes. - Added attributes are links to other attributes that are part of another bundle. The links are owned by this bundle, but targets of the links are not. Removing links from this bundle does not destroy the data links point to. ### Args: - target_attributes (list[omni.graph.core.AttributeData]): Attributes whose data is to be added. ### Returns: - list[omni.graph.core.AttributeData]: A list of attributes that are links. 2. link_attributes(self: omni.graph.core._omni_graph_core.IBundle2, link_names: List[str], target_attributes: List[omni::graph::core::Py_AttributeData]) -> List[omni::graph::core::Py_AttributeData] - Adds a set of attributes to this bundle as links with custom names. - Added attributes are links to other attributes that are part of another bundle. The links are owned by this bundle, but targets of the links are not. Removing links from this bundle does not destroy the data links point to. ### Args: - link_names (list[str]): - target_attributes (list[omni.graph.core.AttributeData]): Attributes whose data is to be added. ### Returns: - list[omni.graph.core.AttributeData]: A list of attributes that are links. ### link_child_bundle(*args, **kwargs) Overloaded function. 1. link_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, name: str, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.IBundle2 - Link a bundle as child in current bundle, under given name. ### Args: - name (str): The name under which the child bundle should be linked - bundle (omni.graph.core.IConstBundle2): The bundle to link ### Returns: - omni.graph.core.IBundle2: The linked bundle. 2. link_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.IBundle2 - Link a bundle as child in current bundle. ### Args: - bundle (omni.graph.core.IConstBundle2): The bundle to link ### Returns: - omni.graph.core.IBundle2: The linked bundle. ### link_child_bundles(*args, **kwargs) Overloaded function. - **link_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str], bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.IBundle2]** > Link a set of bundles as child in current bundle, under given names. > ``` > Args: > names (list[str]): The names under which the child bundles should be linked > bundles (list[omni.graph.core.IConstBundle2]): The bundles to link > Returns: > list[omni.graph.core.IBundle2]: The list of created bundles. > ``` - **link_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.IBundle2]** > Link a set of bundles as child in current bundle. > ``` > Args: > bundles (list[omni.graph.core.IConstBundle2]): The bundles to link > Returns: > list[omni.graph.core.IBundle2]: The list of created bundles. > ``` - **remove_all_attributes(self: omni.graph.core._omni_graph_core.IBundle2) -> int** > Remove all attributes from this bundle. > ``` > Returns: > Number of attributes successfully removed. > Return type: > int > ``` - **remove_all_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2) -> int** > Remove all child bundles from this bundle. > Only empty bundles can be removed. > ``` > Returns: > Number of child bundles successfully removed. > Return type: > int > ``` - **remove_attribute(*args, **kwargs)** > Overloaded function. > 1. remove_attribute(self: omni.graph.core._omni_graph_core.IBundle2, name: str) -> None > 2. remove_attribute(self: omni.graph.core._omni_graph_core.IBundle2, attribute: omni::graph::core::Py_AttributeData) -> int > ``` > Args: > attribute (omni.graph.core.AttributeData): Attribute whose data is to be removed. > Returns: > omni.core.Result: Success if successfully removed. > ``` > DEPRECATED - use remove_attribute_by_name() instead. ### remove_attribute_metadata Overloaded function. 1. remove_attribute_metadata(self: omni.graph.core._omni_graph_core.IBundle2, attribute: str, field_names: List[str]) -> int - Remove attribute metadata fields. - Args: - attribute (str): Name of the attribute. - field_names (list[str]): Names of the fields to be removed. - Returns: - int: Number of fields successfully removed. 2. remove_attribute_metadata(self: omni.graph.core._omni_graph_core.IBundle2, attribute: str, field_name: str) -> int - Remove attribute metadata field. - Args: - attribute (str): Name of the attribute. - field_name (str): Name of the field to be removed. - Returns: - omni.core.Result: Success if successfully removed. ### remove_attributes Overloaded function. 1. remove_attributes(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str]) -> None - DEPRECATED - use remove_attributes_by_name() instead. 2. remove_attributes(self: omni.graph.core._omni_graph_core.IBundle2, attributes: List[omni::graph::core::Py_AttributeData]) -> int - Looks up the attributes and if they are part of this bundle then remove them. - Attribute handles that are not part of this bundle are ignored. - Args: - attributes (list[omni.graph.core.AttributeData]): Attributes whose data is to be removed. - Returns: - int: number of removed attributes ### remove_attributes_by_name remove_attributes_by_name(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str]) -> int - Looks up the attributes by names and remove their data and metadata. - Parameters: - names (list[str]) – Names of the attributes whose data is to be removed. - Returns: - Success if successfully removed. - Return type: - omni.core.Result ### remove_bundle_metadata(*args, **kwargs) Overloaded function. 1. remove_bundle_metadata(self: omni.graph.core._omni_graph_core.IBundle2, field_names: List[str]) -> int - Looks up bundle metadata fields and if they are part of this bundle metadata then remove them. - Fields that are not part of this bundle are ignored. - Args: - field_names (list[str]): Names of the fields whose data is to be removed. - Returns: - int: Number of fields successfully removed. 2. remove_bundle_metadata(self: omni.graph.core._omni_graph_core.IBundle2, field_name: str) -> int - Looks up bundle metadata field and if it is part of this bundle metadata then remove it. - Field that is not part of this bundle is ignored. - Args: - field_name (str): Name of the field whose data is to be removed. - Returns: - omni.core.Result: Success if successfully removed. ### remove_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> int - Looks up the bundle and if it is child of the bundle then remove it. - Bundle handle that is not child of this bundle is ignored. Only empty bundle can be removed. - Parameters: - bundle (omni.graph.core.IConstBundle2) – bundle to be removed. - Returns: - Success if successfully removed. - Return type: - omni.core.Result ### remove_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> int - Looks up the bundles and if they are children of the bundle then remove them. ## Description Bundle handles that are not children of this bundle are ignored. Only empty bundles can be removed. ### Parameters **bundles** (list [omni.graph.core.IConstBundle2]) – Bundles to be removed. ### Returns Number of child bundles successfully removed. ### Return type int ## Method: remove_child_bundles_by_name remove_child_bundles_by_name(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str]) -> int ### Description Looks up child bundles by name and remove their data and metadata. ### Parameters **names** (list [str]) – Names of the child bundles to be removed. ### Returns Success if successfully removed. ### Return type omni.core.Result
omni.graph.core.IBundleChanges.md
# IBundleChanges ## IBundleChanges ```python class omni.graph.core.IBundleChanges ``` Bases: `_IBundleChanges` Interface for monitoring and handling changes in bundles and attributes. The IBundleChanges_abi is an interface that provides methods for checking whether bundles and attributes have been modified, and cleaning them if they have been modified. This is particularly useful in scenarios where it’s crucial to track changes and maintain the state of bundles and attributes. This interface provides several methods for checking and cleaning modifications, each catering to different use cases such as handling single bundles, multiple bundles, attributes, or specific attributes of a single bundle. The methods of this interface return a BundleChangeType enumeration that indicates whether the checked entity (bundle or attribute) has been modified. ### Methods - `__init__(*args, **kwargs)` - Overloaded function. - `activate_change_tracking(*args, **kwargs)` - Overloaded function. - `clear_changes(self)` - Clears all recorded changes. - `create(arg0)` - - `deactivate_change_tracking(*args, **kwargs)` - Overloaded function. | get_change(*args, **kwargs) | Overloaded function. | | --- | --- | | get_changes(*args, **kwargs) | Overloaded function. | __init__(self: omni.graph.core._omni_graph_core.IBundleChanges, *args, **kwargs) - Overloaded function. - __init__(self: omni.graph.core._omni_graph_core.IBundleChanges, arg0: omni.core._core.IObject) -> None - __init__(self: omni.graph.core._omni_graph_core.IBundleChanges) -> None activate_change_tracking(self: omni.graph.core._omni_graph_core.IBundleChanges, *args, **kwargs) - Overloaded function. - activate_change_tracking(self: omni.graph.core._omni_graph_core.IBundleChanges, handle: omni::graph::core::BundleHandle) -> int - @brief Activate tracking for specific bundle on its attributes and children. - @param handle to the specific bundles to enable change tracking. - @return An omni::core::Result indicating the success of the operation. - activate_change_tracking(self: omni.graph.core._omni_graph_core.IBundleChanges, bundle: omni.graph.core._omni_graph_core.IBundle2) -> None - Activates the change tracking system for a bundle. - This method controls the change tracking system of a bundle. It’s only applicable for read-write bundles. - Args: - bundle: A bundle to activate change tracking system for. clear_changes(self: omni.graph.core._omni_graph_core._IBundleChanges) -> int - Clears all recorded changes. - This method is used to clear or reset all the recorded changes of the bundles and attributes. - It can be used when the changes have been processed and need to be discarded. - An omni::core::Result indicating the success of the operation. create(arg0: omni::graph::core::Py_GraphContext) -> omni.graph.core._omni_graph_core.IBundleChanges ### deactivate_change_tracking Overloaded function. 1. deactivate_change_tracking(self: omni.graph.core._omni_graph_core.IBundleChanges, handle: omni::graph::core::BundleHandle) -> int @brief Deactivate tracking for specific bundle on its attributes and children. @param handle to the specific bundles to enable change tracking. @return An omni::core::Result indicating the success of the operation. 2. deactivate_change_tracking(self: omni.graph.core._omni_graph_core.IBundleChanges, bundle: omni.graph.core._omni_graph_core.IBundle2) -> None Deactivates the change tracking system for a bundle. This method controls the change tracking system of a bundle. It’s only applicable for read-write bundles. Args: bundle: A bundle to deactivate change tracking system for. ### get_change Overloaded function. 1. get_change(self: omni.graph.core._omni_graph_core.IBundleChanges, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.BundleChangeType Retrieves the change status of a list of bundles. This method is used to check if any of the provided bundles or their contents have been modified. Args: bundles: A list of the bundles to check for modifications. Returns: list[omni.graph.core.BundleChangeType]: A list filled with BundleChangeType values for each bundle. 2. get_change(self: omni.graph.core._omni_graph_core.IBundleChanges, attribute: omni::graph::core::Py_AttributeData) -> omni.graph.core._omni_graph_core.BundleChangeType Retrieves the change status of a specific attribute. This method is used to check if a specific attribute has been modified. Args: attribute: The specific attribute to check for modifications. Returns: omni.graph.core.BundleChangeType: A BundleChangeType value indicating the type of change (if any) that has occurred to the attribute. ### get_changes Overloaded function. 1. get_changes(self: omni.graph.core._omni_graph_core.IBundleChanges, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.BundleChangeType] Retrieves the change status of a list of bundles. This method is used to check if any of the bundles in the provided list or their contents have been modified. Args: bundles: A list of the bundles to check for modifications. Returns: list[omni.graph.core.BundleChangeType]: A list filled with BundleChangeType values for each bundle. 2. get_changes(self: omni.graph.core._omni_graph_core.IBundleChanges, attributes: List[omni::graph::core::Py_AttributeData]) -> List[omni.graph.core._omni_graph_core.BundleChangeType] Retrieves the change status of a list of attributes. This method is used to check if any of the attributes in the provided list have been modified. Args: attributes: A list of attributes to check for modifications. Returns: list[omni.graph.core.BundleChangeType]: A list filled with BundleChangeType values for each attribute. - get_changes(self: omni.graph.core._omni_graph_core.IBundleChanges, entries: sequence) -> List[omni.graph.core._omni_graph_core.BundleChangeType] - Retrieves the change status for a list of bundles and attributes. - This method is used to check if any of the bundles or attributes in the provided list have been modified. If an entry in the list is neither a bundle nor an attribute, its change status will be marked as None. - Args: - entries: A list of bundles and attributes to check for modifications. - Returns: - list[omni.graph.core.BundleChangeType]: A list filled with BundleChangeType values for each entry in the provided list.