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: bool | None = None,
- gpu_ptr_kind: ~omni.graph.core._omni_graph_core.PtrToPtrKind = <PtrToPtrKind.NA: 0>,
Bases:
object
—– FOR USE BY GENERATED CODE ONLY —– Accessor for an attribute whose data type can only be determined at runtime, and which can potentially change from one evaluation to the next. These attributes can be found either as bundle members or as the extended attribute types “any” or “union”.
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
The ABI object representing the bundled attribute's data
The value of an attributeData for reading, forcing it to be on the CPU
The value of an attributeData for reading, forcing it to be on the GPU
Name of the attribute data.
The number of elements in the attribute (1 for regular data, elementCount for arrays)
Attribute type of the attribute data.
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: bool | None = 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 AttributeDataValueHelper.get_array() for parameters. on_gpu is provided here
- Returns:
Value of the array data
- Return type:
Any
- copy_data(
- other: RuntimeAttribute,
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
- property abi: AttributeData#
The ABI object representing the bundled attribute’s data
- property cpu_value: Any#
The value of an attributeData for reading, forcing it to be on the CPU
- Type:
Any
- property gpu_value: Any#
The value of an attributeData for reading, forcing it to be on the GPU
- Type:
Any
- property name: str#
Name of the attribute data. Can only be set on creation.
- Type:
str
- property size: int#
The number of elements in the attribute (1 for regular data, elementCount for arrays)
- Type:
int
- property value: Any#
The value of an attributeData for reading
- Type:
Any