Attribute
- class omni.graph.core.Attribute
Methods
__init__
(*args, **kwargs)connect
(self, path, modify_usd)Connects this attribute with another attribute.
connectEx
(self, info, modify_usd)Connects this attribute with another attribute.
connectPrim
(self, path, modify_usd, write)Connects this attribute to a prim that can represent a bundle connection or just a plain prim relationship
deprecation_message
(self)Returns the message associated with a deprecated attribute.
disconnect
(self, attribute, modify_usd)Disconnects this attribute from another attribute.
disconnectPrim
(self, path, modify_usd, write)Disconnects this attribute to a prim that can represent a bundle connection or just a plain prim relationship
get
(self[, on_gpu, instance])- param on_gpu
Is the data to be retrieved from the GPU?
get_all_metadata
(self)Returns a dictionary of metadata on the attribute.
get_array
(self, on_gpu, get_for_write, ...)- param on_gpu
Is the data to be retrieved from the GPU?
get_attribute_data
(self, instance)- param instance
an instance index when getting value on an instantiated graph
- returns
True if downstream nodes are disabled in dynamic scheduling, False otherwise
Returns the number of downstream connections for this attribute.
Returns the list of upstream connections for this attribute.
Returns the list of downstream connections for this attribute, with detailed connection information such as the connection type.
get_extended_type
(self)Returns the extended type of the current attribute.
get_handle
(self)Returns the handle to the attribute as an uint64.
get_metadata
(self, key)Returns the metadata value for the given key.
get_metadata_count
(self)Returns the number of metadata values currently defined on the attribute.
get_name
(self)Returns the name of the current attribute.
get_node
(self)Returns the node associated with the attribute.
get_path
(self)Returns the full path to the attribute, including the node path.
get_port_type
(self)Returns the port type of the attribute.
get_resolved_type
(self)Returns the resolved type of the extended attribute, or the hardcoded type for regular attributes.
get_type_name
(self)Returns the type name of the current attribute.
get_union_types
(self)Returns the list of accepted types for the attribute if it is an extended union type, else None
Returns the number of upstream connections for this attribute.
get_upstream_connections
(self)Returns the list of upstream connections for this attribute.
Returns the list of upstream connections for this attribute, with detailed connection information such as the connection type.
is_compatible
(self, arg0)Returns whether this attribute is compatible with another.
is_connected
(self, arg0)Returns whether this attribute is connected to another.
is_deprecated
(self)Returns whether the attribute is deprecated.
is_dynamic
(self)Returns whether the current attribute is a dynamic attribute (not in the node type definition).
is_valid
(self)Returns whether the current attribute is valid.
register_value_changed_callback
(self, func)Registers a function that will be invoked when the value of the given attribute changes.
set
(self, value[, on_gpu, instance])Sets the value of the attribute's data
set_default
(self, value[, on_gpu])Sets the default value of the attribute's data (value when not connected)
set_disable_dynamic_downstream_work
(self, ...)Sets whether downstream nodes are disabled in dynamic scheduling
set_metadata
(self, key, value)Sets the metadata value for the given key.
set_resolved_type
(self, arg0)Sets the resolved type for the extended attribute.
update_attribute_value
(self, update_immediately)Requests the value of an attribute.
Attributes
Defines the memory space that GPU array data pointers live in
Flag that is set when an attribute need not be valid for compute() to happen.
resolved_prefix
- __init__(*args, **kwargs)
- connect(self: omni.graph.core._omni_graph_core.Attribute, path: omni.graph.core._omni_graph_core.Attribute, modify_usd: bool) bool
Connects this attribute with another attribute. Assumes regular connection type.
- Parameters
path (Attribute) – The destination attr
modify_usd (bool) – Whether to create USD.
- Returns
(bool) True for success, False for fail
- connectEx(self: omni.graph.core._omni_graph_core.Attribute, info: omni.graph.core._omni_graph_core.ConnectionInfo, modify_usd: bool) bool
Connects this attribute with another attribute. Allows for different connection types.
- Parameters
info (ConnectionInfo) – The ConnectionInfo object that contains both the attribute and the connection type
modify_usd (bool) – Whether to modify the underlying USD with this connection
- Returns
(bool) True for success, False for fail
- connectPrim(self: omni.graph.core._omni_graph_core.Attribute, path: str, modify_usd: bool, write: bool) bool
Connects this attribute to a prim that can represent a bundle connection or just a plain prim relationship
- Parameters
path (str) – The path to the prim
modify_usd (bool) – Whether to modify USD.
write (bool) – Whether this connection represents a bundle
- Returns
(bool) True for success, False for fail
- deprecation_message(self: omni.graph.core._omni_graph_core.Attribute) str
Returns the message associated with a deprecated attribute. Typically this message gives guidance as to what the user should do instead of using the deprecated attribute.
- disconnect(self: omni.graph.core._omni_graph_core.Attribute, attribute: omni.graph.core._omni_graph_core.Attribute, modify_usd: bool) bool
Disconnects this attribute from another attribute.
- Parameters
attribute (Attribute) – The destination attr of the connection to remove
modify_usd (bool) – Whether to modify USD.
- Returns
(bool) True for success, False for fail
- disconnectPrim(self: omni.graph.core._omni_graph_core.Attribute, path: str, modify_usd: bool, write: bool) bool
Disconnects this attribute to a prim that can represent a bundle connection or just a plain prim relationship
- Parameters
path (str) – The path to the prim
modify_usd (bool) – Whether to modify USD.
write (bool) – Whether this connection represents a bundle
- Returns
(bool) True for success, False for fail
- get(self: omni.graph.core._omni_graph_core.Attribute, on_gpu: bool = False, instance: int = 18446744073709551614) object
- Parameters
on_gpu (bool) – Is the data to be retrieved from the GPU?
instance (int) – an instance index when getting value on an instantiated graph
- Returns
Value of the attribute’s data
- Return type
(Any)
- get_all_metadata(self: omni.graph.core._omni_graph_core.Attribute) dict
Returns a dictionary of metadata on the attribute.
- get_array(self: omni.graph.core._omni_graph_core.Attribute, on_gpu: bool = False, get_for_write: bool, reserved_element_count: int, instance: int = 18446744073709551614) object
- Parameters
on_gpu (bool) – Is the data to be retrieved from the GPU?
get_for_write (bool) – Should the data be retrieved for writing?
reserved_element_count (int) – If the data is to be retrieved for writing, preallocate this many elements
instance (int) – an instance index when getting value on an instantiated graph
- Returns
Value of the attribute’s data
- Return type
(Any)
- get_attribute_data(self: omni.graph.core._omni_graph_core.Attribute, instance: int = 18446744073709551614) omni::graph::core::Py_AttributeData
- Parameters
instance (int) – an instance index when getting value on an instantiated graph
Returns the underlying attribute data accessor object for this attribute.
- get_disable_dynamic_downstream_work(self: omni.graph.core._omni_graph_core.Attribute) bool
- Returns
True if downstream nodes are disabled in dynamic scheduling, False otherwise
- get_downstream_connection_count(self: omni.graph.core._omni_graph_core.Attribute) int
Returns the number of downstream connections for this attribute.
- get_downstream_connections(self: omni.graph.core._omni_graph_core.Attribute) List[omni.graph.core._omni_graph_core.Attribute]
Returns the list of upstream connections for this attribute.
- get_downstream_connections_info(self: omni.graph.core._omni_graph_core.Attribute) List[omni.graph.core._omni_graph_core.ConnectionInfo]
Returns the list of downstream connections for this attribute, with detailed connection information such as the connection type.
- Returns
A list of the downstream ConnectionInfo objects
- get_extended_type(self: omni.graph.core._omni_graph_core.Attribute) omni.graph.core._omni_graph_core.ExtendedAttributeType
Returns the extended type of the current attribute.
- Returns
Extended type of the attribute data object
- Return type
[omni.graph.core.ExtendedType]
- get_handle(self: omni.graph.core._omni_graph_core.Attribute) int
Returns the handle to the attribute as an uint64.
- get_metadata(self: omni.graph.core._omni_graph_core.Attribute, key: str) str
Returns the metadata value for the given key.
- Parameters
key (str) – The metadata keyword
- Returns
Metadata value for the given keyword, or None if it is not defined
- Return type
(str)
- get_metadata_count(self: omni.graph.core._omni_graph_core.Attribute) int
Returns the number of metadata values currently defined on the attribute.
- get_name(self: omni.graph.core._omni_graph_core.Attribute) str
Returns the name of the current attribute.
- get_node(self: omni.graph.core._omni_graph_core.Attribute) omni::graph::core::Py_Node
Returns the node associated with the attribute.
- get_path(self: omni.graph.core._omni_graph_core.Attribute) str
Returns the full path to the attribute, including the node path.
- get_port_type(self: omni.graph.core._omni_graph_core.Attribute) omni.graph.core._omni_graph_core.AttributePortType
Returns the port type of the attribute.
- get_resolved_type(self: omni.graph.core._omni_graph_core.Attribute) omni::graph::core::Py_Type
Returns the resolved type of the extended attribute, or the hardcoded type for regular attributes.
- Returns
Resolved type of the attribute data object
- Return type
- get_type_name(self: omni.graph.core._omni_graph_core.Attribute) str
Returns the type name of the current attribute.
- get_union_types(self: omni.graph.core._omni_graph_core.Attribute) object
Returns the list of accepted types for the attribute if it is an extended union type, else None
- get_upstream_connection_count(self: omni.graph.core._omni_graph_core.Attribute) int
Returns the number of upstream connections for this attribute.
- get_upstream_connections(self: omni.graph.core._omni_graph_core.Attribute) List[omni.graph.core._omni_graph_core.Attribute]
Returns the list of upstream connections for this attribute.
- get_upstream_connections_info(self: omni.graph.core._omni_graph_core.Attribute) List[omni.graph.core._omni_graph_core.ConnectionInfo]
Returns the list of upstream connections for this attribute, with detailed connection information such as the connection type.
- Returns
A list of the upstream ConnectionInfo objects
- is_compatible(self: omni.graph.core._omni_graph_core.Attribute, arg0: omni.graph.core._omni_graph_core.Attribute) bool
Returns whether this attribute is compatible with another.
- is_connected(self: omni.graph.core._omni_graph_core.Attribute, arg0: omni.graph.core._omni_graph_core.Attribute) bool
Returns whether this attribute is connected to another.
- is_deprecated(self: omni.graph.core._omni_graph_core.Attribute) bool
Returns whether the attribute is deprecated. Deprecated attributes should not be used as they will be removed in a future version.
- is_dynamic(self: omni.graph.core._omni_graph_core.Attribute) bool
Returns whether the current attribute is a dynamic attribute (not in the node type definition).
- is_valid(self: omni.graph.core._omni_graph_core.Attribute) bool
Returns whether the current attribute is valid.
- register_value_changed_callback(self: omni.graph.core._omni_graph_core.Attribute, func: object) None
Registers a function that will be invoked when the value of the given attribute changes.
Note that an attribute can have one and only one callback. Subsequent calls will replace previously set callbacks. Passing None for the function argument will clear the existing callback.
- Parameters
func (Function) – A function with one argument representing the attribute that changed.
- set(self: omni.graph.core._omni_graph_core.Attribute, value: object, on_gpu: bool = False, instance: int = 18446744073709551614) bool
Sets the value of the attribute’s data
- Parameters
value (Any) – New value of the attribute’s data
on_gpu (bool) – Is the data to be set on the GPU?
instance (int) – an instance index when setting value on an instantiated graph
- Returns
True if the value was successfully set
- Return type
(bool)
- set_default(self: omni.graph.core._omni_graph_core.Attribute, value: object, on_gpu: bool = False) bool
Sets the default value of the attribute’s data (value when not connected)
- Parameters
value (Any) – New value of the default attribute’s data
on_gpu (bool) – Is the data to be set on the GPU?
- Returns
True if the value was successfully set
- Return type
(bool)
- set_disable_dynamic_downstream_work(self: omni.graph.core._omni_graph_core.Attribute, disable: bool) None
Sets whether downstream nodes are disabled in dynamic scheduling
- Parameters
disable (bool) – Whether to disable downstream connected nodes in dynamic scheduling.
- set_metadata(self: omni.graph.core._omni_graph_core.Attribute, key: str, value: str) bool
Sets the metadata value for the given key.
- Parameters
key (str) – The metadata keyword
value (str) – The value of the metadata
- set_resolved_type(self: omni.graph.core._omni_graph_core.Attribute, arg0: omni::graph::core::Py_Type) None
Sets the resolved type for the extended attribute. Only valid for attributes with union/any extended types, who’s type has not yet been resolved. Should only be called from on_connection_type_resolve() callback. This operation is async and may fail if the type cannot be resolved as requested.
- Parameters
is_valid (omni.graph.core.Type) – The type to resolve the attribute to
- update_attribute_value(self: omni.graph.core._omni_graph_core.Attribute, update_immediately: bool) bool
Requests the value of an attribute. In the cases of lazy evaluation systems, this generates the “pull” that causes the attribute to update its value.
- Parameters
update_immediately (bool) – Whether to update the attribute value immediately. If True, the function will block until the attribute is update and then return. If False, the attribute will be updated in the next update loop.
- Returns
The value of the attribute (Any)
- property gpu_ptr_kind
Defines the memory space that GPU array data pointers live in
- property is_optional_for_compute
Flag that is set when an attribute need not be valid for compute() to happen. (bool)