file_path
stringlengths
5
148
content
stringlengths
150
498k
size
int64
150
498k
omni.graph.core.Node.md
# Node ## Class: omni.graph.core.Node An element of execution within a graph, containing attributes and connected to other nodes ### Methods - **__init__(*args, **kwargs)** - **clear_old_compute_messages(self)** - Clears all compute messages logged for the node prior to its most recent evaluation. - **create_attribute(self, attributeName, ...)** - Creates an attribute with the specified name, type, and port type and returns success state. - **deregister_on_connected_callback(self, callback)** - De-registers the on_connected callback to be invoked when attributes connect. - **deregister_on_disconnected_callback(self, ...)** - De-registers the on_disconnected callback to be invoked when attributes disconnect. - **deregister_on_path_changed_callback(self, ...)** - Deregisters the on_path_changed callback to be invoked when anything changes in the stage. <p> get_attribute (self, name) <p> Given the name of an attribute returns an attribute object to it. <p> get_attribute_exists (self, name) <p> Given an attribute name, returns whether this attribute exists or not. <p> get_attributes (self) <p> Returns the list of attributes on this node. <p> get_backing_bucket_id (self) <p> This method was internal, and is now obsolete: it does not function anymore. <p> get_compound_graph_instance (self) <p> Returns a handle to the associated sub-graph, if the given node is a compound node. <p> get_compute_count (self) <p> Returns the number of instances on which this node's computation has been invoked. <p> get_compute_messages (self, severity) <p> Returns a list of the compute messages currently logged for the node at a specific severity. <p> get_compute_vectorized_count (self) <p> Returns the number of vectorized segments on which this node's computation has been invoked. <p> get_event_stream (self) <p> Get the event stream the node uses for notification of changes. <p> get_graph (self) <p> Get the graph to which this node belongs <p> get_graph_instance_id (self[, instance]) <p> <dl class="field-list simple"> <dt class="field-odd"> param instance <dd class="field-odd"> <p> an index that identify the graph instance for which a unique ID is requested <p> get_handle (self) <p> Get an opaque handle to the node <p> get_node_type (self) <p> Gets the node type of this node <p> get_prim_path (self) <p> Returns the path to the prim currently backing the node. <p> get_type_name (self) - `get_type_name(self)` - Get the node type name - `get_wrapped_graph(self)` - Get the graph wrapped by this node - `increment_compute_count(self)` - Increments the node's compute counter. - `is_backed_by_usd(self)` - Check if the node is back by USD or not - `is_compound_node(self)` - Returns whether this node is a compound node. - `is_disabled(self)` - Check if the node is currently disabled - `is_valid(self)` - Check the validity of the node - `log_compute_message(self, severity, message)` - Logs a compute message of a given severity for the node. - `node_id(self)` - Returns a unique identifier value for this node. - `register_on_connected_callback(self, callback)` - Registers a callback to be invoked when the node has attributes connected. - `register_on_disconnected_callback(self, callback)` - Registers a callback to be invoked when the node has attributes disconnected. - `register_on_path_changed_callback(self, callback)` - Registers a callback to be invoked when a path changes in the stage. - `remove_attribute(self, attributeName)` - Removes an attribute with the specified name and type and returns success state. - `request_compute(self)` - Requests a compute of this node - `resolve_coupled_attributes(self, attributesArray)` - Resolves attribute types given a set of attributes which are fully type coupled. - `resolve_partially_coupled_attributes(self, attributesArray)` - Resolves attribute types given a set of attributes which are partially type coupled. | Method | Description | | --- | --- | | `resolve_partially_coupled_attributes(self, ...)` | Resolves attribute types given a set of attributes, that can have differing tuple counts and/or array depth, and differing but convertible base data type. | | `set_compute_incomplete(self)` | Informs the system that compute is incomplete for this frame. | | `set_disabled(self, disabled)` | Sets whether the node is disabled or not. | ### `__init__(self, *args, **kwargs)` ### `clear_old_compute_messages(self)` Clears all compute messages logged for the node prior to its most recent evaluation. Messages logged during the most recent evaluation remain untouched. Normally this will be called during graph evaluation so it is of little use unless you’re writing your own evaluation manager. **Returns:** - The number of messages that were deleted. - Return type: `int` ### `create_attribute(self, attributeName: str, attributeType: omni::graph::core::Py_Type, portType: omni.graph.core._omni_graph_core.AttributePortType = <AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT: 0>, value: object = None, extendedType: omni.graph.core._omni_graph_core.ExtendedAttributeType = <ExtendedAttributeType.EXTENDED_ATTR_TYPE_REGULAR: 0>, unionTypes: str = '')` Creates an attribute with the specified name, type, and port type and returns success state. **Parameters:** - `attributeName`: The name of the attribute. - `attributeType`: The type of the attribute. - `portType`: The type of the port (default is input). - `value`: The initial value of the attribute (default is None). - `extendedType`: The extended type of the attribute (default is regular). - `unionTypes`: Union types for the attribute (default is an empty string). **Returns:** - Success state: `bool` - **attributeName** (`str`) – Name of the attribute. - **attributeType** (`omni.graph.core.Type`) – Type of the attribute. - **portType** (`omni.graph.core.AttributePortType`) – The port type of the attribute, defaults to `omni.graph.core.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT` - **value** (`Any`) – The initial value to set on the attribute, default is None - **extendedType** (`omni.graph.core.ExtendedAttributeType`) – The extended type of the attribute, defaults to `omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_REGULAR` - **unionTypes** (`str`) – Comma-separated list of union types if the extended type is `omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION`, defaults to empty string for non-union types. ### Returns - True if the creation was successful, else False ### Return type - bool ### deregister_on_connected_callback ```python deregister_on_connected_callback(self: omni.graph.core._omni_graph_core.Node, callback: int) -> None ``` De-registers the on_connected callback to be invoked when attributes connect. #### Parameters - **callback** (`callable`) – The handle that was returned during the register_on_connected_callback call ### deregister_on_disconnected_callback ```python deregister_on_disconnected_callback(self: omni.graph.core._omni_graph_core.Node, callback: int) -> None ``` De-registers the on_disconnected callback to be invoked when attributes disconnect. #### Parameters - **callback** (`callable`) – The handle that was returned during the register_on_disconnected_callback call ### deregister_on_path_changed_callback ```python deregister_on_path_changed_callback(self: omni.graph.core._omni_graph_core.Node, callback: int) -> None ``` De-registers the on_path_changed callback to be invoked when the path changes. ``` ### deregister_on_path_changed_callback **Deprecated:** Deregisters the on_path_changed callback to be invoked when anything changes in the stage. **Parameters:** - **callback** (callable) – The handle that was returned during the register_on_path_changed_callback call ### get_attribute Given the name of an attribute returns an attribute object to it. **Parameters:** - **name** (str) – The name of the attribute **Returns:** - Attribute with the given name, or None if it does not exist on the node **Return type:** - omni.graph.core.Attribute ### get_attribute_exists Given an attribute name, returns whether this attribute exists or not. **Parameters:** - **name** (str) – The name of the attribute **Returns:** - True if the attribute exists on this node, else False **Return type:** - bool ### get_attributes **Returns:** - List of attributes omni.graph.core._omni_graph_core.Attribute ] Returns the list of attributes on this node. get_backing_bucket_id(self: omni.graph.core._omni_graph_core.Node) -> omni::fabric::BucketId This method was internal, and is now obsolete: it does not function anymore. In order to write back to USD, you can directly use the USD API. get_compound_graph_instance(self: omni.graph.core._omni_graph_core.Node) -> omni::graph::core::Py_Graph Returns a handle to the associated sub-graph, if the given node is a compound node. - Returns: The subgraph - Return type: omni.graph.core.Graph get_compute_count(self: omni.graph.core._omni_graph_core.Node) -> int Returns the number of instances on which this node’s computation has been invoked. The counter has a limited range and will eventually roll over to 0, so a higher count cannot be assumed to represent a more recent compute than an older one. - Returns: Number of instances this node’s computation has been invoked since the counter last rolled over to 0. - Return type: int get_compute_messages(self: omni.graph.core._omni_graph_core.Node, severity: omni::graph::core::ogn::Severity) -> List[str] Returns a list of the compute messages currently logged for the node at a specific severity. - Parameters: - severity: omni.graph.core.Severity ### Severity level of the message ### Returns The list of messages, may be empty. ### Return type list[str] ### Returns Number of vectorized segments on which this node’s computation has been invoked since the counter last rolled over to 0. ### Return type int ### Returns Event stream to monitor for node changes ### Return type carb.events.IEventStream ### Returns Graph associated with the current node. The returned graph will be invalid if the node is not valid. ### Return type omni.graph.core.Graph ### Returns Graph instance ID ### Parameters - `instance`: int = 18446744073709551614 ### get_graph_instance_id **Parameters** - **instance** (`int`) – an index that identify the graph instance for which a unique ID is requested - **instantiated** – Be aware that even if not - **graph** – the authoring **Returns** - A unique name that identifies the graph for the requested index. ### get_handle **Returns** - a unique handle to the node **Return type** - `int` ### get_node_type **Returns** - The node type from which this node was created. **Return type** - `omni.graph.core.NodeType` ### get_prim_path **Returns** - The path to the prim currently backing the node. ### get_type_name **Returns** - The type name of the node. ### get_wrapped_graph - **Description**: Get the graph wrapped by this node - **Returns**: The graph wrapped by the current node, if any. The returned graph will be invalid if the node does not wrap a graph or is invalid. - **Return type**: omni::graph::core::Py_Graph ### increment_compute_count - **Description**: Increments the node’s compute counter. This method is provided primarily for debugging and experimental uses and should not normally be used by end-users. - **Returns**: The new compute counter. This may be zero if the counter has just rolled over. - **Return type**: int ### is_backed_by_usd - **Description**: Check if the node is back by USD or not - **Returns**: True if the current node is by an USD prim on the stage. - **Return type**: bool ### is_compound_node - **Description**: Returns whether this node is a compound node. A compound node is a node that has a node type that is defined by an OmniGraph. - **Returns**: True if this node is a compound node, False otherwise. - **Return type**: bool ### is_disabled - **Description**: (Description not provided in the HTML snippet) - **Returns**: (Returns not provided in the HTML snippet) - **Return type**: (Return type not provided in the HTML snippet) ### is_disabled ```python def is_disabled(self: omni.graph.core._omni_graph_core.Node): → bool ``` Check if the node is currently disabled **Returns** - True if the node is disabled. **Return type** - bool --- ### is_valid ```python def is_valid(self: omni.graph.core._omni_graph_core.Node): → bool ``` Check the validity of the node **Returns** - True if the node is valid. **Return type** - bool --- ### log_compute_message ```python def log_compute_message(self: omni.graph.core._omni_graph_core.Node, severity: omni.graph.core.ogn.Severity, message: str): → bool ``` Logs a compute message of a given severity for the node. This method is intended to be used from within the compute() method of a node to alert the user to any problems or issues with the node’s most recent evaluation. They are accumulated until the next successful evaluation at which point they are cleared. If duplicate messages are logged, with the same severity level, only one is stored. **Parameters** - **severity** (omni.graph.core.Severity) – Severity level of the message. - **message** (str) – The message. **Returns** - True if the message has already been logged, else False **Return type** - bool --- ### node_id ```python def node_id(self: omni.graph.core._omni_graph_core.Node): → int ``` Returns a unique identifier value for this node. **Returns** - Unique identifier value for the node - not persistent through file save and load **Return type** - int ## register_on_connected_callback Registers a callback to be invoked when the node has attributes connected. The callback takes 2 parameters: the attributes from and attribute to of the connection. ### Parameters - **callback** (callable) – The callback function ### Returns - A handle that could be used for deregistration. ### Return type - int ## register_on_disconnected_callback Registers a callback to be invoked when the node has attributes disconnected. The callback takes 2 parameters: the attributes from and attribute to of the disconnection. ### Parameters - **callback** (callable) – The callback function ### Returns - A handle identifying the callback that can be used for deregistration. ## register_on_path_changed_callback Registers a callback to be invoked when a path changes in the stage. The callback takes 1 parameter: a list of the paths that were changed. [DEPRECATED] ### Parameters - **callback** (callable) – The callback function ### Returns - A handle identifying the callback that can be used for deregistration. ### omni.graph.core.Node.remove_attribute Removes an attribute with the specified name and type and returns success state. **Parameters** - **attributeName** (str) – Name of the attribute. **Returns** - True if the removal was successful, False if the attribute was not found **Return type** - bool ### omni.graph.core.Node.request_compute Requests a compute of this node **Returns** - True if the request was successful, False if there was an error **Return type** - bool ### omni.graph.core.Node.resolve_coupled_attributes Resolves attribute types given a set of attributes which are fully type coupled. For example if node ‘Increment’ has one input attribute ‘a’ and one output attribute ‘b’ and the types of ‘a’ and ‘b’ should always match. If the input is resolved then this function will resolve the output to the same type. It will also take into consideration available conversions on the input size. The type of the first (resolved) provided attribute will be used to resolve others or select appropriate conversions Note that input attribute types are never inferred from output attribute types. This function should only be called from the INodeType function ‘on_connection_type_resolve’ **Parameters** - **attributesArray** (list[omni.graph.core.Attribute]) – Array of attributes to be resolved as a coupled group **Returns** - True if successful, False otherwise, usually due to mismatched or missing resolved types **Return type** - bool ### resolve_partially_coupled_attributes ( self: omni.graph.core._omni_graph_core.Node, attributesArray: List[omni.graph.core._omni_graph_core.Attribute], tuplesArray: list, arraySizesArray: list, rolesArray: List[omni::fabric::AttributeRole] ) → bool Resolves attribute types given a set of attributes, that can have differing tuple counts and/or array depth, and differing but convertible base data type. The three input buffers are tied together, holding the attribute, the tuple count, and the array depth of the types to be coupled. This function will solve base type conversion by targeting the first provided type in the list, for all other ones that require it. For example if node ‘makeTuple2’ has two input attributes ‘a’ and ‘b’ and one output ‘c’ and we want to resolve any float connection to the types ‘a’:float, ‘b’:float, ‘c’:float[2] (convertible base types and different tuple counts) then the input buffers would contain: attrsBuf = [a, b, c] tuplesBuf = [1, 1, 2] arrayDepthsBuf = [0, 0, 0] rolesBuf = [AttributeRole::eNone, AttributeRole::eNone, AttributeRole::eNone] This is worth noting that ‘b’ could be of any type convertible to float. But since the first provided attribute is ‘a’, the type of ‘a’ will be used to propagate the type resolution. Note that input attribute types are never inferred from output attribute types. This function should only be called from the INodeType function ‘on_connection_type_resolve’ #### Parameters - **attributesArray** (list[omni.graph.core.Attribute]) – Array of attributes to be resolved as a coupled group - **tuplesArray** (list[int]) – Array of tuple count desired for each corresponding attribute. Any value of None indicates the found tuple count is to be used when resolving. - **arraySizesArray** (list[int]) – Array of array depth desired for each corresponding attribute. Any value of None indicates the found array depth is to be used when resolving. - **rolesArray** (list[omni.graph.core.AttributeRole]) – Array of role desired for each corresponding attribute. A value of AttributeRole::eUnknown indicates the found role is to be used when resolving. #### Returns True if successful, False otherwise, usually due to mismatched or missing resolved types #### Return type bool ### set_compute_incomplete ( self: omni.graph.core._omni_graph_core.Node ) → None Informs the system that compute is incomplete for this frame. In lazy evaluation systems, this node will be scheduled on the next frame since it still has more work to do. ### set_disabled ( self: omni.graph.core._omni_graph_core.Node, disabled: bool ) → None <dt> <em> <span class="n"> <span class="pre"> set_disabled <span class="sig-paren"> ( <span class="n"> <span class="pre"> bool <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> None <dd> <p> Sets whether the node is disabled or not. <dl class="field-list simple"> <dt class="field-odd"> Parameters <dd class="field-odd"> <p> <strong> disabled ( <em> bool ) – True for disabled, False for not.
19,542
omni.graph.core.NodeController.md
# NodeController ## Overview Helper class that provides a simple interface to modifying the contents of a node. ### Methods - **__init__(*args, **kwargs)** - Initializes the class with a particular configuration. - **create_attribute(*args, **kwargs)** - Create a new dynamic attribute on the node. - **promote_attribute(*args, **kwargs)** - Promotes an attribute on a node in a compound graph, making it accessible to the parenting compound node. - **remove_attribute(*args, **kwargs)** - Removes an existing dynamic attribute from a node. - **safe_node_name(node_type_name[, abbreviated])** - (Description not provided in the HTML content) Returns a USD-safe node name derived from the node_type_name ### __init__ Initializes the class with a particular configuration. The arguments are flexible so that classes can initialize only what they need for the calls they will be making. The argument is optional and there may be other arguments present that will be ignored **Parameters** - **undoable** (bool) – If True the operations performed with this instance of the class are to be added to the undo queue, else they are done immediately and forgotten ### create_attribute Create a new dynamic attribute on the node This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context. **Parameters** - **obj** – Either cls or self depending on how the function was called - **node** – Node on which to create the attribute (path or og.Node) - **attr_name** – Name of the new attribute, either with or without the port namespace - **attr_type** – Type of the new attribute, as an OGN type string or og.Type - **attr_port** – Port type of the new attribute, default is og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT - **attr_default** – The initial value to set on the attribute, default is None which means use the type’s default - **attr_extended_type** – The extended type of the attribute, default is og.ExtendedAttributeType.REGULAR. If the extended type is og.ExtendedAttributeType.UNION then this parameter will be a 2-tuple with the second element being a list or comma-separated string of union types - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten **Returns** - The newly created attribute, None if there was a problem creating it **Return type** - omni.graph.core.Attribute ### omni.graph.core.NodeController.promote_attribute **Promotes an attribute on a node in a compound graph, making it accessible to the parenting compound node.** This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context. **Parameters** - **obj** – Either cls or self depending on how the function was called - **src_spec** – Specification of the attribute to be promoted - **name** – The name of the promoted attribute. If not specified, the namespace prefix will be prepended based - **src_spec.** (on) – - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True) **Returns** The attribute created on the compound node that connects to the attribute **Return type** og.Attribute **Raises** - **OmniGraphError** – If attribute could not be found, the attribute does not belong to a compound, or the promoted name already exists ### omni.graph.core.NodeController.remove_attribute **Removes an existing dynamic attribute from a node.** This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context. **Parameters** - **obj** – Either cls or self depending on how the function was called - **attribute** – Reference to the attribute to be removed - **node** – If the attribute reference is a string the node is used to find the attribute to be removed - **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten **Raises** - **OmniGraphError** – if the attribute was not found or could not be removed ### omni.graph.core.NodeController.safe_node_name **Class method to ensure a node name is safe.** Parameters: - **node_type_name** (str) – The name of the node type. - **abbreviated** (bool) – If True, the name will be abbreviated. Default is False. Returns: - The safe node name. ## 定义标题 ### Returns a USD-safe node name derived from the node_type_name **Parameters** - **node_type_name** – Fully namespaced name of the node type (e.g. omni.graph.nodes.Clamp) - **abbreviated** – If True then remove the namespace, else just make the separators into underscores **Returns** - A safe node name that roughly corresponds to the given node type name **Return type** - str
5,307
omni.graph.core.NodeEvent.md
# NodeEvent ## NodeEvent ```python class omni.graph.core.NodeEvent ``` Bases: ```python pybind11_object ``` Node modification event. Members: - CREATE_ATTRIBUTE : Attribute was created - REMOVE_ATTRIBUTE : Attribute was removed - ATTRIBUTE_TYPE_RESOLVE : Extended attribute type was resolved ### Methods ```python __init__(self, value) ``` ### Attributes - ATTRIBUTE_TYPE_RESOLVE - CREATE_ATTRIBUTE - REMOVE_ATTRIBUTE - name - value ```python __init__(self, value) ``` : omni.graph.core._omni_graph_core.NodeEvent , value : int ) → None property name
558
omni.graph.core.NodeType.md
# NodeType ## Class ```python class omni.graph.core.NodeType ``` **Bases:** ```python pybind11_object ``` **Definition:** Definition of a node’s interface and structure ## Methods - **__init__(*args, **kwargs)** - **add_extended_input(self, name, type, ...)** - Adds an extended input type to this node type. - **add_extended_output(self, name, type, ...)** - Adds an extended output type to this node type. - **add_extended_state(self, name, type, ...)** - Adds an extended state type to this node type. - **add_input(self, name, type, is_required[, ...])** - Adds an input to this node type. - **add_output(self, name, type, is_required[, ...])** - Adds an output to this node type. - **add_state(self, name, type, is_required[, ...])** - Adds a state to this node type. - `add_state(self, name, type, is_required[, ...])` - Adds an state to this node type. - `defined_at_runtime(self)` - Checks to see if this node type was defined at runtime or at build time - `get_all_categories(self)` - Gets the node type's categories - `get_all_metadata(self)` - Gets the node type's metadata - `get_all_subnode_types(self)` - Finds all subnode types of the current node type. - `get_metadata(self, key)` - Returns the metadata value for the given key. - `get_metadata_count(self)` - Gets the number of metadata values set on the node type - `get_node_type(self)` - Get this node type's name - `get_path(self)` - Gets the path to the node type definition - `get_scheduling_hints(self)` - Gets the set of scheduling hints currently set on the node type. - `has_state(self)` - Checks to see if instantiations of the node type has internal state - `inspect(self, inspector)` - Runs the inspector on the node type - `is_compound_node_type(self)` - Checks to see if this node type defines a compound node type - `is_valid(self)` - Checks to see if this object is valid - `set_has_state(self, has_state)` - Sets the boolean indicating a node has state. - `set_metadata(self, key, value)` - Sets the metadata value for the given key. | Method Name | Description | |-------------|-------------| | `set_metadata(self, key, value)` | Sets the metadata value for the given key. | | `set_scheduling_hints(self, scheduling_hints)` | Modify the scheduling hints defined on the node type. | ### `__init__(self, *args, **kwargs)` ### `add_extended_input(self, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType)` Adds an extended input type to this node type. Every node of this node type would then have this input. **Parameters:** - **name** (str) – The name of the input. - **type** (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated. For example, "double,float". - **is_required** (bool) – Whether the input is required or not. - **extended_type** (omni.graph.core._omni_graph_core.ExtendedAttributeType) – The kind of extended attribute this is. e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION. ### `add_extended_output(self, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType)` Adds an extended output type to this node type. Every node of this node type would then have this output. **Parameters:** - **name** (str) – The name of the output. - **type** (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated. For example, "double,float". - **is_required** (bool) – Whether the output is required or not. - **extended_type** (omni.graph.core._omni_graph_core.ExtendedAttributeType) – The kind of extended attribute this is. e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION. ### add_extended_output ```add_extended_output``` (self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType) → None - **Description**: Adds an extended output type to this node type. Every node of this node type would then have this output. - **Parameters**: - **name** (str) – The name of the output - **type** (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated. For example, "double,float" - **is_required** (bool) – Whether the output is required or not - **extended_type** (omni.graph.core.ExtendedAttributeType) – The kind of extended attribute this is. e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION ### add_extended_state ```add_extended_state``` (self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType) → None - **Description**: Adds an extended state type to this node type. Every node of this node type would then have this state. - **Parameters**: - **name** (str) – The name of the state attribute - **type** (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated. For example, "double,float" - **is_required** (bool) – Whether the state attribute is required or not - **extended_type** (omni.graph.core.ExtendedAttributeType) – The kind of extended attribute this is. e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION - **omni.graph.core.ExtendedAttributeType** – The kind of extended attribute this is e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION ### add_input `add_input(self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, default_value: object = None) -> None` Adds an input to this node type. Every node of this node type would then have this input. **Parameters:** - **name** (str) – The name of the input - **type** (str) – The type name of the input - **is_required** (bool) – Whether the input is required or not - **default_value** (any) – Default value for the attribute if it is not explicitly set (None means no default) ### add_output `add_output(self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, default_value: object = None) -> None` Adds an output to this node type. Every node of this node type would then have this output. **Parameters:** - **name** (str) – The name of the output - **type** (str) – The type name of the output - **is_required** (bool) – Whether the output is required or not - **default_value** (any) – Default value for the attribute if it is not explicitly set (None means no default) ### add_output Adds an output to this node type. Every node of this node type would then have this output. #### Parameters - **name** (str) – The name of the output - **type** (str) – The type name of the output - **is_required** (bool) – Whether the output is required or not - **default_value** (any) – Default value for the attribute if it is not explicitly set (None means no default) ### add_state Adds an state to this node type. Every node of this node type would then have this state. #### Parameters - **name** (str) – The name of the state - **type** (str) – The type name of the state - **is_required** (bool) – Whether the state is required or not - **default_value** (any) – Default value for the attribute if it is not explicitly set (None means no default) ### defined_at_runtime Checks to see if this node type was defined at runtime or at build time #### Returns - True if this node type was defined at runtime. #### Return type - bool ## get_all_categories - **Description**: Gets the node type’s categories - **Parameters**: - `self` (omni.graph.core._omni_graph_core.NodeType) - **Returns**: - A list of all categories associated with this node type - **Return type**: list[str] ## get_all_metadata - **Description**: Gets the node type’s metadata - **Parameters**: - `self` (omni.graph.core._omni_graph_core.NodeType) - **Returns**: - A dictionary of name:value metadata on the node type - **Return type**: dict[str,str] ## get_all_subnode_types - **Description**: Finds all subnode types of the current node type. - **Parameters**: - `self` (omni.graph.core._omni_graph_core.NodeType) - **Returns**: - Dictionary of type_name:type_object for all subnode types of this one - **Return type**: dict[str, omni.graph.core.NodeType] ## get_metadata - **Description**: Returns the metadata value for the given key. - **Parameters**: - `self` (omni.graph.core._omni_graph_core.NodeType) - `key` (str) – The metadata keyword - **Returns**: - Metadata value for the given keyword, or None if it is not defined - **Return type**: str <dd class="field-odd"> <p> str | None <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.NodeType.get_metadata_count"> <span class="sig-name descname"> <span class="pre"> get_metadata_count <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> omni.graph.core._omni_graph_core.NodeType <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> int <dd> <p> Gets the number of metadata values set on the node type <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> The number of metadata values currently defined on the node type. <dt class="field-even"> Return type <dd class="field-even"> <p> int <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.NodeType.get_node_type"> <span class="sig-name descname"> <span class="pre"> get_node_type <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> omni.graph.core._omni_graph_core.NodeType <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> str <dd> <p> Get this node type’s name <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> The name of this node type. <dt class="field-even"> Return type <dd class="field-even"> <p> str <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.NodeType.get_path"> <span class="sig-name descname"> <span class="pre"> get_path <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> omni.graph.core._omni_graph_core.NodeType <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> str <dd> <p> Gets the path to the node type definition <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> The path to the node type prim. For compound node definitions, this is path on the stage to the OmniGraphSchema.CompoundNodeType_1 object that defines the compound. For other node types, the path returned is unique, but does not represent a valid Prim on the stage. <dt class="field-even"> Return type <dd class="field-even"> <p> str <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.NodeType.get_scheduling_hints"> <span class="sig-name descname"> <span class="pre"> get_scheduling_hints <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> omni.graph.core._omni_graph_core.NodeType <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> omni.graph.core._omni_graph_core.ISchedulingHints <dd> <p> Gets the set of scheduling hints currently set on the node type. <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> The scheduling hints for this node type <dt class="field-even"> Return type <dd class="field-even"> <p> omni.graph.core.ISchedulingHints <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.NodeType.has_state"> <span class="sig-name descname"> <span class="pre"> has_state ### omni.graph.core.NodeType.has_state ```python has_state(self: omni.graph.core._omni_graph_core.NodeType) -> bool ``` Checks to see if instantiations of the node type has internal state **Returns** - True if nodes of this type will have internal state data, False if not. **Return type** - bool ### omni.graph.core.NodeType.inspect ```python inspect(self: omni.graph.core._omni_graph_core.NodeType, inspector: omni::core::Api<omni::inspect::IInspector_abi>) -> bool ``` Runs the inspector on the node type **Parameters** - **inspector** (omni.inspect.Inspector) – The inspector to run **Returns** - True if the inspector was successfully run on the node type, False if it is not supported **Return type** - bool ### omni.graph.core.NodeType.is_compound_node_type ```python is_compound_node_type(self: omni.graph.core._omni_graph_core.NodeType) -> bool ``` Checks to see if this node type defines a compound node type **Returns** - True if this node type is a compound node type, meaning its implementation is defined by an OmniGraph **Return type** - bool ### omni.graph.core.NodeType.is_valid ```python is_valid(self: omni.graph.core._omni_graph_core.NodeType) -> bool ``` Checks to see if this object is valid **Returns** - True if this node type object is valid. **Return type** - bool ### omni.graph.core.NodeType.set_has_state ```python set_has_state(self: omni.graph.core._omni_graph_core.NodeType) -> None ``` Sets whether the node type has state **Returns** - None **Return type** - None ### omni.graph.core.NodeType.set_has_state ```python set_has_state(self: omni.graph.core._omni_graph_core.NodeType, has_state: bool) -> None ``` Sets the boolean indicating a node has state. **Parameters** - **has_state** (bool) – Whether the node has state or not ### omni.graph.core.NodeType.set_metadata ```python set_metadata(self: omni.graph.core._omni_graph_core.NodeType, key: str, value: str) -> bool ``` Sets the metadata value for the given key. **Parameters** - **key** (str) – The metadata keyword - **value** (str) – The value of the metadata ### omni.graph.core.NodeType.set_scheduling_hints ```python set_scheduling_hints(self: omni.graph.core._omni_graph_core.NodeType, scheduling_hints: omni.graph.core._omni_graph_core.ISchedulingHints) -> None ``` Modify the scheduling hints defined on the node type. **Parameters** - **scheduling_hints** (omni.graph.core._omni_graph_core.ISchedulingHints) – New set of scheduling hints for the node type
14,854
omni.graph.core.NodeTypeConstructionError.md
# NodeTypeConstructionError ## NodeTypeConstructionError ```python class omni.graph.core.NodeTypeConstructionError(Exception): """ Exception specific to caught errors in the node type construction process """ def __init__(*args, **kwargs): pass ``` ```
278
omni.graph.core.ObjectLookup.md
# ObjectLookup ## ObjectLookup ``` ```markdown Helper to extract OmniGraph types from various types of descriptions for them. These functions take flexible spec types that identify attributes, nodes, or graphs. In most cases the spec types can be either one of or a list of the objects being used or found by the functions. The forms each spec type can take are as follows: ``` ```markdown ### GraphSpec_t - An omni.graph.core.Graph object - A string containing the path to an omni.graph.core.Graph object - An Sdf.Path containing the path to an omni.graph.core.Graph object - A list of any of the above ``` ```markdown ### NodeSpec_t - An omni.graph.core.Node object - A string containing the path to an omni.graph.core.Node object - An Sdf.Path containing the path to an omni.graph.core.Node object - A Usd.Prim or Usd.Typed that is the USD backing of an omni.graph.core.Node object - None, for situations in which the node itself is redundant information - A 2-tuple consisting of a string and a omni.graph.core.GraphSpec_t, where the string is a relative path to the omni.graph.core.Node object within the omni.graph.core.Graph - A list of any of the above ``` ```markdown ### AttributeSpec_t - An omni.graph.core.Attribute object - A string containing the full path to the omni.graph.core.Attribute object on the USD stage - An Sdf.Path containing the full path to the omni.graph.core.Attribute object on the USD stage - A Usd.Attribute or Usd.Relationship that is the USD backing of an omni.graph.core.Attribute object - A 2-tuple consisting of a string and a NodeSpec_t, where the string is the omni.graph.core.Attribute object’s name within the omni.graph.core.Node - A list of any of the above ``` ```markdown ### Prim_t - A Usd.Prim or Usd.Typed object - A string containing the path to a Usd.Prim or Usd.Typed object - An Sdf.Path containing the path to a Usd.Prim or Usd.Typed object ``` ### Parameters #### NodeSpec_t - A NodeSpec_t, identifying a node whose USD backing Usd.Prim or Usd.Typed object is to be returned - A list of any of the above #### Variables_t - An omni.graph.core.IVariable object - A 2-tuple consisting of a omni.graph.core.GraphSpec_t and a string, where the string is the name of the variable - A string containing the path of the attribute representing the variable - An Sdf.Path containing the path of the attribute representing the variable - A list of any of the above ### Methods | Method | Description | |--------|-------------| | `attribute(attribute_id[, node_id, graph_id])` | Returns the OmniGraph attribute(s) corresponding to the variable type parameter | | `attribute_path(attribute_spec)` | Infers an attribute path from a spec where the attribute may or may not exist | | `attribute_type(type_id)` | Returns the OmniGraph attribute type corresponding to the variable type parameter. | | `compound_graph(node_id)` | Returns the compound graph of a given node or nodes, or None if the node does not contain a compound graph | | `compound_node(item_id)` | Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node | | `graph(graph_id)` | Returns the OmniGraph graph(s) corresponding to the variable type parameter | | `node(node_id[, graph_id])` | Returns the OmniGraph node(s) corresponding to the variable type parameter | | `node_path(node_spec)` | Infers a node path from a spec where the node may or may not exist | | `node_type(type_id)` | Returns the OmniGraph node type corresponding to the variable type parameter | | `prim(prim_id)` | Returns the prim(s) corresponding to the node descriptions | | `prim_path(prim_ids)` | Infers a prim path from a spec where the prim may or may not exist | | `split_graph_from_node_path(node_path)` | Find the lowest level graph from a node path | (attribute_specs) Returns the Usd.Attribute(s) corresponding to the attribute descriptions (attribute_specs) Returns the Usd.Property(s) corresponding to the attribute descriptions (attribute_specs) Returns the Usd.Relationships(s) corresponding to the attribute descriptions (variable_id) Returns the variables(s) corresponding to the variable description __init__() classmethod attribute(attribute_id: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed]) omni.graph.core._omni_graph_core.AttributePortType ] , str , str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] | list [ omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] , str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed ] | tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] , str , str | pxr.Sdf.Path | | --- | | omni.graph.core._omni_graph_core.Graph | | pxr.Usd.Prim | | pxr.Usd.Typed | | | | node_id : Optional[Union[str, Node, Path, Prim, Typed]] = None | | graph_id : Optional[Union[str, Path, Graph, Prim, Typed]] = None | | → Union[Attribute, List[Attribute]] | ``` Returns the OmniGraph attribute(s) corresponding to the variable type parameter Parameters ---------- - **attribute_id** – Information on which attribute to look for. If a list then get all of them. The attribute_id can take one of several forms, for maximum flexibility: - a 2-tuple consisting of the attribute name as str and a node spec. The named attribute must exist on the node - e.g. ("inputs:value", my_node) or ("inputs:value", "/Graph/MyNode"). This is equivalent to passing in the attribute and node spec as two different parameters. You’d use this form when requesting several attributes from different nodes rather than a bunch of attributes from the same node. - a str or Sdf.Path pointing directly to the attribute - e.g. "/Graph/MyNode/inputs:value" - a str that’s an attribute name, iff the node_id is also specified - a Usd.Attribute or Usd.Relationship pointing to the attribute’s reference on the USD side **node_id** – Node to which the attribute belongs, when only the attribute’s name is provided **graph_id** – Graph to which the node and attribute belong. Returns ------- Attribute(s) matching the description(s) - None where there is no match Raises ------ **OmniGraphError** – if the attribute description wasn’t one of the recognized types, if any of the attributes could not be found, or if there was a mismatch in node or graph and attribute. classmethod attribute_path(attribute_spec: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed]) classmethod attribute_path(attribute_spec) → str  Infers an attribute path from a spec where the attribute may or may not exist Parameters ---------- attribute_spec – Location of where the attribute would be, if it exists Returns ------- Location of the attribute, if it exists Return type ----------- str Raises ------ OmniGraphError – If there was something inconsistent in the attribute spec or a path could not be inferred classmethod attribute_type(type_id) → Type  Returns the OmniGraph attribute type corresponding to the variable type parameter. All legal OGN types are recognized, as well as the UNKNOWN type. Parameters ---------- type_id – Variable description of the attribute type object as one of: - An omni.graph.core.Type object - An OGN-style type description - e.g. “float[3]” - An Sdf-style type description - e.g. “float3” - An omni.graph.core.Attribute whose (resolved) type is to be retrieved - An omni.graph.core.AttributeData whose (resolved) type is to be retrieved Returns ------- Attribute type matching the description Return type ----------- omni.graph.core.Type Raises ------ OmniGraphError – If there was something inconsistent in the attribute spec or a path could not be inferred **OmniGraphError** – if the attribute type description wasn’t one of the recognized types ```python classmethod compound_graph(node_id: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Node | pxr.Usd.Prim | pxr.Usd.Typed | tuple[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed] | list[str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed] | tuple[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed]) -> Union[omni.graph.core._omni_graph_core.Graph] ``` ### compound_graph Returns the compound graph of a given node or nodes, or None if the node does not contain a compound graph. **Parameters:** - **node_id** – Information for the node to find. If a list then iterate over the list. - **Returns:** omni.graph.core.Graph | None | list[omni.graph.core.Graph | None]: The compound graph instances contained by the given nodes. If node does not encapsulate a compound graph, the value None is returned. - **Raises:** omni.graph.core.OmniGraphError: node_id description wasn’t a recognized type ### compound_node **Parameters:** - **item_id** – Union[str, Path, Graph, Prim, Typed, Node, tuple[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed], List[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed]] classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ```markdown classmethod graph(graph_id: Optional[Union[str, Path, omni.graph.core._omni_graph_core.Graph]]) -> Union[omni.graph.core._omni_graph_core.Graph, None] ``` ```markdown Returns the owning compound node for a given graph, or node, or None if the graph or node is not encapsulated by a compound node Parameters ---------- item_id The graph, node, or list of graphs and nodes, to retrieve the owning compound node(s) for. Returns ------- The compound node(s) that encapsulate the provided graph(s), or None if the graph(s) are not encapsulated by a compound node Return type ----------- omni.graph.core.Node | None | list[omni.graph.core.Node | None] Raises ------ omni.graph.core.OmniGraphError The provided graphs or nodes are invalid or unrecognized types. ``` ### omni.graph.core.ObjectLookup.graph Returns the OmniGraph graph(s) corresponding to the variable type parameter #### Parameters - **graph_id** – Information for the graph to find. If a list then iterate over the list #### Returns - Graph(s) corresponding to the description(s) in the current scene, None where there is no match #### Return type - omni.graph.core.Graph | list[omni.graph.core.Graph] #### Raises - **OmniGraphError** – if a graph matching the identifier wasn’t found ### omni.graph.core.ObjectLookup.node #### Parameters - **node_id** – str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed | tuple str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] | list [ str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed ] | tuple [ str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] ] graph_id : Optional[Union[str, Path, Graph, Prim, Typed]] = None ) → Union[Node, List[Node]] ### Returns the OmniGraph node(s) corresponding to the variable type parameter #### Parameters - **node_id** – Information for the node to find. If a list then iterate over the list - **graph_id** – Identifier for graph to which the node belongs. #### Returns - Node(s) corresponding to the description(s) in the current graph, None where there is no match #### Return type - omni.graph.core.Node | list[omni.graph.core.Node] #### Raises - **OmniGraphError** – node description wasn’t a recognized type or if a mismatched graph was passed in - **og.OmniGraphValueError** – If the node description did not match a node in the graph ### Infers a node path from a spec where the node may or may not exist #### Parameters - **node_spec** – Description of a path to a node that may or may not exist #### Returns - The path inferred from the node spec. No assumption should be made about the validity of the path. #### Return type - str Raises ==== - **OmniGraphError** – If there was something inconsistent in the node spec or a path could not be inferred node_type ========= - **classmethod** `node_type(type_id: str | omni.graph.core._omni_graph_core.NodeType | omni.graph.core._omni_graph_core.Node | pxr.Usd.Prim | pxr.Usd.Typed | list[str | omni.graph.core._omni_graph_core.NodeType | omni.graph.core._omni_graph_core.Node | pxr.Usd.Prim | pxr.Usd.Typed]) -> Union[NodeType, List[NodeType]]` Returns the OmniGraph node type corresponding to the variable type parameter Parameters ---------- - **type_id** – Information used to identify the omni.graph.core.NodeType object; it will be one of: - **object** (an omni.graph.core.NodeType) – - **type** (a string that is the unique identifier of the node) – - **returned** (a Usd.Prim or Usd.Typed that is the USD backing of an omni.graph.core.Node whose type is to be) – - **returned** – - **above** (a list) – ### Parameters - **prim_id** – Information for the node to find. If a list then iterate over the list ### Returns - Prim(s) corresponding to the description(s) in the current graph, - None where there is no match ### Return type - Usd.Prim | list[Usd.Prim] ### Raises - OmniGraphError – if the node description(s) didn’t correspond to a valid prim(s). ### prim_path - **classmethod** `prim_path(prim_ids: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Node | pxr.Usd.Prim | pxr.Usd.Typed | omni.graph.core._omni_graph_core.Graph | list[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Node | pxr.Usd.Prim | pxr.Usd.Typed | omni.graph.core._omni_graph_core.Graph]) -> Union[str, List[str]]` - Infers a prim path from a spec where the prim may or may not exist #### Parameters - **prim_ids** – Identifier of a prim or list of prims that may or may not exist #### Returns - Path(s) inferred from the prim spec(s). No assumption should be made about their validity. #### Return type - str | list[str] #### Raises - OmniGraphError – If there was something inconsistent in the prim spec or a path could not be inferred ## split_graph_from_node_path ### Parameters - **node_path** – Full path to the node from the root ### Returns - Tuple[Graph, str] - where graph is the lowest graph in the tree and node_path is the relative path to the node from the graph ### Return type - tuple[omni.graph.core.Graph, str] ## usd_attribute ### Parameters - attribute_specs: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed] tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] , str , str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] | list [ omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] ] | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed ] | tuple [ str | tuple [ str ] ] classmethod usd_attribute(attribute_specs: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed]) -> Union[Attribute, List[Attribute]] Returns the Usd.Attribute(s) corresponding to the attribute descriptions Parameters ---------- attribute_specs : omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed] Location or list of locations from which to infer a matching Usd.Attribute Returns ------- Usd.Attribute(s) corresponding to the description(s) in the USD stage Return type ----------- Usd.Attribute | list[Usd.Attribute] Raises ------ OmniGraphError if the attribute description didn’t correspond to a valid Usd.Attribute. classmethod usd_property(attribute_specs: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed]) -> Union[Attribute, List[Attribute]] Returns the Usd.Attribute(s) corresponding to the attribute descriptions Parameters ---------- attribute_specs : omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str | tuple[str, omni.graph.core._omni_graph_core.AttributePortType], str | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed] Location or list of locations from which to infer a matching Usd.Attribute Returns ------- Usd.Attribute(s) corresponding to the description(s) in the USD stage Return type ----------- Usd.Attribute | list[Usd.Attribute] Raises ------ OmniGraphError if the attribute description didn’t correspond to a valid Usd.Attribute. omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed ] | tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] , str , str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] | list [ omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple [ str | tuple [ str , omni.graph.core._omni_graph_core.AttributePortType ] , str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim ```python classmethod usd_relationship(attribute_specs: omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple[str]) ``` Returns the Usd.Relationship corresponding to the attribute descriptions **Parameters** - **attribute_specs** – Location or list of locations from which to infer a matching Usd.Relationship **Returns** Usd.Relationship corresponding to the description(s) in the USD stage **Return type** Usd.Relationship | list[Usd.Relationship] **Raises** - **OmniGraphError** – if the attribute description didn’t correspond to a valid Usd.Relationship. | tuple [str, omni.graph.core._omni_graph_core.AttributePortType] , str | omni.graph.core._omni_graph_core.Node | pxr.Sdf.Path | pxr.Usd.Prim | pxr.Usd.Typed ] | tuple [str | tuple [str, omni.graph.core._omni_graph_core.AttributePortType] , str, str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed ] | list [ omni.graph.core._omni_graph_core.Attribute | str | pxr.Sdf.Path | tuple [str | tuple [str, omni.graph.core._omni_graph_core.AttributePortType] ] classmethod variable(variable_id: str) ( str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.IVariable | tuple [str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed, str] | list [str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.IVariable | tuple [str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed, str]] ) → Union [IVariable, List [IVariable]] Returns the variables(s) corresponding to the variable description Parameters ---------- variable_id – Information for the variable to find. If a list then iterate over the list Returns ------- <dl> <dd class="field-even"> <p> <dl class="simple"> <dt> Variables(s) corresponding to the <dd> <p> description(s) in the current graph, None where there is no match <dt class="field-odd"> Return type <dd class="field-odd"> <p> omni.graph.core.IVariable | list[omni.graph.core.IVariable] <dt class="field-even"> Raises <dd class="field-even"> <p> **OmniGraphError** – if the variable description didn’t correspond to a valid variable
33,511
omni.graph.core.OmniGraphAttributeError.md
# OmniGraphAttributeError ## OmniGraphAttributeError Exception to raise when an OmniGraph operation encountered an unrecognized or illegal attribute value ### __init__(*args, **kwargs) Returns the exception text, with stack trace information added if requested
264
omni.graph.core.OmniGraphBindingError.md
# OmniGraphBindingError ## OmniGraphBindingError ```python class omni.graph.core.OmniGraphBindingError(Exception) ``` ```python def __init__(*args, **kwargs): pass ```
173
omni.graph.core.OmniGraphBindingError_omni.graph.core.OmniGraphBindingError.md
# OmniGraphBindingError ## OmniGraphBindingError ```python class omni.graph.core.OmniGraphBindingError(Exception) ``` ### \_\_init\_\_ ```python def __init__(*args, **kwargs) ``` ```
184
omni.graph.core.OmniGraphError.md
# OmniGraphError ## OmniGraphError ### class OmniGraphError(*args, **kwargs) Exception to raise when there is an error in an OmniGraph operation #### __init__(*args, **kwargs) Returns the exception text, with stack trace information added if requested #### set_show_stack_trace(enable_traces: bool) Turn on or off display of stack traces when an OmniGraphError is raised Parameters: - **enable_traces** – Turn on or off the stack traces when raising the error 这是一个段落,包含一个链接。 # 这是一个标题 - 列表项1 - 列表项2 ``` 这是一个代码块``` 图片描述 ---
534
omni.graph.core.OmniGraphInspector.md
# OmniGraphInspector ## Class OmniGraphInspector - **Bases:** `object` - **Description:** Provides simple interfaces for inspection of OmniGraph objects ### Methods - `__init__()`: Import the inspection interface, logging a warning if it doesn't exist. - `as_json(omnigraph_object [, file_path, flags])`: Outputs the JSON format data belonging to the context (for debugging) - `as_text(omnigraph_object [, file_path])`: Returns the serialized data belonging to the context (for debugging) - `attribute_locations(context)`: Find all of the attribute data locations within Fabric for the given context. - `available()`: Returns true if the inspection capabilities are available - `memory_use(omnigraph_object)`: (description not provided in the HTML) Returns the number of bytes of memory used by the object, if it supports it ### __init__ **Definition:** ``` __init__() ``` **Description:** Import the inspection interface, logging a warning if it doesn’t exist. This allows the functions to silently fail, while still providing an alert to the user as to why their inspection operations might not work as expected. ### as_json **Definition:** ``` as_json(omnigraph_object: Union[Graph, GraphContext, GraphRegistry, NodeType], file_path: Optional[str] = None, flags: Optional[List[str]] = None) -> str ``` **Description:** Outputs the JSON format data belonging to the context (for debugging) **Parameters:** - **omnigraph_object** – Object whose contents are to be inspected - **file_path** – If a string then dump the output to a file at that path, otherwise return a string with the dump - **flags** – Set of enabled flags on the inspection object. Valid values are: maps: Show all of the attribute type maps (lots of redundancy here, and independent of data present) noDataDetails: Hide the minutiae of where each attribute’s data is stored in Fabric **Returns:** - If no file_path was specified then return the inspected data. - If a file_path was specified then return the path where the data was written (should be the same) **Return type:** - str **Raises:** - OmniGraphError – If the object type doesn’t support json inspection ### as_text ```python as_text(omnigraph_object: Union[Graph, GraphContext, GraphRegistry, NodeType], file_path: Optional[str] = None) -> str ``` Returns the serialized data belonging to the context (for debugging) #### Parameters - **omnigraph_object** – Object whose contents are to be inspected - **file_path** – If a string then dump the output to a file at that path, otherwise return a string with the dump #### Returns If no file_path was specified then return the inspected data. If a file_path was specified then return the path where the data was written (should be the same) #### Return type str #### Raises - **OmniGraphError** – If the object type doesn’t support text inspection ### attribute_locations ```python attribute_locations(context: GraphContext) -> Dict[str, Dict[str, int]] ``` Find all of the attribute data locations within Fabric for the given context. #### Parameters - **context** – Graph context whose Fabric data is to be inspected ### Returns { attribute name : (attribute path, attribute location) } ### Return type dict[str, dict[str,int]] ### available ```python available() -> bool ``` Returns true if the inspection capabilities are available ### memory_use ```python memory_use(omnigraph_object: Union[Graph, GraphContext, GraphRegistry, NodeType]) -> int ``` Returns the number of bytes of memory used by the object, if it supports it #### Parameters **omnigraph_object** – Object whose memory use is to be inspected #### Returns Number of bytes found to be used by the object passed in #### Return type int #### Raises **OmniGraphError** – If the object type doesn’t support memory inspection
3,791
omni.graph.core.OmniGraphTypeError.md
# OmniGraphTypeError ## OmniGraphTypeError Exception to raise when an OmniGraph operation encountered an unrecognized or illegal type ### __init__(*args, **kwargs) Returns the exception text, with stack trace information added if requested
243
omni.graph.core.OmniGraphValueError.md
# OmniGraphValueError ## OmniGraphValueError Exception to raise when an OmniGraph operation encountered an illegal value ### __init__(*args, **kwargs) Returns the exception text, with stack trace information added if requested
228
omni.graph.core.PerNodeKeys.md
# PerNodeKeys ## PerNodeKeys ```python class omni.graph.core.PerNodeKeys ``` Bases: `object` Set of key values for per-node data. This is data that belongs to a node, but which is only valid for Python node implementations. Any data that belongs to all node types should be implemented through the ABI. ### Methods ### Attributes ```python ATTRIBUTES ``` Definitions of the attribute objects on the node ```python DYNAMIC_ATTRIBUTES ``` Accessor for dynamic attributes on the node ```python ERRORS ``` String list containing the unique errors encountered during evaluation ```python INTERNAL_STATE ``` Data stored as internal state information by the user ```python NODE_CALLBACK ``` Callback subscription for the node event stream ```python ROLE ``` | Role object built to provide a parallel method of accessing attribute role data | | --- | ## __init__() Definitions of the attribute objects on the node ## ATTRIBUTES = 'attributes' Accessor for dynamic attributes on the node ## DYNAMIC_ATTRIBUTES = 'dynamic_attributes' String list containing the unique errors encountered during evaluation ## ERRORS = 'errors' Data stored as internal state information by the user ## INTERNAL_STATE = 'internal_state' Callback subscription for the node event stream ## NODE_CALLBACK = 'node_callback' Role object built to provide a parallel method of accessing attribute role data ## ROLE = 'role'
1,408
omni.graph.core.PtrToPtrKind.md
# PtrToPtrKind ## Overview PtrToPtrKind is a class that defines the memory type for the pointer to a GPU data array. It is based on `pybind11_object`. ### Members - **NA**: Memory is CPU or type is not an array. - **CPU**: Pointers to GPU arrays live on the CPU. - **GPU**: Pointers to GPU arrays live on the GPU. ## Methods - `__init__(self, value)`: Initializes the PtrToPtrKind instance. ## Attributes - `CPU` - `GPU` - `NA` - `name` - `value` *omni.graph.core._omni_graph_core.PtrToPtrKind*, value : int) → None property name
534
omni.graph.core.PtrToPtrKind_omni.graph.core.PtrToPtrKind.md
# PtrToPtrKind ## Overview Memory type for the pointer to a GPU data array ### Members - NA : Memory is CPU or type is not an array - CPU : Pointers to GPU arrays live on the CPU - GPU : Pointers to GPU arrays live on the GPU ### Methods - `__init__(self, value)` ### Attributes - `CPU` - `GPU` - `NA` - `name` - `value` ## `__init__` Method - `__init__(self, value)` **omni.graph.core._omni_graph_core.PtrToPtrKind**, **value** : **int** ) → **None** **property** **name**
479
omni.graph.core.python_value_as_usd.md
# python_value_as_usd ## python_value_as_usd ```python omni.graph.core.python_value_as_usd(og_type: Type, value: Any) -> Any ``` Converts the given python value to the equivalent USD value ### Parameters - **og_type** – The OG type of the given data - **value** – The pure python value (IE not USD or numpy) ### Returns - The USD-compatible value ### Return type - Any
373
omni.graph.core.ReadOnlyError.md
# ReadOnlyError ## ReadOnlyError ```python class omni.graph.core.ReadOnlyError(attribute: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Attribute | pxr.Usd.Property, message: Optional[str] = None) ``` Bases: `OmniGraphError` Exception to raise when there is a write operation on a read-only attribute (i.e. an input) ### `__init__` ```python def __init__(attribute: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Attribute | pxr.Usd.Property, message: Optional[str] = None) ``` <em class="sig-call"> omni.graph.core.ReadOnlyError.__init__( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> , <span class="w"> <span class="n"> <span class="pre"> attribute <span class="p"> <span class="pre"> : <span class="w"> <span class="pre"> omni.graph.core._omni_graph_core.Attribute <span class="p"> <span class="pre"> | <span class="w"> <span class="pre"> pxr.Usd.Property , <em class="sig-param"> <span class="n"> <span class="pre"> message <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> Optional <span class="p"> <span class="pre"> [ <span class="pre"> str <span class="p"> <span class="pre"> ] <span class="w"> <span class="o"> <span class="pre"> = <span class="w"> <span class="default_value"> <span class="pre"> None <span class="sig-paren"> ) <dd> <p> Set up the attribute information for the operation
1,758
omni.graph.core.register_node_type.md
# register_node_type  ## register_node_type  ### omni.graph.core.register_node_type  ```python omni.graph.core.register_node_type(name: object, version: int) -> None ``` Registers a new python subnode type with OmniGraph. #### Parameters - **name** (str) – Name of the Python node type being registered - **version** (int) – Version number of the Python node type being registered #### Raises - **ValueError** – If a subnode type of the same name was already registered
474
omni.graph.core.register_post_load_file_format_upgrade_callback.md
# register_post_load_file_format_upgrade_callback  ## register_post_load_file_format_upgrade_callback ```python omni.graph.core.register_post_load_file_format_upgrade_callback(callback: object) -> int ``` Registers a callback to be invoked when the file format version changes. Happens after the file has already been parsed and stage attached to. The callback takes 3 parameters: the old file format version, the new file format version, and the affected graph object. ### Parameters - **callback** (callable) – The callback function ### Returns A handle that could be used for deregistration. Note the calling module is responsible for deregistration of the callback in all circumstances, including where the extension is hot-reloaded. ### Return type int ```
767
omni.graph.core.register_pre_load_file_format_upgrade_callback.md
# register_pre_load_file_format_upgrade_callback  ## register_pre_load_file_format_upgrade_callback  ### omni.graph.core.register_pre_load_file_format_upgrade_callback  #### register_pre_load_file_format_upgrade_callback Registers a callback to be invoked when the file format version changes. Happens before the file has already been parsed and stage attached to. The callback takes 3 parameters: the old file format version, the new file format version, and a graph object (always invalid since the graph has not been created yet). ##### Parameters - **callback** (callable) – The callback function ##### Returns A handle that could be used for deregistration. Note the calling module is responsible for deregistration of the callback in all circumstances, including where the extension is hot-reloaded. ##### Return type int
833
omni.graph.core.register_python_node.md
# register_python_node ## register_python_node Registers the unique Python node type with OmniGraph. This houses all of the Python node implementations as subtypes.
166
omni.graph.core.release_interface.md
# release_interface ## release_interface ```python omni.graph.core.release_interface(arg0: omni.graph.core._omni_graph_core.ComputeGraph) -> None ``` ### Description This function does not provide a description in the provided HTML source. ### Parameters - **arg0** (`omni.graph.core._omni_graph_core.ComputeGraph`): The parameter description is not provided in the HTML source. ### Returns - **None** ```
410
omni.graph.core.resolve_base_coupled.md
# resolve_base_coupled ## resolve_base_coupled ``` Resolves attribute types given a set of attributes, that can have differing tuple counts and/or array depth, and differing but convertible base data type. For example if node ‘makeTuple2’ has two input attributes ‘a’ and ‘b’ and one output ‘c’ and we want to resolve ‘a’:float, ‘b’:float, ‘c’:float[2] (convertible base types, different tuple counts) we would use the input: ```python [ (node.get_attribute("inputs:a"), None, None, None), (node.get_attribute("inputs:b"), None, None, None), (node.get_attribute("outputs:c"), None, 1, None) ] ``` Assuming `a` gets resolved first, the None will be set to the respective values for the resolved type (`a`). For this example, it will use defaults tuple_count=1, array_depth=0, role=NONE. This function should only be called from `on_connection_type_resolve`. ## Parameters * **attribute_specs** – list of (attribute, tuple_count, array_depth, role) of extended attributes to be resolved. * **tuple_count** (**'None' for**) – * **array_depth** – * **type** (**or role means 'use the resolved**) –
1,108
omni.graph.core.resolve_fully_coupled.md
# resolve_fully_coupled ## resolve_fully_coupled ```python omni.graph.core.resolve_fully_coupled(attributes: Sequence[Attribute]) -> None ``` Resolves attribute types given a set of attributes which are fully type coupled. For example if node ‘Increment’ has one input attribute ‘a’ and one output attribute ‘b’ and we want the types of ‘a’ and ‘b’ to always match. This function will take under consideration the available conversions. This function should only be called from `on_connection_type_resolve`. ### Parameters - **attributes** – list of extended attributes to be resolved
588
omni.graph.core.RuntimeAttribute.md
# RuntimeAttribute ## Methods - `__init__(attribute_data, context, read_only)` - Constructs a wrapper around the raw ABI attribute data object - `array_value(*args, **kwargs)` - Set the value of an attributeData for writing, with preallocated element space. - `copy_data(other)` - [Description missing] | Attribute | Description | |-----------|-------------| | abi | The ABI object representing the bundled attribute's data | | cpu_value | The value of an attributeData for reading, forcing it to be on the CPU | | gpu_value | The value of an attributeData for reading, forcing it to be on the GPU | | name | Name of the attribute data. | | size | The number of elements in the attribute (1 for regular data, elementCount for arrays) | | type | Attribute type of the attribute data. | | value | The value of an attributeData for reading | ### __init__(attribute_data: ~omni.graph.core._omni_graph_core.AttributeData, context: ~omni.graph.core._omni_graph_core.GraphContext, read_only: bool, on_gpu: ~typing.Optional[bool] = None, gpu_ptr_kind: ~omni.graph.core._omni_graph_core.PtrToPtrKind = &lt;PtrToPtrKind.NA: 0&gt;) - Constructs a wrapper around the raw ABI attribute data object ### array_value(*args, **kwargs) → Any - Set the value of an attributeData for writing, with preallocated element space. See AttributeDataValueHelper.get_array() for parameters. on_gpu is provided here - Returns: Value of the array data - Return type: Any ### copy_data Method ```python copy_data(other: RuntimeAttribute) -> bool ``` Copies data from another attribute, returning True if the copy succeeded, else False. **Parameters:** - `other` - RuntimeAttribute from which data is to be copied **Returns:** - True if the copy succeeded **Return type:** - bool ### abi Property ```python property abi: AttributeData ``` The ABI object representing the bundled attribute’s data. **Type:** - omni.graph.core.AttributeData ### cpu_value Property ```python property cpu_value: Any ``` The value of an attributeData for reading, forcing it to be on the CPU. **Type:** - Any ### gpu_value Property ```python property gpu_value: Any ``` The value of an attributeData for reading, forcing it to be on the GPU. **Type:** - Any ### name Property ```python property name: str ``` Name of the attribute data. Can only be set on creation. **Type:** - str ### size Property ```python property size: int ``` The number of elements in the attribute (1 for regular data, elementCount for arrays). **Type:** - int ### type Property ```python property type ``` ### Attribute Type Attribute type of the attribute data. Can only be set on creation. - **Type**: omni.graph.core.Type ### Value The value of an attributeData for reading - **Type**: Any
2,771
omni.graph.core.Settings.md
# Settings ## Settings ```python class omni.graph.core.Settings: VERSION: str = '/persistent/omnigraph/settingsVersion' UPDATE_MESH_TO_HYDRA: str = '/persistent/omnigraph/updateMeshPointsToHydra' PLAY_COMPUTE_GRAPH: str = '/app/player/playComputegraph' OPTIMIZE_GENERATED_PYTHON: str = '/persistent/omnigraph/generator/pyOptimize' ENABLE_PATH_CHANGED_CALLBACK: str = '/persistent/omnigraph/enablePathChangedCallback' DEPRECATIONS_ARE_ERRORS: str = '/persistent/omnigraph/deprecationsAreErrors' ## omni.graph.core.Settings ### Methods #### `__init__(VERSION, UPDATE_MESH_TO_HYDRA, ...)` #### `generator_settings()` Return the generator settings object corresponding to the current carb settings #### `temporary(setting_name[, setting_value])` Generator to temporarily use a new setting value ### Attributes #### `AUTO_INSTANCING_ENABLED` Control whether or not similar graph should be merged together as instances in order to allow vectorized compute #### `DEPRECATIONS_ARE_ERRORS` Modify deprecation paths to raise errors or exceptions instead of logging warnings. #### `DISABLE_INFO_NOTICE_HANDLING_IN_PLAYBACK` Disable all processing of info-only notices by OG. #### `ENABLE_PATH_CHANGED_CALLBACK` Enable the deprecated Node.pathChangedCallback. #### `OPTIMIZE_GENERATED_PYTHON` Optimize the Python code being output by the node generator #### `PLAY_COMPUTE_GRAPH` Evaluate OmniGraph when the Kit 'Play' button is pressed #### `UPDATE_MESH_TO_HYDRA` Update mesh points directly to Hydra #### `VERSION` Version number of these settings ### omni.graph.core.Settings.__init__ - **Parameters**: - `SETTINGS_VERSION`: str = '/persistent/omnigraph/settingsVersion' - `UPDATE_MESH_TO_HYDRA`: str = '/persistent/omnigraph/updateMeshPointsToHydra' - `PLAY_COMPUTE_GRAPH`: str = '/app/player/playComputegraph' - `OPTIMIZE_GENERATED_PYTHON`: str = '/persistent/omnigraph/generator/pyOptimize' - `ENABLE_PATH_CHANGED_CALLBACK`: str = '/persistent/omnigraph/enablePathChangedCallback' - `DEPRECATIONS_ARE_ERRORS`: str = '/persistent/omnigraph/deprecationsAreErrors' - **Returns**: None ### omni.graph.core.Settings.generator_settings - **Description**: Return the generator settings object corresponding to the current carb settings - **Returns**: - Current settings object used by the code generator - Return type: omni.graph.tools.Settings ### omni.graph.core.Settings.temporary - **Parameters**: - `setting_name`: Union[str, List[Tuple[str, Any]]] - **Returns**: Settings <span class="pre"> , <span class="w"> <span class="pre"> Dict <span class="p"> <span class="pre"> [ <span class="pre"> str <span class="p"> <span class="pre"> , <span class="w"> <span class="pre"> Any <span class="p"> <span class="pre"> ] <span class="p"> <span class="pre"> ] , <em class="sig-param"> <span class="n"> <span class="pre"> setting_value <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> Any <span class="w"> <span class="o"> <span class="pre"> = <span class="w"> <span class="default_value"> <span class="pre"> None <span class="sig-paren"> ) <dd> <p> Generator to temporarily use a new setting value <dl class="field-list simple"> <dt class="field-odd"> Parameters <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> setting_name – A string containing the path to the setting (e.g. “/persistent/omnigraph/deprecationsAreErrors”) or a list of tuples containing setting name and value pairs. <li> <p> <strong> setting_value – New value for the setting. ‘None’ is not a valid setting value and will generate a warning. Ignored if ‘setting_name’ is a list. <p> If a setting does not yet exist it will be created at context entry and removed at context exit. <p class="rubric"> Examples <div class="highlight-python notranslate"> <div class="highlight"> <pre><span> <span class="n">do_something_with_auto_instancing <span class="k">with <span class="n">do_something_with_deprecations_as_errors_disabled <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.AUTO_INSTANCING_ENABLED"> <span class="sig-name descname"> <span class="pre"> AUTO_INSTANCING_ENABLED <em class="property"> <span class="w"> <span class="p"> <span class="pre"> = <span class="w"> <span class="pre"> '/persistent/omnigraph/autoInstancingEnabled' <dd> <p> Control whether or not similar graph should be merged together as instances in order to allow vectorized compute <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.DEPRECATIONS_ARE_ERRORS"> <span class="sig-name descname"> <span class="pre"> DEPRECATIONS_ARE_ERRORS <em class="property"> <span class="p"> <span class="pre"> : <span class="w"> <span class="pre"> str <em class="property"> <span class="w"> <span class="p"> <span class="pre"> = <span class="w"> <span class="pre"> '/persistent/omnigraph/deprecationsAreErrors' <dd> <p> Modify deprecation paths to raise errors or exceptions instead of logging warnings. <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.DISABLE_INFO_NOTICE_HANDLING_IN_PLAYBACK"> <span class="sig-name descname"> <span class="pre"> DISABLE_INFO_NOTICE_HANDLING_IN_PLAYBACK <em class="property"> <span class="w"> <span class="p"> <span class="pre"> = <span class="w"> <span class="pre"> '/persistent/omnigraph/disableInfoNoticeHandlingInPlayback' <dd> <p> Disable all processing of info-only notices by OG. This is an optimization for applications which do not require any triggering of OG via USD (value_changed and path_changed callbacks, lazy-graph etc <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.ENABLE_PATH_CHANGED_CALLBACK"> <span class="sig-name descname"> <span class="pre"> ENABLE_PATH_CHANGED_CALLBACK <em class="property"> <span class="p"> <span class="pre"> : <span class="w"> <span class="pre"> str <em class="property"> <span class="w"> <span class="p"> <span class="pre"> = <span class="w"> <span class="pre"> '/persistent/omnigraph/enablePathChangedCallback' <dd> <p> Enable the deprecated Node.pathChangedCallback. This will affect performance. <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.OPTIMIZE_GENERATED_PYTHON"> <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.OPTIMIZE_GENERATED_PYTHON"> <span class="sig-name descname"> <span class="pre"> OPTIMIZE_GENERATED_PYTHON <em class="property"> <span class="p"> <span class="pre"> : <span class="w"> <span class="pre"> str <em class="property"> <span class="w"> <span class="p"> <span class="pre"> = <span class="w"> <span class="pre"> '/persistent/omnigraph/generator/pyOptimize' <dd> <p> Optimize the Python code being output by the node generator <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.PLAY_COMPUTE_GRAPH"> <span class="sig-name descname"> <span class="pre"> PLAY_COMPUTE_GRAPH <em class="property"> <span class="p"> <span class="pre"> : <span class="w"> <span class="pre"> str <em class="property"> <span class="w"> <span class="p"> <span class="pre"> = <span class="w"> <span class="pre"> '/app/player/playComputegraph' <dd> <p> Evaluate OmniGraph when the Kit ‘Play’ button is pressed <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.UPDATE_MESH_TO_HYDRA"> <span class="sig-name descname"> <span class="pre"> UPDATE_MESH_TO_HYDRA <em class="property"> <span class="p"> <span class="pre"> : <span class="w"> <span class="pre"> str <em class="property"> <span class="w"> <span class="p"> <span class="pre"> = <span class="w"> <span class="pre"> '/persistent/omnigraph/updateMeshPointsToHydra' <dd> <p> Update mesh points directly to Hydra <dl class="py attribute"> <dt class="sig sig-object py" id="omni.graph.core.Settings.VERSION"> <span class="sig-name descname"> <span class="pre"> VERSION <em class="property"> <span class="p"> <span class="pre"> : <span class="w"> <span class="pre"> str <em class="property"> <span class="w"> <span class="p"> <span class="pre"> = <span class="w"> <span class="pre"> '/persistent/omnigraph/settingsVersion' <dd> <p> Version number of these settings
9,814
omni.graph.core.set_test_failure.md
# set_test_failure ## set_test_failure ```python omni.graph.core.set_test_failure(has_failure: bool) -> None ``` Sets or clears a generic test failure. **Parameters** - **has_failure** (bool) – If True then increment the test failure count, else clear it.
257
omni.graph.core.Severity.md
# Severity ## Severity ### Class: omni.graph.core.Severity Bases: `pybind11_object` Severity level of the log message Members: - INFO: Message is informational only - WARNING: Message is regarding a recoverable unexpected situation - ERROR: Message is regarding an unrecoverable unexpected situation #### Methods | Method | Description | | --- | --- | | `__init__(self, value)` | | #### Attributes | Attribute | Description | | --- | --- | | `ERROR` | | | `INFO` | | | `WARNING` | | | `name` | | | `value` | | ### `__init__(self, value)` omni.graph.core._omni_graph_core.Severity, value : int ) → None property name name
638
omni.graph.core.Submodules.md
# omni.graph.core Submodules ## Submodules Summary: | Module | Description | |--------|-------------| | [omni.graph.core.typing](omni.graph.core.typing.html) | OmniGraph submodule that handles all of the OmniGraph API typing information. |
241
omni.graph.core.test_failure_count.md
# test_failure_count ## test_failure_count Gets the number of active test failures ### Returns The number of currently active test failures. ### Return type int
164
omni.graph.core.ThreadsafetyTestUtils.md
# ThreadsafetyTestUtils ## Methods - `add_to_threading_cache(test_instance_id, code)` - Add some data that needs to be shared across test instances to a single, shared cache. - `make_serial_test(test_generator)` - Make a serial test from a test generator. - `make_threading_test(test_generator)` - Make a thread-safety test from a test generator. - `single_evaluation_first_test_instance(...)` - Method that evaluates a piece of code once during the first test instance. - `single_evaluation_last_test_instance(...)` - Method that evaluates a piece of code once during the last test instance. ## Attributes - (Attributes section follows, if available) | EVALUATION_ALL_GRAPHS | | --- | | EVALUATION_WAIT_FRAME | | MAX_GRAPH_INSTANCES | | thread_cache_indices | | threading_cache | ### __init__() ### add_to_threading_cache(test_instance_id: int, code) Add some data that needs to be shared across test instances to a single, shared cache ### make_serial_test(test_generator) Make a serial test from a test generator ### make_threading_test(test_generator) Make a thread-safety test from a test generator ### single_evaluation_first_test_instance(test_instance_id: int, func, *args, **kwargs) Method that evaluates a piece of code once during the first test instance ### single_evaluation_last_test_instance(test_instance_id: int, func, *args, **kwargs) Method that evaluates a piece of code once during the last test instance : int , func , * args , ** kwargs )  Method that evaluates a piece of code once during the last test instance
1,563
omni.graph.core.traverse_downstream_graph.md
# traverse_downstream_graph ## traverse_downstream_graph ## omni.graph.core.traverse_downstream_graph ### Description Traverses the nodes downstream from the input nodes and apply the predicate on visited nodes. ### Parameters - **prims** – The list of starting point nodes for the traversal. - **attribute_predicate** – Function taking an Attribute as parameter and returning bool. If True, connections to this attribute are evaluated, otherwise they are skipped. - **node_callback** – Function taking a Node as parameter. Allows for custom logic to be applied to visited nodes. ### Returns Returns the set of visited nodes. ### Raises - **og.OmniGraphError** if the list of prims contains an invalid prim, or the prims do not all belong to the same graph.
762
omni.graph.core.traverse_upstream_graph.md
# traverse_upstream_graph ## traverse_upstream_graph ``` ```markdown omni.graph.core.traverse_upstream_graph(prims: List[Prim], attribute_predicate: Optional[Callable[[Attribute], bool]] = None, node_callback: Optional[Callable[[Node], None]] = None) ``` ```markdown ## omni.graph.core.traverse_upstream_graph ### Description Traverses the nodes upstream from the input nodes and apply the predicate on visited nodes. ### Parameters - **prims** – The list of starting point nodes for the traversal. - **attribute_predicate** – Function taking an Attribute as parameter and returning bool. If True, connections to this attribute are evaluated, otherwise they are skipped. - **node_callback** – Function taking a Node as parameter. Allows for custom logic to be applied to visited nodes. ### Returns The set of visited nodes. ### Return type set[omni.graph.core.Node] ### Raises og.OmniGraphError if the list of prims contains an invalid prim, or the prims do not all belong to the same graph.
998
omni.graph.core.Type.md
# Type ## Type ``` class omni.graph.core.Type ``` Bases: `pybind11_object` Full definition of the data type owned by an attribute ### Methods - `__init__(self, base_type, tuple_count, ...)` - `get_base_type_name(self)` - Gets the name of this type's base data type - `get_ogn_type_name(self)` - Gets the OGN-style name of this type - `get_role_name(self)` - Gets the name of the role of this type - `get_type_name(self)` - Gets the name of this data type - `is_compatible_raw_data(self, type_to_compare)` - Does a role-insensitive comparison with the given Type. - `is_matrix_type(self)` - Determines if this type is a matrix type. ``` | Method | Description | |--------|-------------| | `is_matrix_type(self)` | Checks if the type one of the matrix types, whose tuples are interpreted as a square array | ## Attributes | Attribute | Description | |-----------|-------------| | `array_depth` | (int) Zero for a single value, one for an array. | | `base_type` | (omni.graph.core.BaseDataType) Base type of the attribute. | | `role` | (omni.graph.core.AttributeRole) The semantic role of the type. | | `tuple_count` | (int) Number of components in each tuple. | ## Methods ### `__init__(self: omni.graph.core._omni_graph_core.Type, base_type: omni.graph.core._omni_graph_core.BaseDataType, tuple_count: int = 1, array_depth: int = 0, role: omni.graph.core._omni_graph_core.AttributeRole = <AttributeRole.NONE: 0>) -> None` ### `get_base_type_name(self: omni.graph.core._omni_graph_core.Type) -> str` - Gets the name of this type’s base data type - Returns: Name of just the base data type of this type, e.g. “float” - Return type: str ### `get_ogn_type_name(self: omni.graph.core._omni_graph_core.Type) -> str` - Returns the OGN type name for this type - Return type: str ### Gets the OGN-style name of this type **Returns** - Name of this type in OGN format, which differs slightly from the USD format, e.g. “float[3]” **Return type** - str ### Gets the name of the role of this type **Returns** - Name of just the role of this type, e.g. “color” **Return type** - str ### Gets the name of this data type **Returns** - Name of this type, e.g. “float3” **Return type** - str ### Does a role-insensitive comparison with the given Type **Parameters** - **type_to_compare** (omni.graph.core.Type) – Type to compare for compatibility **Returns** - True if the given type is compatible with this type **Return type** - bool ### Determines if this type is a matrix type **Returns** - True if this type is a matrix type **Return type** - bool ## omni.graph.core.Type.is_matrix_type Checks if the type one of the matrix types, whose tuples are interpreted as a square array ### Returns - True if this type is one of the matrix types ### Return type - bool ## omni.graph.core.Type.array_depth (int) Zero for a single value, one for an array. ## omni.graph.core.Type.base_type (omni.graph.core.BaseDataType) Base type of the attribute. ## omni.graph.core.Type.role (omni.graph.core.AttributeRole) The semantic role of the type. ## omni.graph.core.Type.tuple_count (int) Number of components in each tuple. 1 for a single value (scalar), 3 for a point3d, etc.
3,197
omni.graph.core.TypedValue.md
# TypedValue ## Class Definition ```python class omni.graph.core.TypedValue(value: Optional[Any] = None, type: Type = Type(<BaseDataType.UNKNOWN: 0>), 1, 0) ``` ### Description Bases: `object` Class that encapsulates an arbitrary value with an explicit data type. This can be used when the data type is ambiguous due to the limited set of native Python data types. For example it can differentiate between a float and double whereas in Python they are the same thing. ### Methods - `__init__(value, type)`: Initialize the TypedValue. - `has_type()`: Checks if the data has a known type. - `set(*args, **kwargs)`: Set the data to a specific value and/or type. ### Attributes - `type`: The type of the value. | Property | Description | |----------|-------------| | **type** | Type of the data | | **value** | Value of the data | ### __init__ ```python __init__(value: typing.Optional[typing.Any] = None, type: omni.graph.core._omni_graph_core.Type = Type(<BaseDataType.UNKNOWN: 0>, 1, 0)) -> None ``` ### has_type ```python has_type() -> bool ``` Checks if the data has a known type. - Returns: True iff the data value has an explicit type (i.e. is not type UNKNOWN) - Return type: bool ### set ```python set(*args, **kwargs) ``` Set the data to a specific value and/or type. The regular __init__ can be passed (VALUE, TYPE) in the simplest case; this is for more flexible setting. Argument types are flexible and support the following syntax: - set(): Sets the data value to None and makes it an UNKNOWN type - set(Any): Sets the data value and makes it an UNKNOWN type - set(Any, str|og.Type): Sets the data value and defines an explicit type - set(value=Any): Sets the data value and makes it an UNKNOWN type - set(value=Any, type=str|og.Type): Sets the data value and defines an explicit type No attempt is made to match the type to the value - it is assumed that if it is specified, it is correct. - Raises: OmniGraphError – if the argument combinations are not one of the above, or the type could not be parsed ### type ```python type: Type = Type(<BaseDataType.UNKNOWN: 0>, 1, 0) ``` Type of the data ### value ```python value ``` Value of the data <dl> <dt> <em class="property"> <span class="p"> <span class="pre">: Any <em class="property"> <span class="p"> <span class="pre">= None <dd> <p>Value of the data
2,403
omni.graph.core.Type_omni.graph.core.Type.md
# Type ## omni.graph.core.Type ```python class omni.graph.core.Type(pybind11_object) ``` Full definition of the data type owned by an attribute ### Methods ```python __init__(self, base_type, tuple_count, ...) ``` ```python get_base_type_name(self) ``` Gets the name of this type's base data type ```python get_ogn_type_name(self) ``` Gets the OGN-style name of this type ```python get_role_name(self) ``` Gets the name of the role of this type ```python get_type_name(self) ``` Gets the name of this data type ```python is_compatible_raw_data(self, type_to_compare) ``` Does a role-insensitive comparison with the given Type. ```python is_matrix_type(self) ``` <span class="pre"> is_matrix_type (self) <td> <p> Checks if the type one of the matrix types, whose tuples are interpreted as a square array <p class="rubric"> Attributes <table class="autosummary longtable docutils align-default"> <colgroup> <col style="width: 10%"/> <col style="width: 90%"/> <tbody> <tr class="row-odd"> <td> <p> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> array_depth <td> <p> (int) Zero for a single value, one for an array. <tr class="row-even"> <td> <p> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> base_type <td> <p> (omni.graph.core.BaseDataType) Base type of the attribute. <tr class="row-odd"> <td> <p> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> role <td> <p> (omni.graph.core.AttributeRole) The semantic role of the type. <tr class="row-even"> <td> <p> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> tuple_count <td> <p> (int) Number of components in each tuple. <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.__init__"> <span class="sig-name descname"> <span class="pre"> __init__ <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self: <span class="pre"> omni.graph.core._omni_graph_core.Type , <em class="sig-param"> <span class="n"> <span class="pre"> base_type: <span class="pre"> omni.graph.core._omni_graph_core.BaseDataType , <em class="sig-param"> <span class="n"> <span class="pre"> tuple_count: <span class="pre"> int <span class="pre"> = <span class="pre"> 1 , <em class="sig-param"> <span class="n"> <span class="pre"> array_depth: <span class="pre"> int <span class="pre"> = <span class="pre"> 0 , <em class="sig-param"> <span class="n"> <span class="pre"> role: <span class="pre"> omni.graph.core._omni_graph_core.AttributeRole <span class="pre"> = <span class="pre"> &lt;AttributeRole.NONE: <span class="pre"> 0&gt; <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> None <dd> <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.get_base_type_name"> <span class="sig-name descname"> <span class="pre"> get_base_type_name <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <a class="reference internal" href="#omni.graph.core.Type" title="omni.graph.core._omni_graph_core.Type"> <span class="pre"> omni.graph.core._omni_graph_core.Type <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> str <dd> <p> Gets the name of this type’s base data type <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> Name of just the base data type of this type, e.g. “float” <dt class="field-even"> Return type <dd class="field-even"> <p> str <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.get_ogn_type_name"> <span class="sig-name descname"> <span class="pre"> get_ogn_type_name <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <a class="reference internal" href="#omni.graph.core.Type" title="omni.graph.core._omni_graph_core.Type"> <span class="pre"> omni.graph.core._omni_graph_core.Type <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> str <dd> <dl> <dt> <dd> <p> Gets the OGN-style name of this type <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> Name of this type in OGN format, which differs slightly from the USD format, e.g. “float[3]” <dt class="field-even"> Return type <dd class="field-even"> <p> str <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.get_role_name"> <span class="sig-name descname"> <span class="pre"> get_role_name <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> omni.graph.core._omni_graph_core.Type <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> str <dd> <p> Gets the name of the role of this type <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> Name of just the role of this type, e.g. “color” <dt class="field-even"> Return type <dd class="field-even"> <p> str <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.get_type_name"> <span class="sig-name descname"> <span class="pre"> get_type_name <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> omni.graph.core._omni_graph_core.Type <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> str <dd> <p> Gets the name of this data type <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> Name of this type, e.g. “float3” <dt class="field-even"> Return type <dd class="field-even"> <p> str <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.is_compatible_raw_data"> <span class="sig-name descname"> <span class="pre"> is_compatible_raw_data <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> omni.graph.core._omni_graph_core.Type , <em class="sig-param"> <span class="n"> <span class="pre"> type_to_compare <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> omni.graph.core._omni_graph_core.Type <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> bool <dd> <p> Does a role-insensitive comparison with the given Type. <p> For example double[3] != pointd[3], but they are compatible and so this function would return True. <dl class="field-list simple"> <dt class="field-odd"> Parameters <dd class="field-odd"> <p> <strong> type_to_compare ( <em> omni.graph.core.Type ) – Type to compare for compatibility <dt class="field-even"> Returns <dd class="field-even"> <p> True if the given type is compatible with this type <dt class="field-odd"> Return type <dd class="field-odd"> <p> bool <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.Type.is_matrix_type"> <span class="sig-name descname"> <span class="pre"> is_matrix_type <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> omni.graph.core._omni_graph_core.Type <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> bool <dd> <p> Determines if this type is a matrix type. <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> True if this type is a matrix type <dt class="field-even"> Return type <dd class="field-even"> <p> bool ### omni.graph.core.Type.is_matrix_type Checks if the type one of the matrix types, whose tuples are interpreted as a square array #### Returns - True if this type is one of the matrix types #### Return type - bool ### omni.graph.core.Type.array_depth (int) Zero for a single value, one for an array. ### omni.graph.core.Type.base_type (omni.graph.core.BaseDataType) Base type of the attribute. ### omni.graph.core.Type.role (omni.graph.core.AttributeRole) The semantic role of the type. ### omni.graph.core.Type.tuple_count (int) Number of components in each tuple. 1 for a single value (scalar), 3 for a point3d, etc.
11,804
omni.graph.core.typing.Classes.md
# omni.graph.core.typing Classes ## Classes Summary: - PrimAttrs_t - dict() -> new empty dictionary - TypeConversion - Static class for storing conversion methods between python types and Omnigraph types
209
omni.graph.core.typing.TypeConversion.md
# TypeConversion ## TypeConversion Static class for storing conversion methods between python types and Omnigraph types ### Methods - `__init__()` - `from_ogn_type(og_type)` - Searches the conversion registry using an Omnigraph type. - `from_type(type_desc)` - Searches the conversion registry using a python type. - `register_type_conversion(python_type, ...)` - Registers a type conversion between a python type and an ogn type. - `unregister_type_conversion([python_type, ...])` - Unregisters a type conversion from python to ogn. | types | | --- | | user_types | ```python __init__() ``` ```python class Method(value) ``` Bases: ```python Enum ``` Conversion method to go from source type to destination type ```python ASSIGN = (0,) ``` Return the value to be assigned to the destination ```python MODIFY = 1 ``` Pass in the destination object to be modified in place ```python classmethod from_ogn_type(og_type: str) -> omni.graph.core._impl.autonode_deprecated.data_typing.TypeDesc | None ``` Searches the conversion registry using an Omnigraph type. Searches the user types first, defaults to the system types. Parameters - og_type – string representing the incoming ogn type Returns - TypeDesc for the found python type if it’s found, None otherwise ```python classmethod from_type(type_desc: type) -> omni.graph.core._impl.autonode_deprecated.data_typing.TypeDesc | None ``` Searches the conversion registry using a python type. Parameters - type_desc – type Returns - TypeDesc for the found python type if it’s found, None otherwise <dl> <dt class="field-odd"> <p> <strong> type_desc – python type to convert <dt class="field-even"> <p> Returns <dd class="field-even"> <p> TypeDesc for the found python type if it’s found, None otherwise <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.core.typing.TypeConversion.register_type_conversion"> <em class="property"> <span class="pre"> classmethod <span class="sig-name descname"> <span class="pre"> register_type_conversion <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> python_type <span class="p"> <span class="pre"> : <span class="n"> <span class="pre"> type , <em class="sig-param"> <span class="n"> <span class="pre"> ogn_typename <span class="p"> <span class="pre"> : <span class="n"> <span class="pre"> str , <em class="sig-param"> <span class="n"> <span class="pre"> python_to_ogn <span class="p"> <span class="pre"> : <span class="n"> <span class="pre"> callable <span class="o"> <span class="pre"> = <span class="default_value"> <span class="pre"> None , <em class="sig-param"> <span class="n"> <span class="pre"> python_to_ogn_method <span class="p"> <span class="pre"> : <span class="n"> <span class="pre"> Method <span class="o"> <span class="pre"> = <span class="default_value"> <span class="pre"> Method.ASSIGN , <em class="sig-param"> <span class="n"> <span class="pre"> ogn_to_python <span class="p"> <span class="pre"> : <span class="n"> <span class="pre"> callable <span class="o"> <span class="pre"> = <span class="default_value"> <span class="pre"> None , <em class="sig-param"> <span class="n"> <span class="pre"> ogn_to_python_method <span class="p"> <span class="pre"> : <span class="n"> <span class="pre"> Method <span class="o"> <span class="pre"> = <span class="default_value"> <span class="pre"> Method.ASSIGN , <em class="sig-param"> <span class="n"> <span class="pre"> default <span class="o"> <span class="pre"> = <span class="default_value"> <span class="pre"> None <span class="sig-paren"> ) <dd> <p> Registers a type conversion between a python type and an ogn type. Masks any existing system setting. If a previous user-submitted type conversion is registered, it will be overridden. <dl class="field-list simple"> <dt class="field-odd"> Parameters <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> python_type – Type representation in python. <li> <p> <strong> ogn_typename – String representation of the ogn type. Node generation will fail on unrecognized types. <li> <p> <strong> python_to_ogn – [optional] function to convert a python return value to an OGN struct. Signature is Callable[[[python_type], object]. Defaults to None <li> <p> <strong> ogn_to_python – [optional] function to convert an OGN struct to a python return value. Signature is Callable[[[object], python_type]. Defaults to None <li> <p> <strong> ogn_to_python_method – [optional] Type <dt> <span class="sig-name"> <span class="pre"> unregister_type_conversion <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> python_type <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> type <span class="w"> <span class="o"> <span class="pre"> = <span class="w"> <span class="default_value"> <span class="pre"> None , <em class="sig-param"> <span class="n"> <span class="pre"> ogn_type_name <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> str <span class="w"> <span class="o"> <span class="pre"> = <span class="w"> <span class="default_value"> <span class="pre"> None <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> omni.graph.core._impl.autonode_deprecated.data_typing.TypeDesc <span class="w"> <span class="p"> <span class="pre"> | <span class="w"> <span class="pre"> None <dd> <p> Unregisters a type conversion from python to ogn. Doesn’t unregister system types. <dl class="field-list simple"> <dt class="field-odd"> Parameters <dd class="field-odd"> <ul class="simple"> <li> <p> <strong> python_type – the python type to be removed from support <li> <p> <strong> ogn_type_name – the ogn type name type to be removed from support <dt class="field-even"> Returns <dd class="field-even"> <p> The TypeDesc tuple just unregistered, or none.
8,748
omni.graph.core.WrappedArrayType.md
# WrappedArrayType ## WrappedArrayType ```python class omni.graph.core.WrappedArrayType(value) ``` Bases: `Enum` Enum for the type of array data returned from the get methods ### Attributes | Attribute | Description | |-----------|-------------| | `NUMPY` | Array data is wrapped in numpy.ndarray | | `RAW` | Array data is wrapped in DataWrapper | ```python def __init__(): ``` ```python NUMPY = 1 ``` Array data is wrapped in numpy.ndarray ```python RAW = 2 ``` Array data is wrapped in DataWrapper # 标题 这是一个段落。 这是一个链接 描述图片的文本
540
omni.graph.core_api.md
# Omniverse Kit API ## Class Hierarchy - namespace omni - namespace graph - namespace core - namespace ogn - template struct is_array - template struct is_array<array<T>> - template struct is_array<base_array<T, HandleType>> - template struct is_array<const_array<T>> - template class array - template class base_array - template class base_string - template class const_array - class const_string - class NodeTypeABI - class OmniGraphDatabase - template class OmniGraphNode_ABI - class string - enum ExecutionAttributeState - struct AttributeObj - struct AttrKey - struct AttrKeyHash - struct ConnectionCallback - struct ConnectionInfo - struct ConstAttributeDataHandleHash - struct ConstBundleHandleHash - struct CreateGraphAsNodeOptions - struct ErrorStatusChangeCallback - struct FileFormatUpgrade - struct FileFormatVersion - struct GraphContextObj - struct GraphInstanceID - struct GraphObj - struct IAttribute - struct IAttributeData - struct IAttributeType - struct IBundle - struct IDataModel - struct IDataStealingPrototype - struct IGraph - struct IGraphContext - struct IGraphRegistry - struct INode - struct InstanceIndex - struct IScheduleNode - struct NodeObj - struct NodeTypeObj - struct OptionalMethod - struct PathChangedCallback - class AttributeDataHandle - class BundleHandle - class ConstAttributeDataHandle - class ConstBundleHandle - class DataModelEditScope - DataModelEditScope - template class HandleBase - class IBundle2_abi - class IBundleFactory2_abi - class IBundleFactory_abi - class IConstBundle2_abi - class INodeCategories_abi - class ISchedulingHints2_abi - class ISchedulingHints_abi - class IVariable2_abi - class IVariable_abi - class NodeContextHandle - enum eAccessLocation - enum eAccessType - enum eComputeRule - enum ePurityStatus - enum eThreadSafety - enum eVariableScope - enum IGraphEvent - enum IGraphRegistryEvent - enum INodeEvent - namespace std - template struct hash<omni::graph::core::GraphInstanceID> ## File Hierarchy - Directory omni - Directory graph - Directory core - Directory bundle - File IBundle1.h - File IBundle2.h - File IBundleFactory1.h - File IBundleFactory2.h - File IConstBundle2.h - Directory ogn - File array.h - File Database.h - File Variable.h - OmniGraphNodeABI.h - File - string.h - File - Handle.h - File - iAttributeData.h - File - IAttributeType.h - File - iComputeGraph.h - File - IDataModel.h - File - IGraphRegistry.h - File - INodeCategories.h - File - ISchedulingHints.h - File - ISchedulingHints2.h - File - IVariable.h - File - IVariable2.h - Directory - rendering - Directory - include - Directory - omni - Directory - fabric - File - Type.h ## Namespaces - omni - omni::core - omni::graph - omni::graph::core - omni::graph::core::ogn - std ## Classes and Structs - omni::graph::core::AttributeObj: Object representing an OmniGraph Attribute. - omni::graph::core::AttrKey: Handle type representing attributes, which require two parts to be valid. - omni::graph::core::AttrKeyHash: Make sure to warn developer if an incompatibility is introduced. - omni::graph::core::ConnectionCallback: Callback object used when a connection is made or broken between two attributes. - omni::graph::core::ConnectionInfo: Information passed to define the opposite end of a connection. - omni::graph::core::ConstAttributeDataHandleHash: Hash definition so that omni::graph::core::AttributeDataHandle can be used in a map. - **omni::graph::core::ConstBundleHandleHash**: Hash definition so that omni::graph::core::BundleHandle can be used in a map. - **omni::graph::core::CreateGraphAsNodeOptions**: Parameters for IGraph::CreateGraphAsNode. - **omni::graph::core::ErrorStatusChangeCallback**: Encapsulation of a callback that happens when a node’s error status changes. - **omni::graph::core::FileFormatUpgrade**: Callback object to instantiate for use as a callback when an older version of an OmniGraph file is read. - **omni::graph::core::FileFormatVersion**: Encapsulates the information required to define a file format version number. - **omni::graph::core::GraphContextObj**: Object representing an OmniGraph GraphContext. - **omni::graph::core::GraphInstanceID**: Permanent value representing an instance. - **omni::graph::core::GraphObj**: Object representing an OmniGraph Graph. - **omni::graph::core::IAttribute**: Interface to provide functionality to access and modify properties of an OmniGraph attribute. - **omni::graph::core::IAttributeData**: Interface to data belonging to a specific attribute. - **omni::graph::core::IAttributeType**: Interface class managing various features of attribute types. - **omni::graph::core::IBundle**: Interface for bundle attribute data. - **omni::graph::core::IDataModel**: Interface to the underlying data access for OmniGraph. - **omni::graph::core::IDataStealingPrototype**: Retired prototype. - **omni::graph::core::IGraph**: Interface to an OmniGraph, several of which may be present in a scene. - **omni::graph::core::IGraphContext**: Use this interface to pull data for compute node, and also push data to compute graph/cache. - **omni::graph::core::IGraphRegistry**: Interface that manages the registration and deregistration of node types. - **omni::graph::core::INode**: Interface to a single node in a graph. - **omni::graph::core::InstanceIndex**: Temp value representing an instance during a compute or a loop. - **omni::graph::core::IScheduleNode**: Retired feature - use EF in order to customize execution flow in OG. - **omni::graph::core::NodeObj**: Object representing an OmniGraph Node. - **omni::graph::core::NodeTypeObj**: Object representing an OmniGraph NodeType. - **omni::graph::core::ogn::is_array**: - omni::graph::core::ogn::is_array< array< T >>: Default trait indicating if the class is one of our array types. - omni::graph::core::ogn::is_array< array< T >>: Trait indicating that mutable templated types are array types. - omni::graph::core::ogn::is_array< base_array< T, HandleType >>: Trait indicating that specific templated types are array types. - omni::graph::core::ogn::is_array< const_array< T >>: Trait indicating that constant templated types are array types. - omni::graph::core::OptionalMethod: Helper struct to make it easy to reference methods on a class that may or may not be defined. - omni::graph::core::PathChangedCallback: Callback object used when a path has changed, requiring a path attribute update. - std::hash< omni::graph::core::GraphInstanceID >: Hash specialization for omni::graph::core::GraphInstanceID. - omni::graph::core::AttributeDataHandle: Object representing a handle to a variable AttributeData type. - omni::graph::core::BundleHandle: Object representing a handle to an OmniGraph Bundle. - omni::graph::core::ConstAttributeDataHandle: Object representing a handle to an AttributeData type. - omni::graph::core::ConstBundleHandle: Object representing a handle to a constant OmniGraph Bundle. - omni::graph::core::DataModelEditScope: Scoping object to enter and exist editing mode for the DataModel. - omni::graph::core::HandleBase: Template class for defining handles to various OmniGraph data types. - omni::graph::core::IBundle2_abi: Provide read write access to recursive bundles. - omni::graph::core::IBundleFactory2_abi: IBundleFactory version 2. - omni::graph::core::IBundleFactory_abi: Interface to create new bundles. - omni::graph::core::IConstBundle2_abi: Provide read only access to recursive bundles. - omni::graph::core::INodeCategories_abi: Interface to the list of categories that a node type can belong to. - omni::graph::core::ISchedulingHints2_abi: Interface extension for ISchedulingHints that adds a new “pure” hint. - omni::graph::core::ISchedulingHints_abi: Interface to the list of scheduling hints that can be applied to a node type. - omni::graph::core::IVariable2_abi: Interface extension for IVariable that adds the ability to set a variable type. - omni::graph::core::IVariable_abi: Object that contains a value that is local to a graph, available from anywhere in the graph. ## Classes - **omni::graph::core::NodeContextHandle**: Object representing a handle to an OmniGraph NodeContext. - **omni::graph::core::ogn::array**: std::vector-like wrapper class for array attribute data in the Ogn Database. - **omni::graph::core::ogn::base_array**: std::span-like wrapper class for array attribute data in the Ogn Database. - **omni::graph::core::ogn::base_string**: std::string_view-like wrapper class for string attribute data in the Ogn Database. - **omni::graph::core::ogn::const_array**: std::vector-like wrapper class for constant array attribute data in the Ogn Database. - **omni::graph::core::ogn::const_string**: std::string_view-like wrapper class for constant string attribute data in the Ogn Database. - **omni::graph::core::ogn::NodeTypeABI**: Common base class for all node type implementation definitions, so that they can be in a common container. - **omni::graph::core::ogn::OmniGraphDatabase**: Class defining the minimal amount of shared interface for the generated database interface classes. - **omni::graph::core::ogn::OmniGraphNode_ABI**: ABI proxy class for OGN generated nodes. - **omni::graph::core::ogn::string**: std::string_view-like class for string output attribute data in the Ogn Database. ## Enums - **omni::graph::core::eAccessLocation** - **omni::graph::core::eAccessType** - **omni::graph::core::eComputeRule** - **omni::graph::core::ePurityStatus** - **omni::graph::core::eThreadSafety** - **omni::graph::core::eVariableScope** - **omni::graph::core::ExecutionAttributeState** - **omni::graph::core::IGraphEvent** - **omni::graph::core::IGraphRegistryEvent** - **omni::graph::core::INodeEvent** ## Functions - **clearContents**: Remove all attributes, child bundles and metadata from this bundle, but keep the bundle itself. - **createAttributeMetadata**: Create attribute metadata fields. - `createAttributeMetadata`: Create attribute metadata field. - `createBundle`: Create a single bundle at the given path and acquire an IBundle2 interface instance. This function is a convenience wrapper for creating individual bundles. - `createBundleMetadata`: Create bundle metadata fields in this bundle. - `createBundleMetadata`: Create bundle metadata field in this bundle. - `getAttributeMetadataByName`: Search for read-write metadata field handle for the attribute by using field name. - `getAttributeMetadataCount`: Return Number of metadata fields in the attribute. - `getAttributeMetadataNamesAndTypes`: Get the names and types of all attribute metadata fields in the attribute. - `getBundle`: Acquire a single IBundle2 interface instance from a bundle handle. This function retrieves a writable interface for a specific bundle. - `getBundle`: Acquire a single IConstBundle2 interface instance from a constant bundle handle. This function retrieves a read-only interface for a specific immutable bundle. - `getBundleMetadataByName`: Search for bundle metadata field based on provided name. - `getBundles`: Acquire IBundle2 interface instances from bundle handles. This overloaded function retrieves writable bundle interfaces for the provided handles. - `getBundles`: Acquire IConstBundle2 interface instances from constant bundle handles. This overloaded function retrieves read-only interfaces for constant bundles. - `getChildBundle`: - `getConstAttributeMetadataByName`: Search for read only field handles in the attribute by using field names. - `getConstBundle`: Acquire a single IConstBundle2 interface instance from a constant bundle handle. This function retrieves a read-only interface for a specific bundle. - `getConstBundleMetadataByName`: Search for field handles in this bundle by using field names. - `getConstBundles`: Acquire IConstBundle2 interface instances from constant bundle handles. This function retrieves read-only bundle interfaces from the provided handles. - `getConstChildBundle`: - `omni::graph::core::ogn::constructInputFromOutput`: - `omni::graph::core::OMNI_DECLARE_INTERFACE`: - `omni::graph::core::OMNI_DECLARE_INTERFACE`: - `omni::graph::core::OMNI_DECLARE_INTERFACE`: - `omni::graph::core::OMNI_DECLARE_INTERFACE`: - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **omni::graph::core::OMNI_DECLARE_INTERFACE** - **removeAttributeMetadata**: Remove attribute metadata fields. - **removeAttributeMetadata**: Remove attribute metadata field. - **removeBundleMetadata**: Remove bundle metadata based on provided field names. - **removeBundleMetadata**: Remove bundle metadata based on provided field name. ## Variables - **omni::graph::core::INVALID_TOKEN_VALUE** - **omni::graph::core::kAccordingToContextIndex** - **omni::graph::core::kAuthoringGraphIndex** - **omni::graph::core::kInstancingGraphTargetPath** - **omni::graph::core::kInvalidAttributeHandle** - **omni::graph::core::kInvalidGraphContextHandle** - **omni::graph::core::kInvalidGraphHandle** - **omni::graph::core::kInvalidHandleIntValue** - **omni::graph::core::kInvalidInstanceIndex** - **omni::graph::core::kInvalidNodeHandle** - **omni::graph::core::kInvalidNodeTypeHandle** - **omni::graph::core::kReadAndWrite** - **omni::graph::core::kReadOnly** - **omni::graph::core::kUninitializedGraphId** - **omni::graph::core::kUninitializedTypeCount** - **omni::graph::core::kWriteOnly** ## Defines - **COMPUTE_GRAPH_VERBOSE_LOGGING**: If 1 then extra logging is enabled (which affects performance) - **kOgnMetadataAllowedTokens** - **kOgnMetadataAllowedTokensRaw** - **kOgnMetadataAllowMultiInputs** - **kOgnMetadataCategories** - **kOgnMetadataCategoryDescriptions** - **kOgnMetadataCudaPointers** - **kOgnMetadataDefault** - **kOgnMetadataDescription** - **kOgnMetadataExclusions** - **kOgnMetadataExtension** - **kOgnMetadataHidden** - **kOgnMetadataIconBackgroundColor** - **kOgnMetadataIconBorderColor** - **kOgnMetadataIconColor** - **kOgnMetadataIconPath** - **kOgnMetadataInternal** - **kOgnMetadataLanguage** - **kOgnMetadataLiteralOnly** - **kOgnMetadataMemoryType** - **kOgnMetadataObjectId** - **kOgnMetadataOptional** - **kOgnMetadataOutputOnly** - **kOgnMetadataTags** - **kOgnMetadataTokens** - **kOgnMetadataUiName** - **kOgnMetadataUiType** - **kOgnSingletonName**: kOgnSingletonName - **NODE_PATH**: NODE_PATH - **OG_INVALID_HANDLE_INT_VALUE**: Representation of an invalid handle as an integer. - **OGN_DBG**: OGN_DBG - **RESOLVED_ATTRIBUTE_PREFIX**: Deprecated, do not use. - **STRUCT_INTEGRITY_CHECK**: Macro to validate the structure of the interface definitions. ## Typedefs - **omni::graph::core::AttributeHandle**: omni::graph::core::AttributeHandle - **omni::graph::core::AttributeHash**: omni::graph::core::AttributeHash - **omni::graph::core::BucketId**: omni::graph::core::BucketId - **omni::graph::core::ConstPrimHandle**: omni::graph::core::ConstPrimHandle - **omni::graph::core::ConstPrimHandleHash**: omni::graph::core::ConstPrimHandleHash - **omni::graph::core::ConstRawPtr**: omni::graph::core::ConstRawPtr - **omni::graph::core::CreateDbFunc**: omni::graph::core::CreateDbFunc - **omni::graph::core::DataAccessFlags**: omni::graph::core::DataAccessFlags - **omni::graph::core::GraphContextHandle**: omni::graph::core::GraphContextHandle - **omni::graph::core::GraphHandle**: omni::graph::core::GraphHandle - **omni::graph::core::HandleInt**: omni::graph::core::HandleInt - **omni::graph::core::has_setContext**: omni::graph::core::has_setContext - **omni::graph::core::has_setHandle**: omni::graph::core::has_setHandle - **omni::graph::core::IVariablePtr**: omni::graph::core::IVariablePtr - **omni::graph::core::NameToken**: omni::graph::core::NameToken - **omni::graph::core::NodeHandle**: omni::graph::core::NodeHandle - **omni::graph::core::NodeTypeHandle**: omni::graph::core::NodeTypeHandle - **omni::graph::core::ObjectId**: omni::graph::core::ObjectId - **omni::graph::core::ogn::DynamicInput**: omni::graph::core::ogn::DynamicInput - **omni::graph::core::ogn::DynamicOutput**: omni::graph::core::ogn::DynamicOutput - omni::graph::core::ogn::DynamicState - omni::graph::core::ogn::has_addExtendedInput - omni::graph::core::ogn::has_addExtendedOutput - omni::graph::core::ogn::has_addExtendedState - omni::graph::core::ogn::has_addInput - omni::graph::core::ogn::has_addOutput - omni::graph::core::ogn::has_addState - omni::graph::core::ogn::has_addSubNodeType - omni::graph::core::ogn::has_computeABI - omni::graph::core::ogn::has_computeCudaT - omni::graph::core::ogn::has_computeOGNT - omni::graph::core::ogn::has_computeVectorizedABI - omni::graph::core::ogn::has_computeVectorizedOGNT - omni::graph::core::ogn::has_createNodeType - omni::graph::core::ogn::has_definedAtRuntime - omni::graph::core::ogn::has_getAllMetadata - omni::graph::core::ogn::has_getMetadata - omni::graph::core::ogn::has_getMetadataCount - omni::graph::core::ogn::has_getNodeType - omni::graph::core::ogn::has_getSubNodeType - omni::graph::core::ogn::has_getTypeName - omni::graph::core::ogn::has_hasState - omni::graph::core::ogn::has_initialize - omni::graph::core::ogn::has_initializeType - omni::graph::core::ogn::has_initInstance - omni::graph::core::ogn::has_inspect - **omni::graph::core::ogn::has_onConnectionTypeResolve** - **omni::graph::core::ogn::has_registerTasks** - **omni::graph::core::ogn::has_release** - **omni::graph::core::ogn::has_releaseInstance** - **omni::graph::core::ogn::has_setHasState** - **omni::graph::core::ogn::has_setMetadata** - **omni::graph::core::ogn::has_updateNodeVersion** - **omni::graph::core::ogn::InputAttribute** - **omni::graph::core::ogn::OmniGraphNodeDeregisterFn** - **omni::graph::core::ogn::OmniGraphNodeRegisterAliasFn** - **omni::graph::core::ogn::OmniGraphNodeRegisterFn** - **omni::graph::core::ogn::OutputAttribute** - **omni::graph::core::ogn::VariableAttribute** - **omni::graph::core::PrimHandle** - **omni::graph::core::RawPtr** - **omni::graph::core::TargetPath**
18,339
omni.graph.examples.cpp.md
# omni.graph.examples.cpp ## Navigation - [API (python)](API.html) - [Modules](Modules.html) - omni.graph.examples.cpp ## Content ### Module: omni.graph.examples.cpp #### omni.graph.examples.cpp ##### omni.graph.examples.cpp
230
omni.graph.exec_api.md
# OmniGraph Execution Framework Core API ## Directory hierarchy - **dir** - [omni](dir_omni.html#dir-bad0edba84ea4d6250db0f08c83886ba) - **dir** - [omni/graph](dir_omni_graph.html#dir-69c90ed0c22435c77ab4a2cd8eae54be) - **dir** - [omni/graph/exec](dir_omni_graph_exec.html#dir-d03fe47e62b8e82aff15a1334248e04c) - **dir** - [omni/graph/exec/unstable](dir_omni_graph_exec_unstable.html#dir-155738f640f8d26755a0c457b8dc44d6) - file omni/graph/exec/unstable/Assert.h - file omni/graph/exec/unstable/AtomicBackoff.h - file omni/graph/exec/unstable/CompactUniqueIndex.h - file omni/graph/exec/unstable/ConstName.h - file omni/graph/exec/unstable/ElementAt.h - file omni/graph/exec/unstable/EnumBitops.h - file omni/graph/exec/unstable/ExecutionContext.h - file omni/graph/exec/unstable/ExecutionPath.h - file omni/graph/exec/unstable/ExecutionTask.h - file omni/graph/exec/unstable/Executor.h - file omni/graph/exec/unstable/ExecutorFactory.h - file omni/graph/exec/unstable/Graph.h - file omni/graph/exec/unstable/GraphBuilder.h - file omni/graph/exec/unstable/GraphBuilderContext.h - file omni/graph/exec/unstable/GraphUtils.h - file omni/graph/exec/unstable/IApplyOnEachFunction.gen.h - file omni/graph/exec/unstable/IApplyOnEachFunction.h - file omni/graph/exec/unstable/IBase.gen.h - file omni/graph/exec/unstable/IBase.h - file omni/graph/exec/unstable/IDef.gen.h - file omni/graph/exec/unstable/IDef.h - file - omni/graph/exec/unstable/IExecutionContext.gen.h - file - omni/graph/exec/unstable/IExecutionContext.h - file - omni/graph/exec/unstable/IExecutionCurrentThread.gen.h - file - omni/graph/exec/unstable/IExecutionCurrentThread.h - file - omni/graph/exec/unstable/IExecutionStateInfo.gen.h - file - omni/graph/exec/unstable/IExecutionStateInfo.h - file - omni/graph/exec/unstable/IExecutor.gen.h - file - omni/graph/exec/unstable/IExecutor.h - file - omni/graph/exec/unstable/IGlobalPass.gen.h - file - omni/graph/exec/unstable/IGlobalPass.h - file - omni/graph/exec/unstable/IGraph.gen.h - file - omni/graph/exec/unstable/IGraph.h - file - omni/graph/exec/unstable/IGraphBuilder.gen.h - file - omni/graph/exec/unstable/IGraphBuilder.h - file - omni/graph/exec/unstable/IGraphBuilderContext.gen.h - file - omni/graph/exec/unstable/IGraphBuilderContext.h - file - omni/graph/exec/unstable/IGraphBuilderNode.gen.h - file - omni/graph/exec/unstable/IGraphBuilderNode.h - file - omni/graph/exec/unstable/IInvalidationForwarder.gen.h - file - omni/graph/exec/unstable/IInvalidationForwarder.h - file - omni/graph/exec/unstable/INode.gen.h - file omni/graph/exec/unstable/INode.h - file omni/graph/exec/unstable/INodeDef.gen.h - file omni/graph/exec/unstable/INodeDef.h - file omni/graph/exec/unstable/INodeFactory.gen.h - file omni/graph/exec/unstable/INodeFactory.h - file omni/graph/exec/unstable/INodeGraphDef.gen.h - file omni/graph/exec/unstable/INodeGraphDef.h - file omni/graph/exec/unstable/INodeGraphDefDebug.gen.h - file omni/graph/exec/unstable/INodeGraphDefDebug.h - file omni/graph/exec/unstable/IPartitionPass.gen.h - file omni/graph/exec/unstable/IPartitionPass.h - file omni/graph/exec/unstable/IPass.gen.h - file omni/graph/exec/unstable/IPass.h - file omni/graph/exec/unstable/IPassFactory.gen.h - file omni/graph/exec/unstable/IPassFactory.h - file omni/graph/exec/unstable/IPassPipeline.gen.h - file omni/graph/exec/unstable/IPassPipeline.h - file omni/graph/exec/unstable/IPassRegistry.gen.h - file omni/graph/exec/unstable/IPassRegistry.h - file omni/graph/exec/unstable/IPassTypeRegistry.gen.h - file omni/graph/exec/unstable/IPassTypeRegistry.h - file omni/graph/exec/unstable/IPopulatePass.gen.h - file omni/graph/exec/unstable/IPopulatePass.h - file omni/graph/exec/unstable/IScheduleFunction.gen.h - file omni/graph/exec/unstable/IScheduleFunction.h - file omni/graph/exec/unstable/ITopology.gen.h - file omni/graph/exec/unstable/ITopology.h - file omni/graph/exec/unstable/Module.h - file omni/graph/exec/unstable/Node.h - file omni/graph/exec/unstable/NodeDef.h - file omni/graph/exec/unstable/NodeDefLambda.h - file omni/graph/exec/unstable/NodeGraphDef.h - file omni/graph/exec/unstable/NodePartition.h - file omni/graph/exec/unstable/PartitioningUtils.h - file omni/graph/exec/unstable/PassPipeline.h - file omni/graph/exec/unstable/PassRegistry.h - file omni/graph/exec/unstable/RaceConditionFinder.h - file omni/graph/exec/unstable/ScheduleFunction.h - file omni/graph/exec/unstable/SchedulingInfo.h - file omni/graph/exec/unstable/SmallStack.h - file omni/graph/exec/unstable/SmallVector.h - file omni/graph/exec/unstable/Span.h - file omni/graph/exec/unstable/Stamp.h ## Namespace hierarchy ### namespace omni #### namespace omni::graph ##### namespace omni::graph::exec ###### namespace omni::graph::exec::unstable ####### namespace omni::graph::exec::unstable::detail - struct omni::graph::exec::unstable::detail::ElementAt - class omni::graph::exec::unstable::detail::ExecutionPathCache - class omni::graph::exec::unstable::detail::ExecutorSingleNode - struct omni::graph::exec::unstable::detail::NodeData - class omni::graph::exec::unstable::detail::SmallStack - struct omni::graph::exec::unstable::detail::VisitAll - struct omni::graph::exec::unstable::detail::VisitFirst - struct omni::graph::exec::unstable::detail::VisitLast - enum omni::graph::exec::unstable::detail::VisitOrder - class omni::graph::exec::unstable::AtomicBackoff - enum omni::graph::exec::unstable::BackgroundResultStatus - class omni::graph::exec::unstable::CompactUniqueIndex - class omni::graph::exec::unstable::ConstName - struct omni::graph::exec::unstable::DefaultSchedulingStrategy - struct omni::graph::exec::unstable::EnumBitops - struct omni::graph::exec::unstable::EnumBitops&lt; PassPipelineStatus &gt; - struct omni::graph::exec::unstable::EnumBitops&lt; Status &gt; - **struct** omni::graph::exec::unstable::EnumBitops&lt; detail::VisitOrder &gt; - **class** omni::graph::exec::unstable::ExecutionContext - **struct** omni::graph::exec::unstable::ExecutionNodeData - **class** omni::graph::exec::unstable::ExecutionPath - **class** omni::graph::exec::unstable::ExecutionTask - **struct** omni::graph::exec::unstable::ExecutionVisit - **struct** omni::graph::exec::unstable::ExecutionVisitWithCacheCheck - **class** omni::graph::exec::unstable::Executor - **class** omni::graph::exec::unstable::GraphBuilderContextT - **class** omni::graph::exec::unstable::GraphBuilderT - **class** omni::graph::exec::unstable::GraphT - **class** omni::graph::exec::unstable::IApplyOnEachFunction - **class** omni::graph::exec::unstable::IApplyOnEachFunction_abi - **class** omni::graph::exec::unstable::IBase - **class** omni::graph::exec::unstable::IBase_abi - **class** omni::graph::exec::unstable::IDef - **class** omni::graph::exec::unstable::IDef_abi - **class** omni::graph::exec::unstable::IExecutionContext - **class** omni::graph::exec::unstable::IExecutionContext_abi - class omni::graph::exec::unstable::IExecutionCurrentThread - class omni::graph::exec::unstable::IExecutionCurrentThread_abi - class omni::graph::exec::unstable::IExecutionStateInfo - class omni::graph::exec::unstable::IExecutionStateInfo_abi - class omni::graph::exec::unstable::IExecutor - class omni::graph::exec::unstable::IExecutor_abi - class omni::graph::exec::unstable::IGlobalPass - class omni::graph::exec::unstable::IGlobalPass_abi - class omni::graph::exec::unstable::IGraph - class omni::graph::exec::unstable::IGraphBuilder - class omni::graph::exec::unstable::IGraphBuilderContext - class omni::graph::exec::unstable::IGraphBuilderContext_abi - class omni::graph::exec::unstable::IGraphBuilderNode - class omni::graph::exec::unstable::IGraphBuilderNode_abi - class omni::graph::exec::unstable::IGraphBuilder_abi - class omni::graph::exec::unstable::IGraph_abi - class omni::graph::exec::unstable::IInvalidationForwarder - class omni::graph::exec::unstable::IInvalidationForwarder_abi - class omni::graph::exec::unstable::INode - class omni::graph::exec::unstable::INode - class omni::graph::exec::unstable::INodeDef - class omni::graph::exec::unstable::INodeDef_abi - class omni::graph::exec::unstable::INodeFactory - class omni::graph::exec::unstable::INodeFactory_abi - class omni::graph::exec::unstable::INodeGraphDef - class omni::graph::exec::unstable::INodeGraphDefDebug - class omni::graph::exec::unstable::INodeGraphDefDebug_abi - class omni::graph::exec::unstable::INodeGraphDef_abi - class omni::graph::exec::unstable::INode_abi - class omni::graph::exec::unstable::IPartitionPass - class omni::graph::exec::unstable::IPartitionPass_abi - class omni::graph::exec::unstable::IPass - class omni::graph::exec::unstable::IPassFactory - class omni::graph::exec::unstable::IPassFactory_abi - class omni::graph::exec::unstable::IPassPipeline - class omni::graph::exec::unstable::IPassPipeline_abi - class omni::graph::exec::unstable::IPassRegistry - class omni::graph::exec::unstable::IPassRegistry_abi - class omni::graph::exec::unstable::IPassTypeRegistry - class `omni::graph::exec::unstable::IPassTypeRegistry` - class `omni::graph::exec::unstable::IPassTypeRegistry_abi` - class `omni::graph::exec::unstable::IPass_abi` - class `omni::graph::exec::unstable::IPopulatePass` - class `omni::graph::exec::unstable::IPopulatePass_abi` - class `omni::graph::exec::unstable::IScheduleFunction` - class `omni::graph::exec::unstable::IScheduleFunction_abi` - class `omni::graph::exec::unstable::ITopology` - class `omni::graph::exec::unstable::ITopology_abi` - struct `omni::graph::exec::unstable::Implements` - struct `omni::graph::exec::unstable::ImplementsCastWithoutAcquire` - class `omni::graph::exec::unstable::NodeDefLambda` - class `omni::graph::exec::unstable::NodeDefT` - class `omni::graph::exec::unstable::NodeGraphDefT` - class `omni::graph::exec::unstable::NodeT` - class `omni::graph::exec::unstable::PartitionSet` - enum `omni::graph::exec::unstable::PassPipelineStatus` - class `omni::graph::exec::unstable::PassPipelineT` - struct `omni::graph::exec::unstable::PassTypeRegistryEntry` - class `omni::graph::exec::unstable::RaceConditionFinder` ### API contents #### Classes - Classes - Macros - Directories - Enumerations - Files - Functions - Groups - Namespaces - Structs - Typedefs - Variables
10,326
omni.graph.image.core_api.md
# Omniverse Kit API ## Class Hierarchy - namespace omni - namespace core - template class Generated&lt; omni::graph::image::core::unstable::IPostRenderGraph_abi &gt; - template class Generated&lt; omni::graph::image::core::unstable::IPreRenderGraph_abi &gt; - namespace graph - namespace image - namespace core - namespace unstable - class IPostRenderGraph_abi - class IPreRenderGraph_abi - namespace unstable - template class ComputeParams - template class ComputeParamsBuilder ## File Hierarchy - Directory omni - Directory graph - Directory - image - Directory - unstable - File - ComputeParamsBuilder.h - File - IPostRenderGraph.gen.h - File - IPostRenderGraph.h - File - IPreRenderGraph.gen.h - File - IPreRenderGraph.h ## Namespaces - gpu - gpu::rendergraph - omni - omni::core - omni::graph - omni::graph::exec - omni::graph::exec::unstable - omni::graph::image - omni::graph::image::core - omni::graph::image::core::unstable - omni::graph::image::unstable - omni::graph::image::unstable::@0 - omni::usd - omni::usd::hydra ## Classes and Structs - omni::core::Generated&lt; omni::graph::image::core::unstable::IPostRenderGraph_abi &gt; : The main interface for updating the post-render graph node of the execution graph. - omni::core::Generated&lt; omni::graph::image::core::unstable::IPreRenderGraph_abi &gt; : Interface for updating pre-render graphs. - omni::graph::image::core::unstable::IPostRenderGraph_abi : The main interface for updating the post-render graph node of the execution graph. - omni::graph::image::core::unstable::IPreRenderGraph_abi : Interface for updating pre-render graphs. - omni::graph::image::unstable::ComputeParams : Structure for holding arbitrary parameters. - omni::graph::image::unstable::ComputeParamsBuilder : Structure for building arbitrary parameters. # Class Description A builder class for constructing instances of the `omni::graph::image::unstable::ComputeParams` class. # Functions ## Functions - `gpu::rendergraph::OMNI_DECLARE_INTERFACE` - `omni::graph::image::core::unstable::OMNI_DECLARE_INTERFACE` - `omni::graph::image::core::unstable::OMNI_DECLARE_INTERFACE` - `omni::graph::image::unstable::scheduleCudaTask` # Typedefs ## Typedefs - `omni::usd::PathH`
2,410
omni.graph.telemetry.Extension.md
# Extension ## omni.graph.telemetry.Extension Bases: `omni.ext._extensions.IExt` ### Methods | Method | Description | |--------|-------------| | `__init__(self)` | | | `on_shutdown()` | | | `on_startup()` | | #### omni.graph.telemetry.Extension.__init__ `__init__(self: omni.ext._extensions.IExt) -> None` ``` ```
322
omni.graph.telemetry.Functions.md
# omni.graph.telemetry Functions ## Functions Summary: | Function | Description | |----------|-------------| | send_graph_event | send_graph_event(descriptor: str) -> None |
175
omni.graph.telemetry.md
# omni.graph.telemetry ## Classes Summary - [Extension](./omni.graph.telemetry.Classes.html) ## Functions Summary - [send_graph_event](./omni.graph.telemetry.Functions.html) - send_graph_event(descriptor: str) -> None
221
omni.graph.telemetry.send_graph_event.md
# send_graph_event ## send_graph_event ```python omni.graph.telemetry.send_graph_event(descriptor: str) -> None ``` Sends a graphEvent structured log event with the specified event descriptor string ### Parameters - **descriptor** (str) – A string identifying or describing the event
286
omni.graph.template.mixed.Classes.md
# omni.graph.template.mixed Classes ## Classes Summary: | Class | Description | |-------|-------------| | [IOmniGraphTemplateMixed](omni.graph.template.mixed/omni.graph.template.mixed.IOmniGraphTemplateMixed.html) | Base class for sample interface in the OmniGraph mixed purpose template. |
292
omni.graph.template.mixed.IOmniGraphTemplateMixed.md
# IOmniGraphTemplateMixed ## IOmniGraphTemplateMixed ```python class omni.graph.template.mixed.IOmniGraphTemplateMixed ``` Bases: `omni.graph.template.mixed._o_g_t_m._IOmniGraphTemplateMixed` Base class for sample interface in the OmniGraph mixed purpose template. The interface consists of a single function that returns a float value representing a constant to use in the template node. ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | Overloaded function. | ### Attributes | Attribute | Description | |-----------|-------------| | `multiplier` | | #### `__init__` ```python __init__(*args, **kwargs) ``` Overloaded function. 1. `__init__(self: omni.graph.template.mixed._o_g_t_m.IOmniGraphTemplateMixed, arg0: omni.core._core.IObject) -> None` 2. `__init__(self: omni.graph.template.mixed._o_g_t_m.IOmniGraphTemplateMixed) -> None` # Hello, World! This is an example of a link. Here is an image: ``` console.log('Hello, World!'); ```
1,006
omni.graph.template.mixed_api.md
# kit-omnigraph API ## Class Hierarchy - namespace omni - namespace graph - namespace template_mixed - class IOmniGraphTemplateMixed_abi ## File Hierarchy - Directory omni - Directory graph - Directory template - Directory mixed - File IOmniGraphTemplateMixed.h ## Namespaces - omni - omni::core - omni::graph - omni::graph::template_mixed ## Classes and Structs - omni::graph::template_mixed::IOmniGraphTemplateMixed_abi ## Interfaces ### `OMNI_DECLARE_INTERFACE` Base class for sample interface in the OmniGraph mixed purpose template. The interface consists of a single function that returns a float value representing a constant to use in the template node. ## Functions ### `omni::graph::template_mixed::OMNI_DECLARE_INTERFACE`
775
omni.graph.tools.build_directory_metadata.md
# build_directory_metadata ## build_directory_metadata ```python def build_directory_metadata(ext_path: str, destination: pathlib.Path | None) -> dict[str, dict | str]: ``` Find all of the node type metadata that can be found in the given directory. **Parameters:** - `ext_path`: Directory containing the .ogn files belonging to this extension, traversed fully to find them. - `destination`: Location of file to write metadata. Do not write anything if None. **Raises:** - **OgnScanError** – If the ext_path was not a directory or could not be read, or any of the .ogn files failed parsing. ```
599
omni.graph.tools.Classes.md
# omni.graph.tools Classes ## Classes Summary: | Class Name | Description | |------------|-------------| | DeprecateMessage | Manager for deprecation messages, to make it efficient to prevent multiple logging of the same | | DeprecatedDictConstant | Class that lets you show a warning or error when attempting to use a deprecated dict constant value. | | DeprecatedStringConstant | Class that lets you show a warning or error when attempting to use a deprecated string constant value. | | DeprecationError | Exception to raise when a hard-deprecated import, class, or function is attempted to be used. | | DeprecationLevel | Enum describing how deprecations should be treated | | IndentedOutput | Helper class that provides output capabilities to messages with preserved indentation levels |
793
omni.graph.tools.DeprecatedClass.md
# DeprecatedClass ## DeprecatedClass ### omni.graph.tools.DeprecatedClass #### Decorator to deprecate a class. ##### Parameters - **deprecation_message** – A string to describe the action the user is to take to avoid the deprecated class. If None then a generic message will be provided. A deprecation message will be shown only once, the first time the deprecated class is accessed. ```python @DeprecatedClass("After version 1.5.0 use og.NewerClass instead") class OlderClass: STATIC_VALUE = 1 obj = OlderClass() # Gives a deprecation warning value = OlderClass.STATIC_VALUE # This also works for static class members and methods ``` ```
646
omni.graph.tools.DeprecatedDictConstant.md
# DeprecatedDictConstant ## DeprecatedDictConstant ``` class omni.graph.tools.DeprecatedDictConstant(name: str, new_value: dict, message: str, deprecation_level: Optional[DeprecationLevel] = None) ``` **Bases:** `dict` **Description:** Class that lets you show a warning or error when attempting to use a deprecated dict constant value. **Usage:** ```python # Original usage of a dictionary MY_DICT = {"setting": True} print(f"Setting is {MY_DICT['setting']}") # Output: Setting is True # Deprecation declaration MY_DICT = DeprecatedDictConstant("MY_DICT", {}, "Please delete references to it.") print(f"Setting is {MY_DICT['setting']}") ERROR: Dictionary constant 'MY_DICT' can no longer be used. Please delete references to it. KeyError: "setting" ## Methods | Method | Description | | --- | --- | | `__init__(name, new_value, message[, deprecation_level=None])` | Construct a dictionary constant that will print a message if it is used. :param name: Name of the dictionary constant. | ### __init__(name: str, new_value: dict, message: str, deprecation_level: Optional[DeprecationLevel] = None) Construct a dictionary constant that will print a message if it is used. :param name: Name of the dictionary constant. Should match what was formerly exported as part of the API :param new_value: The value to return if the dictionary is requested :param message: Message to emit if the dictionary is used :param deprecation_level: How serious the deprecation message should be. None means use the default
1,510
omni.graph.tools.DeprecatedImport.md
# DeprecatedImport ## DeprecatedImport Decorator to deprecate a specific file or module import. Usually the functionality has been deprecated and moved to a different file. ### Parameters - **deprecation_message** – String with the action the user is to perform to avoid the deprecated import ### Usage ```python '''This is the top line of the imported file''' import omni.graph.tools as ogt ogt.DeprecatedImport("Import 'omni.graph.tools as ogt' and use ogt.new_function() instead") # The rest of the file can be left as-is for best backward compatibility, or import non-deprecated versions # of objects from their new location to avoid duplication. ``` ```
665
omni.graph.tools.DeprecatedStringConstant.md
# DeprecatedStringConstant ## DeprecatedStringConstant ```python class omni.graph.tools.DeprecatedStringConstant(name: str, new_value: str | None = None, message: str, deprecation_level: Optional[DeprecationLevel] = None) ``` Bases: `str` Class that lets you show a warning or error when attempting to use a deprecated string constant value. Usage: ```python # Original usage of a boolean setting MY_SETTING = "/persistent/omnigraph/mySetting" print(f"Value of {MY_SETTING} is {carb.settings.get_settings().get(MY_SETTING)}") ``` Value of /persistent/omnigraph/mySetting is True > # Deprecation declaration > MY_SETTING = DeprecatedStringConstant("MY_SETTING", "UNUSED", "Please delete references to it.") > print(f"Value of {MY_SETTING} is {carb.settings.get_settings().get(MY_SETTING)}") ERROR: String constant 'MY_SETTING' can no longer be used. Please delete references to it. Value of UNUSED is False Note that the deprecation message only appears when the value is cast to a string, which is the majority of interesting cases. Any deprecation which needs to catch other manipulations of the string should use a different approach. ## Methods | Method | Description | | --- | --- | | `__init__(name: str, new_value: str | None, message: str, deprecation_level: Optional[DeprecationLevel] = None)` | Construct a string constant that will print a message if it is used :param name: Name of the string constant. | Construct a string constant that will print a message if it is used :param name: Name of the string constant. Should match what was formerly exported as part of the API :param new_value: The value to return if the string is requested :param message: Message to emit if the string is used :param deprecation_level: How serious the deprecation message should be. None means use the default
1,814
omni.graph.tools.deprecated_constant_object.md
# deprecated_constant_object ## deprecated_constant_object ``` Class that lets you show a warning or error when attempting to use a deprecated constant object. It only works for objects as it relies on overriding the `__getattr__` function, which simple values like integers and floats do not have. ### Parameters - **constant** – The actual value of the constant as it was before deprecation - **deprecation_message** – Additional message to provide the user with information of how to avoid using the constant - **deprecation_level** – Optional ability to hardcode the deprecation level of this particular constant ### Usage: ```python # Original usage of a constant RE_FIND_HOMER = re.compile(".*D'oh") print(RE_FIND_HOMER.match("Don't have a cow man")) # None # Deprecation declaration RE_FIND_HOMER = deprecated_constant(re.compile(".*D'oh"), "Please delete references to it.") ```python print(RE_FIND_HOMER.match("Don't have a cow man")) ``` WARNING: Constant 'RE_FIND_HOMER' is deprecated. Please delete references to it. None
1,040
omni.graph.tools.deprecated_function.md
# deprecated_function ## deprecated_function ``` ```python @deprecated_function("After version 1.5.0 use og.newer_function() instead") def older_function(): pass ``` ```python @property @deprecated_function("use 'your_prop' instead.", is_property=True) def my_prop(self): return self.your_prop @my_prop.setter @deprecated_function("use 'your_prop' instead.", is_property=True) def my_prop(self, value): self.your_prop = value ```
445
omni.graph.tools.DeprecateMessage.md
# DeprecateMessage ## Overview DeprecateMessage is a manager for deprecation messages, designed to efficiently prevent multiple logging of the same deprecation messages. The default settings for output are usually sufficient to help identify where deprecated code is referenced. However, if more detailed information is required, the class variables can be adjusted to reduce filtering. The message should include an action item for the user to upgrade from the deprecated functionality. ### Class Variables - `SILENCE_LOG = False` - When set, the output does not go to the console log; useful to disable for testing. - `SHOW_STACK = True` - Report stack trace in the deprecation message - can be turned off if it is too verbose. - `MAX_STACK_LEVELS = 3` - Maximum number of stack levels to report, after filtering. ### Example Usage ```python DeprecateMessage.deprecated("Install the latest version instead") # Example of tuning the class variables SILENCE_LOG = False # Disable console log for testing SHOW_STACK = True # Include stack trace MAX_STACK_LEVELS = 3 # Limit stack trace levels ``` ### Handling Deprecation Simple deprecation cases can be handled directly using Python features: ```python # Rename constant from A to B A = (DeprecateMessage("A has been renamed to B") and False) or B # Constant A will be removed A = (DeprecateMessage("A will be removed, use B instead") and False) or B ``` ## Methods - **clear_messages()** - Clear the logged messages so that they can be logged again. - **deprecated(message[, deprecation_level])** - Log the deprecation message if it has not yet been logged, otherwise do nothing. - **deprecations_are_errors()** - Returns whether deprecations are treated as errors. <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> deprecations_are_errors () <td> <p> Returns True if deprecations are currently being treated as errors <tr class="row-even"> <td> <p> <a class="reference internal" href="#omni.graph.tools.DeprecateMessage.messages_logged" title="omni.graph.tools.DeprecateMessage.messages_logged"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> messages_logged () <td> <p> Returns the set of messages that have been logged so far <tr class="row-odd"> <td> <p> <a class="reference internal" href="#omni.graph.tools.DeprecateMessage.set_deprecations_are_errors" title="omni.graph.tools.DeprecateMessage.set_deprecations_are_errors"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> set_deprecations_are_errors (make_errors) <td> <p> Enable or disable treating deprecations as errors instead of warnings <p class="rubric"> Attributes <table class="autosummary longtable docutils align-default"> <colgroup> <col style="width: 10%"/> <col style="width: 90%"/> <tbody> <tr class="row-odd"> <td> <p> <a class="reference internal" href="#omni.graph.tools.DeprecateMessage.MAX_STACK_LEVELS" title="omni.graph.tools.DeprecateMessage.MAX_STACK_LEVELS"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> MAX_STACK_LEVELS <td> <p> Maximum number of stack levels to report, after filtering <tr class="row-even"> <td> <p> <a class="reference internal" href="#omni.graph.tools.DeprecateMessage.SHOW_STACK" title="omni.graph.tools.DeprecateMessage.SHOW_STACK"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> SHOW_STACK <td> <p> Report stack trace in the deprecation message - can be turned off if it is too verbose <tr class="row-odd"> <td> <p> <a class="reference internal" href="#omni.graph.tools.DeprecateMessage.SILENCE_LOG" title="omni.graph.tools.DeprecateMessage.SILENCE_LOG"> <code class="xref py py-obj docutils literal notranslate"> <span class="pre"> SILENCE_LOG <td> <p> When set the output does not go to the console log; useful to disable for testing <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.tools.DeprecateMessage.__init__"> <span class="sig-name descname"> <span class="pre"> __init__ <span class="sig-paren"> ( <span class="sig-paren"> ) <a class="headerlink" href="#omni.graph.tools.DeprecateMessage.__init__" title="Permalink to this definition">  <dd> <dl class="py class"> <dt class="sig sig-object py" id="omni.graph.tools.DeprecateMessage.NoLogging"> <em class="property"> <span class="pre"> class <span class="w"> <span class="sig-name descname"> <span class="pre"> NoLogging <span class="sig-paren"> ( <em class="sig-param"> <span class="o"> <span class="pre"> * <span class="n"> <span class="pre"> args , <em class="sig-param"> <span class="o"> <span class="pre"> ** <span class="n"> <span class="pre"> kwargs <span class="sig-paren"> ) <a class="headerlink" href="#omni.graph.tools.DeprecateMessage.NoLogging" title="Permalink to this definition">  <dd> <p> Bases: <code class="xref py py-class docutils literal notranslate"> <span class="pre"> object <p> Context manager class to let you import a bunch of known deprecated functions without logging warnings. Typical use would be in providing backward compatibility in a module where submodules have moved. <blockquote> <div> <dl class="simple"> <dt> with DeprecateMessage.NoLogging(): <dd> <p> import .v1_0.my_old_function as my_old_function <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.tools.DeprecateMessage.clear_messages"> <em class="property"> <span class="pre"> classmethod <span class="w"> <span class="sig-name descname"> <span class="pre"> clear_messages <span class="sig-paren"> ( <span class="sig-paren"> ) <a class="headerlink" href="#omni.graph.tools.DeprecateMessage.clear_messages" title="Permalink to this definition">  <dd> <p> Clear the logged messages so that they can be logged again <dl class="py method"> <dt class="sig sig-object py" id="omni.graph.tools.DeprecateMessage.deprecated"> <em class="property"> <span class="pre"> classmethod <span class="w"> <span class="sig-name descname"> <span class="pre"> deprecated <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> message <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> str , <em class="sig-param"> <span class="n"> <span class="pre"> deprecation_level <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> Optional <span class="p"> <span class="pre"> [ <a class="reference internal" href="omni.graph.tools.DeprecationLevel.html#omni.graph.tools.DeprecationLevel" title="omni.graph.tools._impl.deprecate.DeprecationLevel"> ### DeprecateMessage.deprecated Log the deprecation message if it has not yet been logged, otherwise do nothing #### Parameters - **message** – Message to display; only displays once even if this is called many times - **deprecation_level** – If specified, override the default level coming from deprecations_are_errors() Adds stack trace information if the class member SHOW_STACK is True. Skips the Carbonite logging if the class member SILENCE_LOG is True (mostly useful for testing when a warning is the expected result). ### DeprecateMessage.deprecations_are_errors Returns True if deprecations are currently being treated as errors ### DeprecateMessage.messages_logged Returns the set of messages that have been logged so far ### DeprecateMessage.set_deprecations_are_errors Enable or disable treating deprecations as errors instead of warnings ### DeprecateMessage.MAX_STACK_LEVELS Maximum number of stack levels to report, after filtering ### DeprecateMessage.SHOW_STACK Report stack trace in the deprecation message - can be turned off if it is too verbose ### DeprecateMessage.SILENCE_LOG When set the output does not go to the console log; useful to disable for testing
7,857
omni.graph.tools.DeprecationError.md
# DeprecationError Exception to raise when a hard-deprecated import, class, or function is attempted to be used. Exists to provide a last bit of information to users who have been ignoring previous deprecation errors. ## Methods ### `__init__(*args, **kwargs)`
263
omni.graph.tools.DeprecationLevel.md
# DeprecationLevel ## Overview Enum describing how deprecations should be treated ### Attributes | Attribute | Description | |-----------|-------------| | `WARNING` | Calling deprecated code results in a warning message | | `ERROR` | Calling deprecated code results in an error message | # Calling deprecated code results in a warning message
348
omni.graph.tools.destroy_property.md
# destroy_property ## destroy_property ```python omni.graph.tools.destroy_property(self, property_name: str) ``` Call the destroy method on a property and set it to None - helps with garbage collection In a class’s destroy() or __del__ method you can call this to generically handle member destruction when such things do not happen automatically (e.g. when you cross into the C++-bindings, or the objects have circular references) ```python def destroy(self): destroy_property(self, "_widget") ``` If the property is a list then the list members are individually destroyed. If the property is a dictionary then the values of the dictionary are individually destroyed. NOTE: Only call this if you are the owner of the property, otherwise just set it to None. ### Parameters - **self** – The object owning the property to be destroyed (can be anything with a destroy() method) - **property_name** – Name of the property to be destroyed
945
omni.graph.tools.Functions.md
# omni.graph.tools Functions ## Functions Summary: | Function | Description | |----------|-------------| | DeprecatedClass | Decorator to deprecate a class. | | DeprecatedImport | Decorator to deprecate a specific file or module import. Usually the functionality has been deprecated and | | RenamedClass | Syntactic sugar to provide a class deprecation that is a simple renaming, where all of the functions in | | build_directory_metadata | Find all of the node type metadata that can be found in the given directory. | | deprecated_constant_object | Class that lets you show a warning or error when attempting to use a deprecated constant object. | | deprecated_function | Decorator to deprecate a function. | | destroy_property | Call the destroy method on a property and set it to None - helps with garbage collection | | function_trace | Debugging decorator that adds function call tracing, potentially gated by an environment variable. | | get_node_type_names_from_metadata | Extract the list of fully qualified node type names from the generated metadata | | import_tests_in_directory | Find all of the .ogn-generated tests in a module’s directory and import them into that module. | | shorten_string_lines_to | | | | |----------------|-------------------------------------------------------------------------------------| | shorten_string_lines_to | Convert a single long line into a list of shorter lines | | supported_attribute_type_names | |
1,665
omni.graph.tools.function_trace.md
# function_trace ## function_trace ```python @function_trace() def my_function(value: str) -> str: return value + value ``` Calling my_function("X") with debugging enabled will print this: ``` Calling my_function('X') 'my_function' returned 'XX' ``` The extra parameter lets you selectively disable it based on environment variables: ```python @function_trace("OGN_DEBUG") def my_function(value: str) -> str: return value + value ``` This version only enables debugging if the environment variable "OGN_DEBUG" is set
530
omni.graph.tools.get_node_type_names_from_metadata.md
# get_node_type_names_from_metadata ## get_node_type_names_from_metadata ```python def get_node_type_names_from_metadata(metadata: dict[str, any]) -> list[str]: ``` Extract the list of fully qualified node type names from the generated metadata :param metadata: Dictionary loaded as JSON from the nodes.json file generated earlier **Returns:** List of node type names appearing in the metadata, prepending the extension name if needed to make it unique ```
460
omni.graph.tools.import_tests_in_directory.md
# import_tests_in_directory ## import_tests_in_directory ```python omni.graph.tools.import_tests_in_directory(module_file: str, module_name: str) ``` Find all of the .ogn-generated tests in a module’s directory and import them into that module. This will only be called from the generated test directory __init__.py file, generated below by the import_file_contents() function. ### Parameters - **module_file** – Full path of the __init__.py file for the generated test directory (e.g. its __file__) - **module_name** – Module name at which the generated test directory is imported (e.g. its __name__)
604
omni.graph.tools.IndentedOutput.md
# IndentedOutput ## Class: omni.graph.tools.IndentedOutput ### Properties: - output: File type that receives the output - indent_level: Number of indentation levels for the current output - indent_string: String representing the current indentation level ### Methods - **__init__(output)** - Initialize the indentation level and prepare for output - **close()** - Close the output stream - **exdent([message])** - Decrease the indentation level for emitted code - **indent([message])** - Increase the indentation level for emitted code - **prepend(message)** - Prepend a message to the output <p>Write the message line at the beginning of the output. <p>Output a single message line to the file. <p>Output a string to the output file without indentation or added newline Passing in a list will write each list member on its own line. <p>Initialize the indentation level and prepare for output <p><strong>output <p>Close the output stream <p>Decrease the indentation level for emitted code <p>If a message is specified then emit that message immediately after exdenting, allowing you to easily close sections like: out.exdent(“}”) <p>Increase the indentation level for emitted code <p>If a message is specified then emit that message immediately before indenting, allowing you to easily open sections like: out.indent(“{“) <p>Returns True so that indented sections can be indented in the code: <p>if output.indent(“begin {“): <p>output.exdent(“}) <p>Prepend a message to the output <dl> <dt> <p> Write the message line at the beginning of the output. <p> This rewrites the entire output so it is best to minimize its use, and stick with string implementations. The message is written as-is with no newlines or indenting <dt> <p> Output a single message line to the file. This assumes indentation will be used and a newline will be appended. Passing in a list will write each list member on its own line. <dl> <dt> Parameters <dd> <p> <strong> message – Line of text being emitted <dt> <p> Output a string to the output file without indentation or added newline Passing in a list will write each list member on its own line. <dl> <dt> Parameters <dd> <p> <strong> message – Line of text being emitted
2,500
omni.graph.tools.md
# omni.graph.tools ## Classes Summary: | Class | Description | | --- | --- | | [DeprecateMessage](./omni.graph.tools/omni.graph.tools.DeprecateMessage.html) | Manager for deprecation messages, to make it efficient to prevent multiple logging of the same | | [DeprecatedDictConstant](./omni.graph.tools/omni.graph.tools.DeprecatedDictConstant.html) | Class that lets you show a warning or error when attempting to use a deprecated dict constant value. | | [DeprecatedStringConstant](./omni.graph.tools/omni.graph.tools.DeprecatedStringConstant.html) | Class that lets you show a warning or error when attempting to use a deprecated string constant value. | | [DeprecationError](./omni.graph.tools/omni.graph.tools.DeprecationError.html) | Exception to raise when a hard-deprecated import, class, or function is attempted to be used. | | [DeprecationLevel](./omni.graph.tools/omni.graph.tools.DeprecationLevel.html) | Enum describing how deprecations should be treated | | [IndentedOutput](./omni.graph.tools/omni.graph.tools.IndentedOutput.html) | Helper class that provides output capabilities to messages with preserved indentation levels | ## Functions Summary: | Function | Description | | --- | --- | | [DeprecatedClass](./omni.graph.tools/omni.graph.tools.DeprecatedClass.html) | Decorator to deprecate a class. | | [DeprecatedImport](./omni.graph.tools/omni.graph.tools.DeprecatedImport.html) | Decorator to deprecate a specific file or module import. Usually the functionality has been deprecated and | | [RenamedClass](./omni.graph.tools/omni.graph.tools.RenamedClass.html) | Syntactic sugar to provide a class deprecation that is a simple renaming, where all of the functions in | | [build_directory_metadata](./omni.graph.tools/omni.graph.tools.build_directory_metadata.html) | Find all of the node type metadata that can be found in the given directory. | <p> <span class="doc"> deprecated_constant_object <p> Class that lets you show a warning or error when attempting to use a deprecated constant object. <p> <span class="doc"> deprecated_function <p> Decorator to deprecate a function. <p> <span class="doc"> destroy_property <p> Call the destroy method on a property and set it to None - helps with garbage collection <p> <span class="doc"> function_trace <p> Debugging decorator that adds function call tracing, potentially gated by an environment variable. <p> <span class="doc"> get_node_type_names_from_metadata <p> Extract the list of fully qualified node type names from the generated metadata <p> <span class="doc"> import_tests_in_directory <p> Find all of the .ogn-generated tests in a module’s directory and import them into that module. <p> <span class="doc"> shorten_string_lines_to <p> Convert a single long line into a list of shorter lines <p> <span class="doc"> supported_attribute_type_names
2,927
omni.graph.tools.RenamedClass.md
# RenamedClass ## RenamedClass ``` [¶](#renamedclass) ```markdown Syntactic sugar to provide a class deprecation that is a simple renaming, where all of the functions in the old class are still present in backwards compatible form in the new class. ### Parameters - **old_class_name** – The name of the class that was renamed - **rename_message** – Message to give the user if the old class name is used. A generic message will be provided if this is None. Usage: ```python MyDeprecatedClass = RenamedClass(MyNewClass, "MyDeprecatedClass") obj = MyDeprecatedClass() # Gives a deprecation warning obj = MyNewClass() # Works fine - both calls return the same type of object # This also works for static class members and methods value = MyDeprecatedClass.VALUE # Gives a deprecation warning value = MyDeprecatedClass.class_method() # Gives a deprecation warning value = MyDeprecatedClass.static_method() # Gives a deprecation warning ``` --- title: "文章标题" author: "作者名" date: "2023-04-01" --- # 一级标题 这里是文章的正文内容。 ## 二级标题 这里是二级标题下的内容。 ### 三级标题 这里是三级标题下的内容。 ## 代码块 ```python # 这里是Python代码 print("Hello, World!") ``` ## 引用 > 这是一段引用内容。 ## 列表 - 列表项1 - 列表项2 - 列表项3 ## 表格 | 列1 | 列2 | 列3 | | --- | --- | --- | | 数据1 | 数据2 | 数据3 | | 数据4 | 数据5 | 数据6 | ## 链接 这里是一个链接文本,但链接已被删除。 ## 图片 这里原本有一张图片,但图片已被删除。 ## 脚注 这里是脚注内容。 --- ## 页脚 ---
1,350
omni.graph.tools.shorten_string_lines_to.md
# shorten_string_lines_to ## shorten_string_lines_to Convert a single long line into a list of shorter lines ### Parameters - **full_string** – Single line to be trimmed - **suggested_limit** – Minimum length of line; line will extend to the next space past this limit
271
omni.kit.actions.core.Action.md
# Action ## Action Abstract action base class. ### Methods - **`__init__`** (self, extension_id, action_id, ...) - Create an action. - **`execute`** (self, *args, **kwargs) - Execute the action. - **`invalidate`** (self) - Invalidate this action so that executing it will not do anything. ### Attributes - **`description`** - Get the description of this action. - **`display_name`** - Get the display name of this action. - **`extension_id`** - Get the extension ID of this action. | Property | Description | |----------|-------------| | `extension_id` | Get the id of the source extension which registered this action. | | `icon_url` | Get the URL of the icon used to represent this action. | | `id` | Get the id of this action, unique to the extension that registered it. | | `parameters` | Get the parameters accepted by this action's execute function. | | `requires_parameters` | Query whether this action requires any parameters to be passed when executed? | | `tag` | Get the tag that this action is grouped with. | ```python __init__( self: omni.kit.actions.core._kit_actions_core.Action, extension_id: str, action_id: str, python_object: object, display_name: str = '', description: str = '', icon_url: str = '', tag: str = '' ) ``` ## Create an action Create an action. ### Parameters - **extension_id** – The id of the source extension registering the action. - **action_id** – Id of the action, unique to the extension registering it. - **python_object** – The Python object called when the action is executed. - **display_name** – The name of the action for display purposes. - **description** – A brief description of what the action does. - **icon_url** – The URL of an image which represents the action. - **tag** – Arbitrary tag used to group sets of related actions. ### Returns The action that was created. ## Execute the action Execute the action. ### Parameters - **\*args** – Variable length argument list which will be forwarded to execute. - **\*\*kwargs** – Arbitrary keyword arguments that will be forwarded to execute. ### Returns The result of executing the action, converted to a Python object (could be None). ## Invalidate this action Invalidate this action so that executing it will not do anything. This can be called if it is no longer safe to execute the action, and by default is called when deregistering an action (optional). ## Get the description of this action Get the description of this action. ### Returns The description of this action. ### Return type str ## Get the display name of this action Get the display name of this action. ### Returns The display name of this action. <p> The display name of this action. <dt class="field-even"> Return type <dd class="field-even"> <p> str <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.extension_id"> <em class="property"> <span class="pre"> property <span class="w"> <span class="sig-name descname"> <span class="pre"> extension_id <dd> <p> Get the id of the source extension which registered this action. <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> The id of the source extension which registered this action. <dt class="field-even"> Return type <dd class="field-even"> <p> str <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.icon_url"> <em class="property"> <span class="pre"> property <span class="w"> <span class="sig-name descname"> <span class="pre"> icon_url <dd> <p> Get the URL of the icon used to represent this action. <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> The URL of the icon used to represent this action. <dt class="field-even"> Return type <dd class="field-even"> <p> str <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.id"> <em class="property"> <span class="pre"> property <span class="w"> <span class="sig-name descname"> <span class="pre"> id <dd> <p> Get the id of this action, unique to the extension that registered it. <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> The id of this action, unique to the extension that registered it. <dt class="field-even"> Return type <dd class="field-even"> <p> str <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.parameters"> <em class="property"> <span class="pre"> property <span class="w"> <span class="sig-name descname"> <span class="pre"> parameters <dd> <p> Get the parameters accepted by this action’s execute function. <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> The parameters accepted by this action’s execute function. <dt class="field-even"> Return type <dd class="field-even"> <p> dict <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.requires_parameters"> <em class="property"> <span class="pre"> property <span class="w"> <span class="sig-name descname"> <span class="pre"> requires_parameters <dd> <p> Query whether this action requires any parameters to be passed when executed? <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> True if this action requires any parameters to be passed when executed, false otherwise. <dt class="field-even"> Return type <dd class="field-even"> <p> bool <dl class="py property"> <dt class="sig sig-object py" id="omni.kit.actions.core.Action.tag"> <em class="property"> <span class="pre"> property <span class="w"> <span class="sig-name descname"> <span class="pre"> tag <dd> <p> Get the tag that this action is grouped with. <dl class="field-list simple"> <dt class="field-odd"> Returns <dd class="field-odd"> <p> The tag that this action is grouped with. <dt class="field-even"> Return type <dd class="field-even"> <p> str
6,025
omni.kit.actions.core.Classes.md
# omni.kit.actions.core Classes ## Classes Summary: | Class | Description | |-------|-------------| | [Action](omni.kit.actions.core/omni.kit.actions.core.Action.html) | Abstract action base class. | | [IActionRegistry](omni.kit.actions.core/omni.kit.actions.core.IActionRegistry.html) | Maintains a collection of all registered actions and allows any extension to discover them. |
383
omni.kit.actions.core.execute_action.md
# execute_action ## execute_action ```python omni.kit.actions.core.execute_action(extension_id: str, action_id: str, *args, **kwargs) ``` Find and execute an action. ### Parameters - **extension_id** – The id of the source extension that registered the action. - **action_id** – Id of the action, unique to the extension that registered it. - **\*args** – Variable length argument list which will be forwarded to execute. - **\*\*kwargs** – Arbitrary keyword arguments that will be forwarded to execute. ### Returns The result of executing the action, which is an arbitrary Python object that could be None (will also return None if the action was not found).
663
omni.kit.actions.core.Functions.md
# omni.kit.actions.core Functions ## Functions Summary: | Function | Description | |----------|-------------| | [execute_action](#execute_action) | Find and execute an action. | | [get_action_registry](#get_action_registry) | Get the action registry. | ### execute_action Find and execute an action. ### get_action_registry Get the action registry.
352
omni.kit.actions.core.get_action_registry.md
# get_action_registry ## get_action_registry ```python omni.kit.actions.core.get_action_registry() ``` - **Returns**: ActionRegistry object which implements the IActionRegistry interface. ```
194
omni.kit.actions.core.IActionRegistry.md
# IActionRegistry ## Methods - `__init__(*args, **kwargs)` - `deregister_action(*args, **kwargs)` - `deregister_all_actions_for_extension(self, ...)` - `execute_action(self, extension_id, ...)` - `get_action(self, extension_id, action_id)` - `get_all_actions(self)` | Method | Description | |--------|-------------| | `get_all_actions(self)` | Get all registered actions. | | `get_all_actions_for_extension(self, extension_id)` | Get all actions that were registered by the specified extension. | | `register_action(*args, **kwargs)` | Overloaded function. | | `__init__(*args, **kwargs)` | (No description provided) | | `deregister_action(*args, **kwargs)` | Overloaded function. | | `deregister_all_actions_for_extension(self, extension_id, invalidate=True)` | Deregister all actions that were registered by the specified extension. | ``` ```markdown ### deregister_action Overloaded function. 1. `deregister_action(self: omni.kit.actions.core._kit_actions_core.IActionRegistry, action: omni::kit::actions::core::IAction, invalidate: bool = True) -> None` - Deregister an action. - Args: - action: The action to deregister. - invalidate: Should the action be invalidated so executing does nothing? 2. `deregister_action(self: omni.kit.actions.core._kit_actions_core.IActionRegistry, extension_id: str, action_id: str, invalidate: bool = True) -> omni::kit::actions::core::IAction` - Find and deregister an action. - Args: - extension_id: The id of the source extension that registered the action. - action_id: Id of the action, unique to the extension that registered it. - invalidate: Should the action be invalidated so executing does nothing? - Return: - The action if it exists and was deregistered, an empty object otherwise. ``` ```markdown ### deregister_all_actions_for_extension “Deregister all actions that were registered by the specified extension. Parameters: - self: omni.kit.actions.core._kit_actions_core.IActionRegistry - extension_id: str - invalidate: bool = True Return: None ``` - **extension_id** – The id of the source extension that registered the actions. - **invalidate** – Should the actions be invalidated so executing does nothing? ### execute_action ```python execute_action(self: omni.kit.actions.core._kit_actions_core.IActionRegistry, extension_id: str, action_id: str, *args, **kwargs) -> object ``` Find and execute an action. #### Parameters - **extension_id** – The id of the source extension that registered the action. - **action_id** – Id of the action, unique to the extension that registered it. - **\*args** – Variable length argument list which will be forwarded to execute. - **\*\*kwargs** – Arbitrary keyword arguments that will be forwarded to execute. #### Returns The result of executing the action, which is an arbitrary Python object that could be None (will also return None if the action was not found). ### get_action ```python get_action(self: omni.kit.actions.core._kit_actions_core.IActionRegistry, extension_id: str, action_id: str) -> omni::kit::actions::core::IAction ``` Get an action. #### Parameters - **extension_id** – The id of the source extension that registered the action. - **action_id** – Id of the action, unique to the extension that registered it. #### Returns The action if it exists, an empty object otherwise. ## omni.kit.actions.core.IActionRegistry.get_all_actions ``` ```markdown ( self: omni.kit.actions.core._kit_actions_core.IActionRegistry ) → List[omni::kit::actions::core::IAction] ``` ```markdown Get all registered actions. ``` ```markdown Returns ``` ```markdown All registered actions. ``` ```markdown ## omni.kit.actions.core.IActionRegistry.get_all_actions_for_extension ``` ```markdown ( self: omni.kit.actions.core._kit_actions_core.IActionRegistry, extension_id: str ) → List[omni::kit::actions::core::IAction] ``` ```markdown Get all actions that were registered by the specified extension. ``` ```markdown Parameters ``` ```markdown extension_id – The id of the source extension that registered the actions. ``` ```markdown Returns ``` ```markdown All actions that were registered by the specified extension. ``` ```markdown ## omni.kit.actions.core.IActionRegistry.register_action ``` ```markdown ( *args, **kwargs ) ``` ```markdown Overloaded function. ``` ```markdown 1. register_action(self: omni.kit.actions.core._kit_actions_core.IActionRegistry, action: omni::kit::actions::core::IAction) -> None ``` ```markdown Register an action. ``` ```markdown Args: ``` ```markdown action: The action to register. ``` ```markdown 2. register_action(self: omni.kit.actions.core._kit_actions_core.IActionRegistry, extension_id: str, action_id: str, python_object: object, display_name: str = '', description: str = '', icon_url: str = '', tag: str = '') -> omni::kit::actions::core::IAction ``` ```markdown Create and register an action. ``` ```markdown Args: ``` ```markdown extension_id: The id of the source extension registering the action. action_id: Id of the action, unique to the extension registering it. python_object: The Python object called when the action is executed. display_name: The name of the action for display purposes. description: A brief description of what the action does. icon_url: The URL of an image which represents the action. tag: Arbitrary tag used to group sets of related actions. ``` ```markdown Return: ``` ```markdown The action if it was created and registered, an empty object otherwise. ``` ```markdown
5,518
omni.kit.actions.core.md
# omni.kit.actions.core ## Classes Summary | Class | Description | | --- | --- | | Action | Abstract action base class. | | IActionRegistry | Maintains a collection of all registered actions and allows any extension to discover them. | ## Functions Summary | Function | Description | | --- | --- | | execute_action | Find and execute an action. | | get_action_registry | Get the action registry. |
401
omni.kit.actions.core_api.md
# Omniverse Kit API ## Class Hierarchy - namespace omni - namespace kit - namespace actions - namespace core - class Action - class IAction - class IActionRegistry - class LambdaAction ## File Hierarchy - Directory omni - Directory kit - Directory actions - Directory core - File Action.h - File IAction.h - File IActionRegistry.h - File LambdaAction.h # Namespaces - carb - omni - omni::kit - omni::kit::actions - omni::kit::actions::core # Classes and Structs - omni::kit::actions::core::Action: Abstract action base class providing the core functionaly common to all actions. - omni::kit::actions::core::IAction: Pure virtual action interface. - omni::kit::actions::core::IActionRegistry: Defines the interface for the ActionRegistry. - omni::kit::actions::core::LambdaAction: Concrete action class that can be used to create an action from C++ which calls a supplied lambda/function. # Functions - omni::kit::actions::core::operator== # Typedefs - omni::kit::actions::core::IActionPtr
1,087
omni.kit.actions.window.AbstractActionItem.md
# AbstractActionItem ## AbstractActionItem ``` ```markdown class omni.kit.actions.window.AbstractActionItem(id: str, highlight: Optional[str] = None) ``` ```markdown Bases: `AbstractItem` General action item. ### Parameters - **id** (str) – Item id. - **highlight** (str) – Highlight string. ### Methods - `__init__(self)` ``` ```markdown def __init__(self: omni.ui._ui.AbstractItem) ```
394
omni.kit.actions.window.AbstractActionsModel.md
# AbstractActionsModel ## AbstractActionsModel ```python class omni.kit.actions.window.AbstractActionsModel(column_registry: ColumnRegistry) ``` Bases: `AbstractItemModel` General data model for actions. **Parameters** - **column_registry** (`ColumnRegistry`) – Registry to get column. **Methods** - `__init__(self)` - Constructs AbstractItemModel. - `clean()` - `get_detail_items(item)` - `get_ext_items()` - `get_item_children(self, [parentItem])` Returns the vector of items that are nested to the given parent item. `get_item_value_model`(self[, item, column_id]) Get the value model associated with this item. `get_item_value_model_count`(self[, item]) Returns the number of columns this model item contains. `__init__`(self: omni.ui._ui.AbstractItemModel) -> None Constructs AbstractItemModel. ### Keyword Arguments: - `kwargs dict` - See below `get_item_children`(self: omni.ui._ui.AbstractItemModel, parentItem: omni.ui._ui.AbstractItem = None) -> List[omni.ui._ui.AbstractItem] Returns the vector of items that are nested to the given parent item. ### Arguments: - `id :` - The item to request children from. If it’s null, the children of root will be returned. `get_item_value_model`(self: omni.ui._ui.AbstractItemModel, item: omni.ui._ui.AbstractItem = None, column_id: int = 0) ### omni.kit.actions.window.AbstractActionsModel.get_item_value_model ```python def get_item_value_model(self, item: omni.ui._ui.AbstractItemModel, index: int) -> omni.ui._ui.AbstractValueModel: pass ``` Get the value model associated with this item. #### Arguments: - `item :` - The item to request the value model from. If it’s null, the root value model will be returned. - `index :` - The column number to get the value model. ### omni.kit.actions.window.AbstractActionsModel.get_item_value_model_count ```python def get_item_value_model_count(self, item: omni.ui._ui.AbstractItemModel = None) -> int: pass ``` Returns the number of columns this model item contains. ```
2,004
omni.kit.actions.window.AbstractColumnDelegate.md
# AbstractColumnDelegate ## AbstractColumnDelegate ```python class omni.kit.actions.window.AbstractColumnDelegate(name: str, width: ~omni.ui._ui.Length = 1.000000fr) ``` **Bases:** `object` Represent a column delegate in actions Treeview. **Parameters:** - **name** (str) – Column name. - **width** (ui.Length) – Column width. Default ui.Fraction(1). **Methods:** - `__init__(name[, width])` - `build_header()` - Build header widget in TreeView, default ui.Label(name) - `build_widget(model, item, level, expand)` - Build a custom column widget in TreeView. | Execute | Execute model item. | |---------|----------------------| ### Attributes | width | Column width. | |-------|---------------| ### __init__ ```python __init__(name: str, width: ~omni.ui._ui.Length = 1.000000fr) ``` ### build_header ```python build_header() ``` Build header widget in TreeView, default ui.Label(name) ### build_widget ```python build_widget(model: AbstractItemModel, item: AbstractItem, level: int, expand: bool) -> Widget ``` Build a custom column widget in TreeView. Return created widget. **Parameters:** - **model** (ui.AbstractItemModel) – Actions model. - **item** (ui.AbstractItem) – Item to show. - **level** (int) – Level in treeview. - **expand** (bool) – Item expand or not. ### execute ```python execute(item: AbstractItem) ``` Execute model item. :param item: Item to show. :type item: ui.AbstractItem <section name="omni.kit.actions.window.AbstractColumnDelegate"> <dl class="tableblock frame"> <dt class="tableblock"> <em class="property"> <span class="pre"> width <em class="property"> <span class="pre"> : <span class="pre"> Length <dd> <p> Column width.
1,817
omni.kit.actions.window.ActionExtItem.md
# ActionExtItem ## ActionExtItem ```python class omni.kit.actions.window.ActionExtItem(ext_id: str, highlight: Optional[str] = None) ``` **Bases:** `AbstractActionItem` **Description:** Represent extension actions belongs to. **Parameters:** - **ext_id** (str) – Extension id. - **highlight** (str) – Highlight string. **Methods:** - `__init__(self)` ``` # omni.kit.actions.window.ActionExtItem.__init__( omni.ui._ui.AbstractItem ) -> None
449
omni.kit.actions.window.ActionsDelegate.md
# ActionsDelegate ## ActionsDelegate ```python class omni.kit.actions.window.ActionsDelegate(model: AbstractActionsModel, column_registry: ColumnRegistry) ``` Bases: `AbstractItemDelegate` General action delegate to show action item in treeview. ### Parameters - **column_registry** (`ColumnRegistry`) – Registry to get column delegate. ### Methods - `__init__(self)` - Constructs AbstractItemDelegate. - `build_branch(model, item, [column_id, ...])` - Build branch for column. - `build_header(self)` - Build header for column. | Description | Details | |-------------|---------| | Build header for column. | (column_id) | | Build widget for column. | (model, item[, column_id, ...]) | | on_mouse_double_click | (button, item, ...) | | on_mouse_pressed | (button, item, column_delegate) | ### Attributes | Attribute | Description | |-----------|-------------| | column_widths | Column widths for treeview. | ### omni.kit.actions.window.ActionsDelegate.__init__ **Method:** `__init__(self: omni.ui._ui.AbstractItemDelegate) -> None` **Description:** Constructs AbstractItemDelegate. **Keyword Arguments:** - `kwargs: dict` - See below ### omni.kit.actions.window.ActionsDelegate.build_branch **Method:** `build_branch(model: AbstractItemModel, item: AbstractItem, column_id: int = 0, level: int = 0, expanded: bool = False)` **Description:** Build branch for column. Refer to ui.AbstractItemDelegate.build_branch for detail. ### omni.kit.actions.window.ActionsDelegate.build_header **Method:** `build_header(column_id)` **Description:** Build header for column. ### build_header Build header for column. Refer to ui.AbstractItemDelegate.build_header for detail. ### build_widget ```python build_widget(model: AbstractItemModel, item: AbstractItem, column_id: int = 0, level: int = 0, expanded: bool = False) ``` Build widget for column. Refer to ui.AbstractItemDelegate.build_widget for detail. ### column_widths ```python property column_widths: List[Length] ``` Column widths for treeview. ```
2,015
omni.kit.actions.window.ActionsExtension.md
# ActionsExtension ## Methods - `on_shutdown()` - `on_startup()` - `show_window(visible)` ## Attributes - `MENU_GROUP` - `WINDOW_NAME` ### `__init__(self: omni.ext._extensions.IExt) -> None` 这是一个包含 链接 的段落。 ![描述图片的文本](image.jpg) ``` 根据您的要求,我们需要删除URL链接和图片,并且保留链接对应的文本信息。因此,最终的Markdown格式数据应该是: ```markdown 这是一个包含 链接 的段落。 ![描述图片的文本]()
337
omni.kit.actions.window.ActionsPicker.md
# ActionsPicker ## Class Definition ```python class omni.kit.actions.window.ActionsPicker(width=0, height=600, on_selected_fn: Optional[Callable[[Action], None]] = None, expand_all: bool = True, focus_search: bool = True) ``` ### Parameters - **width**: Initial width of the picker window. Default is `0`. - **height**: Initial height of the picker window. Default is `600`. - **on_selected_fn**: A callback function to be executed when an action is selected. Default is `None`. - **expand_all**: Whether to expand all action groups initially. Default is `True`. - **focus_search**: Whether to focus the search bar immediately. Default is `True`. # Bases: ```python ActionsWindow ``` # Methods | Method Name | Description | |-------------|-------------| | `__init__(self, title, dockPreference, **kwargs)` | Construct the window, add it to the underlying windowing system, and makes it appear. | # Attributes # Detailed Method Description ## `__init__(self, title, dockPreference, **kwargs)` Construct the window, add it to the underlying windowing system, and makes it appear. ### Arguments: - `title :` The window title. It’s also used as an internal window ID. - `dockPreference :` In the old Kit determines where the window should be docked. In Kit Next it’s unused. - `kwargs : dict` See below ### Keyword Arguments: - `flags :` This property set the Flags for the Window. - `visible :` This property holds whether the window is visible. - `title :` This property holds the window’s title. - `padding_x :` This property set the padding to the frame on the X axis. - `padding_y :` This property set the padding to the frame on the Y axis. - `width :` This property holds the window Width. - `height :` This property holds the window Height. - `position_x :` This property set/get the position of the window in the X Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position. - `position_y :` This property set/get the position of the window in the Y Axis. The default is kWindowFloatInvalid because we send the window position to the underlying system only if the position is explicitly set by the user. Otherwise the underlying system decides the position. - `auto_resize :` setup the window to resize automatically based on its content - `noTabBar :` setup the visibility of the TabBar Handle, this is the small triangle at the corner of the view If it is not shown then it is not possible to undock that window and it need to be closed/moved programatically - `tabBarTooltip :` This property sets the tooltip when hovering over window’s tabbar. - `raster_policy :` Determine how the content of the window should be rastered. - `width_changed_fn :` This property holds the window Width. --- `height_changed_fn` This property holds the window Height. --- `visibility_changed_fn` This property holds whether the window is visible.
2,999
omni.kit.actions.window.ActionsView.md
# ActionsView ## Methods - `__init__(*args, **kwargs)` - Overloaded function. ## Attributes ``` ```markdown Create TreeView with default model. 2. __init__(self: omni.ui._ui.TreeView, arg0: omni.ui._ui.AbstractItemModel, **kwargs) -> None Create TreeView with the given model. ### Arguments: > `model :` The given model. > `kwargs dict` See below ### Keyword Arguments: > `delegate` The Item delegate that generates a widget per item. > `header_visible` This property holds if the header is shown or not. > `selection` Set current selection. > `expand_on_branch_click` This flag allows to prevent expanding when the user clicks the plus icon. It’s used in the case the user wants to control how the items expanded or collapsed. > `keep_alive` When true, the tree nodes are never destroyed even if they are disappeared from the model. It’s useul for the temporary filtering if it’s necessary to display thousands of nodes. > `keep_expanded` Expand all the nodes and keep them expanded regardless their state. > `drop_between_items` When true, the tree nodes can be dropped between items. > `column_widths` Widths of the columns. If not set, the width is Fraction(1). > `min_column_widths` Minimum widths of the columns. If not set, the width is Pixel(0). > `columns_resizable` When true, the columns can be resized with the mouse. > `selection_changed_fn` Set the callback that is called when the selection is changed. > `root_expanded` The expanded state of the root item. Changing this flag doesn’t make the children repopulated. > `width ui.Length` This property holds the width of the widget relative to its parent. Do not use this function to find the width of a screen. > `height ui.Length` This property holds the height of the widget relative to its parent. Do not use this function to find the height of a screen. > `name str` The name of the widget that user can set. > `style_type_name_override str` By default, we use typeName to look up the style. But sometimes it’s necessary to use a custom name. For example, when a widget is a part of another widget. (Label is a part of Button) This property can override the name to use in style. > `identifier str` An optional identifier of the widget we can use to refer to it in queries. > `visible bool` This property holds whether the widget is visible. > `visibleMin float` If the current zoom factor and DPI is less than this value, the widget is not visible. > `visibleMax float` If the current zoom factor and DPI is bigger than this value, the widget is not visible. > `tooltip str` Set a basic tooltip for the widget, this will simply be a Label, it will follow the Tooltip style > `tooltip_fn Callable` Set dynamic tooltip that will be created dynamiclly the first time it is needed. the function is called inside a ui.Frame scope that the widget will be parented correctly. > `tooltip_offset_x float` Set the X tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. > `tooltip_offset_y float` Set the Y tooltip offset in points. In a normal state, the tooltip position is linked to the mouse position. If the tooltip offset is non zero, the top left corner of the tooltip is linked to the top left corner of the widget, and this property defines the relative position the tooltip should be shown. <dl> <dt> `enabled <span class="classifier"> bool` <dd> <p> This property holds whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. And widgets display themselves differently when they are disabled. <dt> `selected <span class="classifier"> bool` <dd> <p> This property holds a flag that specifies the widget has to use eSelected state of the style. <dt> `checked <span class="classifier"> bool` <dd> <p> This property holds a flag that specifies the widget has to use eChecked state of the style. It’s on the Widget level because the button can have sub-widgets that are also should be checked. <dt> `dragging <span class="classifier"> bool` <dd> <p> This property holds if the widget is being dragged. <dt> `opaque_for_mouse_events <span class="classifier"> bool` <dd> <p> If the widgets has callback functions it will by default not capture the events if it is the top most widget and setup this option to true, so they don’t get routed to the child widgets either <dt> `skip_draw_when_clipped <span class="classifier"> bool` <dd> <p> The flag that specifies if it’s necessary to bypass the whole draw cycle if the bounding box is clipped with a scrolling frame. It’s needed to avoid the limitation of 65535 primitives in a single draw list. <dt> `mouse_moved_fn <span class="classifier"> Callable` <dd> <p> Sets the function that will be called when the user moves the mouse inside the widget. Mouse move events only occur if a mouse button is pressed while the mouse is being moved. void onMouseMoved(float x, float y, int32_t modifier) <dt> `mouse_pressed_fn <span class="classifier"> Callable` <dd> <p> Sets the function that will be called when the user presses the mouse button inside the widget. The function should be like this: void onMousePressed(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) Where ‘button’ is the number of the mouse button pressed. ‘modifier’ is the flag for the keyboard modifier key. <dt> `mouse_released_fn <span class="classifier"> Callable` <dd> <p> Sets the function that will be called when the user releases the mouse button if this button was pressed inside the widget. void onMouseReleased(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) <dt> `mouse_double_clicked_fn <span class="classifier"> Callable` <dd> <p> Sets the function that will be called when the user presses the mouse button twice inside the widget. The function specification is the same as in setMousePressedFn. void onMouseDoubleClicked(float x, float y, int32_t button, carb::input::KeyboardModifierFlags modifier) <dt> `mouse_wheel_fn <span class="classifier"> Callable` <dd> <p> Sets the function that will be called when the user uses mouse wheel on the focused window. The function specification is the same as in setMousePressedFn. void onMouseWheel(float x, float y, carb::input::KeyboardModifierFlags modifier) <dt> `mouse_hovered_fn <span class="classifier"> Callable` <dd> <p> Sets the function that will be called when the user use mouse enter/leave on the focused window. function specification is the same as in setMouseHovedFn. void onMouseHovered(bool hovered) <dt> `drag_fn <span class="classifier"> Callable` <dd> <p> Specify that this Widget is draggable, and set the callback that is attached to the drag operation. <dt> `accept_drop_fn <span class="classifier"> Callable` <dd> <p> Specify that this Widget can accept specific drops and set the callback that is called to check if the drop can be accepted. <dt> `drop_fn <span class="classifier"> Callable` <dd> <p> Specify that this Widget accepts drops and set the callback to the drop operation. <dt> `computed_content_size_changed_fn <span class="classifier"> Callable` <dd> <p> Called when the size of the widget is changed.
8,028
omni.kit.actions.window.Classes.md
# omni.kit.actions.window Classes ## Classes Summary: | Class Name | Description | |------------|-------------| | AbstractActionItem | General action item. | | AbstractActionsModel | General data model for actions. | | AbstractColumnDelegate | Represent a column delegate in actions Treeview. | | ActionExtItem | Represent extension actions belongs to. | | ActionsDelegate | General action delegate to show action item in treeview. | | ActionsExtension | Simple helper class for adding/removing “Window” menu to your extension. ui.Window creation/show/hide is still down to user to provide functionally. | | ActionsPicker | Window to show registered actions. | | ActionsView | TreeView is a widget that presents a hierarchical view of information. Each item can have a number of subitems. An indentation often visualizes this in a list. An item can be expanded to reveal subitems, if any exist, and collapsed to hide subitems. | | ColumnRegistry | Registry for action columns. | | StringColumnDelegate | A simple delegate to display a string in column. | 这是一个包含链接和的段落。
1,070
omni.kit.actions.window.ColumnRegistry.md
# ColumnRegistry ## Methods - `__init__()` - `get_delegate(column_id)` - Retrieve a delegate for a column. - `register_delegate(delegate[, column_id, ...])` - Register a delegate for a column. - `unregister_delegate(column_id)` - Unregister a delegate for a column. ## Attributes - `max_column_id` - Max column id registered. ### omni.kit.actions.window.ColumnRegistry Methods #### `__init__()` #### `get_delegate(column_id: int) -> Optional[AbstractColumnDelegate]` Retrieve a delegate for a column. **Parameters:** - `column_id` (int) – Column id. #### `register_delegate(delegate: AbstractColumnDelegate, column_id: int = -1, overwrite_if_exists: bool = True) -> bool` Register a delegate for a column. **Parameters:** - `delegate` (AbstractColumnDelegate) – Delegate to show a column. **Kwargs:** - `column_id` (int): Column id. Default -1 means auto generation. - `overwrite_if_exists` (bool): Overwrite existing delegate if True. Otherwise False. #### `unregister_delegate(column_id: int) -> bool` Unregister a delegate for a column. **Parameters:** - `column_id` (int) – Column id to unregister. #### `property max_column_id` <section> <dl> <dt> <em class="property"> <span class="pre">: int <dd> <p>Max column id registered.
1,304
omni.kit.actions.window.StringColumnDelegate.md
# StringColumnDelegate ## Class: omni.kit.actions.window.StringColumnDelegate ### Constructor ```python __init__(name: str, get_value_fn: Optional[Callable[[AbstractActionItem], str]] = None, width: Length = 1.000000fr) ``` ### Description Bases: `AbstractColumnDelegate` A simple delegate to display a string in column. #### Kwargs: - `get_value_fn` (Callable[[ui.AbstractItem], str]): Callback function to get item display string. Default using item.id - `width` (ui.Length): Column width. Default ui.Fraction(1). ### Methods - `__init__(name[, get_value_fn, width])` - `build_widget(model, item, level, expand)` - Build a custom column widget in TreeView. - `get_value(item)` ### Attributes - None listed. __init__ ( name: str, get_value_fn: ~typing.Optional[~typing.Callable[[~omni.kit.actions.window.model.actions_item.AbstractActionItem], str]] = None, width: ~omni.ui._ui.Length = 1.000000fr ) build_widget ( model: AbstractActionsModel, item: AbstractActionItem, level: int, expand: bool ) Build a custom column widget in TreeView. Return created widget. Parameters: - model (ui.AbstractItemModel) – Actions model. - item (ui.AbstractItem) – Item to show. - level (int) – Level in treeview. - expand (bool) – Item expand or not.
1,262
omni.kit.app.acquire_app_interface.md
# acquire_app_interface ## acquire_app_interface ```python omni.kit.app.acquire_app_interface(plugin_name: str = None, library_path: str = None) -> omni.kit.app._app.IApp ``` - **plugin_name**: str, optional - **library_path**: str, optional - **Returns**: [omni.kit.app._app.IApp](omni.kit.app.IApp.html#omni.kit.app.IApp) ``` ---
334
omni.kit.app.Classes.md
# omni.kit.app Classes ## Classes Summary: | Class | Description | |-------|-------------| | [IApp](omni.kit.app/omni.kit.app.IApp.html) | - | | [IAppScripting](omni.kit.app/omni.kit.app.IAppScripting.html) | - | | [SettingChangeSubscription](omni.kit.app/omni.kit.app.SettingChangeSubscription.html) | Setting change subscription wrapper to make it scoped (auto unsubscribe on del) |
386
omni.kit.app.Functions.md
# omni.kit.app Functions ## omni.kit.app Functions ### Functions Summary: | Function | Description | |----------|-------------| | deprecated | Decorator which can be used to mark functions as deprecated. It will result in warn log when the function is used. | | get_app | Returns cached :class:`omni.kit.app.IApp` interface. (shorthand) | | log_deprecation | Log deprecation message. | | send_telemetry_event | Send generic telemetry event. | | acquire_app_interface | acquire_app_interface(plugin_name: str = None, library_path: str = None) -> omni.kit.app._app.IApp | | crash | crash() -> None |
600
omni.kit.app.IApp.md
# IApp ## IApp ```python class omni.kit.app.IApp ``` ### Methods | Method | Description | |--------|-------------| | `__init__(*args, **kwargs)` | | | `delay_app_ready(self, requester_name)` | | | `get_app_environment(self)` | Name of the environment we are running in. | | `get_app_filename(self)` | App filename. | | `get_app_name(self)` | App name. | | `get_app_version(self)` | App version. | | `get_app_version_short(self)` | Short app version, currently major.minor, e.g. | ``` - `get_build_version(self)` - `get_extension_manager(self)` - `get_kernel_version(self)` - `get_kit_version(self)` - `get_kit_version_hash(self)` - `get_kit_version_short(self)` - `get_log_event_stream(self)` - `get_message_bus_event_stream(self, runloop_name)` - `get_platform_info(self)` - `get_post_update_event_stream(self, runloop_name)` - `get_pre_update_event_stream(self, runloop_name)` - `get_python_scripting(self)` - `get_shutdown_event_stream(self)` - `get_startup_event_stream(self)` - `get_time_since_start_ms(self)` - `get_time_since_start_s(self)` - `get_update_event_stream(self, runloop_name)` - `get_update_number(self)` - `is_app_external(self)` - Is external (public) configuration - `is_app_ready(self)` - `is_debug_build(self)` - `is_running(self)` - `next_update_async()` - Wait for next update of Omniverse Kit. - `post_quit(self[, return_code])` - `post_uncancellable_quit(self[, return_code])` - `post_update_async()` - `pre_update_async()` - Wait for next update of Omniverse Kit. - `print_and_log(self, message)` - `replay_log_messages(self, arg0)` - Replays recorded log messages for the specified target. - `restart(self[, args, overwrite_args, ...])` - `run(self, app_name, app_path[, argv])` - `shutdown(self)` - `startup(self, app_name, app_path[, argv])` | Method Name | Description | |-------------|-------------| | `toggle_log_message_recording(self, arg0)` | Toggles log message recording. | | `try_cancel_shutdown(self[, reason])` | | | `update(self)` | | ### __init__ ```python __init__(self, *args, **kwargs) ``` ### delay_app_ready ```python delay_app_ready(self: omni.kit.app._app.IApp, requester_name: str) -> None ``` ### get_app_environment ```python get_app_environment(self: omni.kit.app._app.IApp) -> str ``` Name of the environment we are running in. (/app/environment/name setting, e.g.: teamcity, launcher, etm, default) ### get_app_filename ```python get_app_filename(self: omni.kit.app._app.IApp) -> str ``` App filename. Name of a kit file ### get_app_name ```python get_app_name(self: omni.kit.app._app.IApp) -> str ``` ### App name It is app/name setting if defined, otherwise same as `filename` ### get_app_version ```python def get_app_version(self: omni.kit.app._app.IApp) -> str: ``` App version. Version in kit file or kit version ### get_app_version_short ```python def get_app_version_short(self: omni.kit.app._app.IApp) -> str: ``` Short app version, currently major.minor, e.g. `2021.3` ### get_build_version ```python def get_build_version(self: omni.kit.app._app.IApp) -> str: ``` ### get_extension_manager ```python def get_extension_manager(self: omni.kit.app._app.IApp) -> omni.ext._extensions.ExtensionManager: ``` ### get_kernel_version ```python def get_kernel_version(self: omni.kit.app._app.IApp) -> str: ``` Full kit kernel version, e.g. `103.5+release.7032.aac30830.tc.windows-x86_64.release` ### get_kit_version ```python def get_kit_version(self: omni.kit.app._app.IApp) -> str: ``` <dl class="py method"> <dt class="sig sig-object py" id="omni.kit.app.IApp.get_kit_version"> <span class="sig-name descname"> <span class="pre"> get_kit_version <a class="headerlink" href="#omni.kit.app.IApp.get_kit_version" title="Permalink to this definition">  <dd> <p> Full kit version, e.g. `103.5+release.7032.aac30830.tc.windows-x86_64.release` <dl class="py method"> <dt class="sig sig-object py" id="omni.kit.app.IApp.get_kit_version_hash"> <span class="sig-name descname"> <span class="pre"> get_kit_version_hash <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <a class="reference internal" href="#omni.kit.app.IApp" title="omni.kit.app._app.IApp"> <span class="pre"> omni.kit.app._app.IApp <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> str <a class="headerlink" href="#omni.kit.app.IApp.get_kit_version_hash" title="Permalink to this definition">  <dd> <p> Git hash of kit build, 8 letters, e.g. `aac30830` <dl class="py method"> <dt class="sig sig-object py" id="omni.kit.app.IApp.get_kit_version_short"> <span class="sig-name descname"> <span class="pre"> get_kit_version_short <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <a class="reference internal" href="#omni.kit.app.IApp" title="omni.kit.app._app.IApp"> <span class="pre"> omni.kit.app._app.IApp <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> str <a class="headerlink" href="#omni.kit.app.IApp.get_kit_version_short" title="Permalink to this definition">  <dd> <p> Short kit version, currently major.minor. e.g. `103.5` <dl class="py method"> <dt class="sig sig-object py" id="omni.kit.app.IApp.get_log_event_stream"> <span class="sig-name descname"> <span class="pre"> get_log_event_stream <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <a class="reference internal" href="#omni.kit.app.IApp" title="omni.kit.app._app.IApp"> <span class="pre"> omni.kit.app._app.IApp <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> carb::events::IEventStream <a class="headerlink" href="#omni.kit.app.IApp.get_log_event_stream" title="Permalink to this definition">  <dd> <p> Log event stream. <dl class="py method"> <dt class="sig sig-object py" id="omni.kit.app.IApp.get_message_bus_event_stream"> <span class="sig-name descname"> <span class="pre"> get_message_bus_event_stream <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <a class="reference internal" href="#omni.kit.app.IApp" title="omni.kit.app._app.IApp"> <span class="pre"> omni.kit.app._app.IApp , <em class="sig-param"> <span class="n"> <span class="pre"> runloop_name <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <span class="pre"> str <span class="w"> <span class="o"> <span class="pre"> = <span class="w"> <span class="default_value"> <span class="pre"> 'main' <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> carb::events::IEventStream <a class="headerlink" href="#omni.kit.app.IApp.get_message_bus_event_stream" title="Permalink to this definition">  <dd> <dl class="py method"> <dt class="sig sig-object py" id="omni.kit.app.IApp.get_platform_info"> <span class="sig-name descname"> <span class="pre"> get_platform_info <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <a class="reference internal" href="#omni.kit.app.IApp" title="omni.kit.app._app.IApp"> <span class="pre"> omni.kit.app._app.IApp <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> dict <a class="headerlink" href="#omni.kit.app.IApp.get_platform_info" title="Permalink to this definition">  <dd> <dl class="py method"> <dt class="sig sig-object py" id="omni.kit.app.IApp.get_post_update_event_stream"> <span class="sig-name descname"> <span class="pre"> get_post_update_event_stream <span class="sig-paren"> ( <em class="sig-param"> <span class="n"> <span class="pre"> self <span class="p"> <span class="pre"> : <span class="w"> <span class="n"> <a class="reference internal" href="#omni.kit.app.IApp" title="omni.kit.app._app.IApp"> <span class="pre"> omni.kit.app._app.IApp <span class="sig-paren"> ) <span class="sig-return"> <span class="sig-return-icon"> → <span class="sig-return-typehint"> <span class="pre"> carb::events::IEventStream <a class="headerlink" href="#omni.kit.app.IApp.get_post_update_event_stream" title="Permalink to this definition">  <dd> ### omni.kit.app.IApp.get_post_update_event_stream ```python def get_post_update_event_stream(self: omni.kit.app._app.IApp, runloop_name: str = 'main') -> carb.events.IEventStream: pass ``` ### omni.kit.app.IApp.get_pre_update_event_stream ```python def get_pre_update_event_stream(self: omni.kit.app._app.IApp, runloop_name: str = 'main') -> carb.events.IEventStream: pass ``` ### omni.kit.app.IApp.get_python_scripting ```python def get_python_scripting(self: omni.kit.app._app.IApp) -> omni.kit.IAppScripting: pass ``` ### omni.kit.app.IApp.get_shutdown_event_stream ```python def get_shutdown_event_stream(self: omni.kit.app._app.IApp) -> carb.events.IEventStream: pass ``` ### omni.kit.app.IApp.get_startup_event_stream ```python def get_startup_event_stream(self: omni.kit.app._app.IApp) -> carb.events.IEventStream: pass ``` ### omni.kit.app.IApp.get_time_since_start_ms ```python def get_time_since_start_ms(self: omni.kit.app._app.IApp) -> int: pass ``` ## Methods ### get_time_since_start_ms ```python def get_time_since_start_ms(self: omni.kit.app._app.IApp) -> float: pass ``` ### get_time_since_start_s ```python def get_time_since_start_s(self: omni.kit.app._app.IApp) -> float: pass ``` ### get_update_event_stream ```python def get_update_event_stream(self: omni.kit.app._app.IApp, runloop_name: str = 'main') -> carb::events::IEventStream: pass ``` ### get_update_number ```python def get_update_number(self: omni.kit.app._app.IApp) -> int: pass ``` ### is_app_external ```python def is_app_external(self: omni.kit.app._app.IApp) -> bool: pass ``` Is external (public) configuration ### is_app_ready ```python def is_app_ready(self: omni.kit.app._app.IApp) -> bool: pass ``` ### is_debug_build ```python def is_debug_build(self: omni.kit.app._app.IApp) -> bool: pass ``` ### is_debug_build - **Parameters:** - `self: omni.kit.app._app.IApp` - **Returns:** `bool` ### is_running - **Parameters:** - `self: omni.kit.app._app.IApp` - **Returns:** `bool` ### next_update_async - **Parameters:** None - **Returns:** `float` - **Description:** Wait for next update of Omniverse Kit. Return delta time in seconds ### post_quit - **Parameters:** - `self: omni.kit.app._app.IApp` - `return_code: int = 0` - **Returns:** `None` ### post_uncancellable_quit - **Parameters:** - `self: omni.kit.app._app.IApp` - `return_code: int = 0` - **Returns:** `None` ### pre_update_async - **Parameters:** None - **Returns:** `float` ### omni.kit.app.IApp.pre_update_async Wait for next update of Omniverse Kit. Return delta time in seconds ### omni.kit.app.IApp.print_and_log ```python print_and_log(self: omni.kit.app._app.IApp, message: str) -> None ``` ### omni.kit.app.IApp.replay_log_messages Replays recorded log messages for the specified target. ```python replay_log_messages(self: omni.kit.app._app.IApp, arg0: carb::logging::Logger) -> None ``` ### omni.kit.app.IApp.restart ```python restart(self: omni.kit.app._app.IApp, args: List[str] = [], overwrite_args: bool = False, uncancellable: bool = False) -> None ``` ### omni.kit.app.IApp.run ```python run(self: omni.kit.app._app.IApp, app_name: str) -> None ``` ### omni.kit.app.IApp.run - **Parameters**: - `str` - `app_path: str` - `argv: List[str] = []` - **Returns**: `int` ### omni.kit.app.IApp.shutdown - **Parameters**: - `self: omni.kit.app._app.IApp` - **Returns**: `int` ### omni.kit.app.IApp.startup - **Parameters**: - `self: omni.kit.app._app.IApp` - `app_name: str` - `app_path: str` - `argv: List[str] = []` - **Returns**: `None` ### omni.kit.app.IApp.toggle_log_message_recording - **Parameters**: - `self: omni.kit.app._app.IApp` - `arg0: bool` - **Returns**: `None` - **Description**: Toggles log message recording. ### try_cancel_shutdown ```python try_cancel_shutdown(self: omni.kit.app._app.IApp, reason: str = '') -> bool ``` ### update ```python update(self: omni.kit.app._app.IApp) -> None ```
14,807
omni.kit.app.IAppScripting.md
# IAppScripting ## Methods - `__init__(*args, **kwargs)` - `add_search_script_folder(self, path)` - `execute_file(self, path, args)` - `execute_string(self, str[, source_file, ...])` - `get_event_stream(self)` - `remove_search_script_folder(self, path)` ### omni.kit.app.IAppScripting.__init__ - **Method**: `__init__` - **Parameters**: - `self` - `*args` - `**kwargs` ### omni.kit.app.IAppScripting.add_search_script_folder - **Method**: `add_search_script_folder` - **Parameters**: - `self` - `path: str` - **Returns**: `bool` ### omni.kit.app.IAppScripting.execute_file - **Method**: `execute_file` - **Parameters**: - `self` - `path: str` - `args: List[str]` - **Returns**: `bool` ### omni.kit.app.IAppScripting.execute_string - **Method**: `execute_string` - **Parameters**: - `self` - `str: str` - `source_file: str = ''` - `execute_as_file: bool = ''` - **Returns**: `bool` ### omni.kit.app.IAppScripting.get_event_stream - **Method**: `get_event_stream` - **Parameters**: - `self` - **Returns**: `bool` ### get_event_stream ```python def get_event_stream(self: omni.kit.app._app.IAppScripting) -> carb::events::IEventStream: pass ``` ### remove_search_script_folder ```python def remove_search_script_folder(self: omni.kit.app._app.IAppScripting, path: str) -> bool: pass ``` ```
1,328
omni.kit.app.md
# omni.kit.app ## Classes Summary - **IApp** - **IAppScripting** - **SettingChangeSubscription** - Setting change subscription wrapper to make it scoped (auto unsubscribe on del) ## Functions Summary - **deprecated** - Decorator which can be used to mark functions as deprecated. It will result in warn log when the function is used. - **get_app** - Returns cached :class:`omni.kit.app.IApp` interface. (shorthand) - **log_deprecation** - Log deprecation message. - **send_telemetry_event** - Send generic telemetry event. - **acquire_app_interface** - acquire_app_interface(plugin_name: str = None, library_path: str = None) -> omni.kit.app._app.IApp - **crash** - crash() -> None
682
omni.kit.app.send_telemetry_event.md
# send_telemetry_event ## send_telemetry_event ``` ```markdown ### send_telemetry_event ``` ```markdown omni.kit.app.send_telemetry_event(event_type: str, duration: float = 0, data1: str = '', data2: str = '', value1: float = 0.0, value2: float = 0.0) ``` ```markdown Send generic telemetry event. It is a helper, so that just one liner: `omni.kit.app.send_telemetry_event` can be used anywhere instead of checking for telemetry being enabled at each call site. If telemetry is not enabled this function does nothing. - **Parameters** - **event_type** (`str`) – A string describing the event that occurred. There is no restriction on the content or formatting of this value. This should neither be `nullptr` nor an empty string. - **duration** (`float`) – A generic duration value that can be optionally included with the event. - **data1** (`str`) – A string data value to be sent with the event. The interpretation of this string depends on event_type. - **data2** (`str`) – A string data value to be sent with the event. The interpretation of this string depends on event_type. - **value1** (`float`) – A float data value to be sent with the event. The interpretation of this string depends on event_type. - **value2** (`float`) – A float data value to be sent with the event. The interpretation of this string depends on event_type.
1,355
omni.kit.app.SettingChangeSubscription.md
# SettingChangeSubscription ## SettingChangeSubscription ``` class omni.kit.app.SettingChangeSubscription (path : str, on_change : Callable) ``` Bases: `object` Setting change subscription wrapper to make it scoped (auto unsubscribe on del) ### Methods | Method | Description | | --- | --- | | `__init__(path: str, on_change: Callable)` | | ``` def __init__(path: str, on_change: Callable) ``` ```
405
omni.kit.collaboration.channel_manager.Channel.add_subscriber_omni.kit.collaboration.channel_manager.Channel.md
# Channel ## Channel Channel represents the instance of an Nucleus Channel. ### Methods - `__init__(handler, channel_manager)` - Internal constructor. - `add_subscriber(on_message)` - Add subscriber. - `send_message_async(content)` - Async function. - `stop()` - (No description provided) ### Attributes (No attributes provided) | logged_user_id | The user id that logs in this channel. | |----------------|----------------------------------------| | logged_user_name | The user name that logs in this channel. | | peer_users | All the peer clients that joined to this channel. | | stopped | Whether channel is stopped or not. | | url | | ### __init__(handler: <module 'weakref' from '/root/.cache/packman/python/3.10.5-1-linux-x86_64/lib/python3.10/weakref.py'>, channel_manager: <module 'weakref' from '/root/.cache/packman/python/3.10.5-1-linux-x86_64/lib/python3.10/weakref.py'>) → None Internal constructor. ### add_subscriber(on_message: Callable[[Message], None]) → ChannelSubscriber Add subscriber. **Parameters:** - **on_message** (Callable[[Message], None]) – The message handler. **Returns:** Instance of ChannelSubscriber. The channel will be stopped if instance is release. So it needs to hold the instance before it’s stopped. You can manually call `stop` to stop this channel, or set the returned instance to None. ### send_message_async **Async function. Send message to all peer clients.** **Parameters:** - **content** (dict) – The message composed in dictionary. **Returns:** - omni.client.Request. ### logged_user_id **The user id that logs in this channel.** ### logged_user_name **The user name that logs in this channel.** ### peer_users **All the peer clients that joined to this channel.** ### stopped **Whether channel is stopped or not.**
1,789
omni.kit.collaboration.channel_manager.Channel.md
# Channel ## Channel Channel represents the instance of an Nucleus Channel. ### Methods - `__init__(handler, channel_manager)` - Internal constructor. - `add_subscriber(on_message)` - Add subscriber. - `send_message_async(content)` - Async function. - `stop()` - ### Attributes | logged_user_id | The user id that logs in this channel. | |----------------|----------------------------------------| | logged_user_name | The user name that logs in this channel. | | peer_users | All the peer clients that joined to this channel. | | stopped | Whether channel is stopped or not. | | url | | ### __init__ Internal constructor. ### add_subscriber Add subscriber. **Parameters** - **on_message** (Callable[[Message], None]) – The message handler. **Returns** - Instance of ChannelSubscriber. The channel will be stopped if instance is release. So it needs to hold the instance before it’s stopped. You can manually call `stop` to stop this channel, or set the returned instance to None. ### send_message_async **Async function. Send message to all peer clients.** **Parameters:** - **content** (dict) – The message composed in dictionary. **Returns:** - omni.client.Request. ### logged_user_id **The user id that logs in this channel.** ### logged_user_name **The user name that logs in this channel.** ### peer_users **All the peer clients that joined to this channel.** ### stopped **Whether channel is stopped or not.**
1,440