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

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: 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,
) 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

property abi: AttributeData#

The ABI object representing the bundled attribute’s data

Type:

omni.graph.core.AttributeData

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 type: Type#

Attribute type of the attribute data. Can only be set on creation.

Type:

omni.graph.core.Type

property value: Any#

The value of an attributeData for reading

Type:

Any