RuntimeAttribute
- class omni.graph.core.RuntimeAttribute(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 = <PtrToPtrKind.NA: 0>)
Bases:
object
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)Copies data from another attribute, returning True if the copy succeeded, else False
Attributes
Returns the ABI object representing the bundled attribute's data
Get the value of an attributeData for reading, forcing it to be on the CPU
Get the value of an attributeData for reading, forcing it to be on the GPU
Returns the name of the attribute data.
Return the number of elements in the attribute (1 for regular data, elementCount for arrays)
Returns the attribute type of the attribute data.
Get 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 = <PtrToPtrKind.NA: 0>)
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 og.AttributeDataValueHelper.get_array() for parameters. on_gpu is provided here
- copy_data(other: omni.graph.core._impl.runtime.RuntimeAttribute) bool
Copies data from another attribute, returning True if the copy succeeded, else False
- property abi: omni.graph.core._omni_graph_core.AttributeData
Returns the ABI object representing the bundled attribute’s data
- property cpu_value: Any
Get the value of an attributeData for reading, forcing it to be on the CPU
- property gpu_value: Any
Get the value of an attributeData for reading, forcing it to be on the GPU
- property name: str
Returns the name of the attribute data. Can only be set on creation.
- property size: int
Return the number of elements in the attribute (1 for regular data, elementCount for arrays)
- property type: omni.graph.core._omni_graph_core.Type
Returns the attribute type of the attribute data. Can only be set on creation.
- property value: Any
Get the value of an attributeData for reading