AttributeData

class omni.graph.core.AttributeData

Methods

__init__(*args, **kwargs)

copy_data(self, rhs)

Copies the og.AttributeData data into this object's data.

cpu_valid(self)

Returns whether this attribute data object is currently valid on the cpu.

get(self[, on_gpu])

param on_gpu

Is the data to be retrieved from the GPU?

get_array(self, on_gpu, get_for_write, ...)

param on_gpu

Is the data to be retrieved from the GPU?

get_extended_type(self)

Returns the extended type of the current attribute data.

get_name(self)

Returns the name of the current attribute data.

get_resolved_type(self)

Returns the resolved type of the extended attribute data.

get_type(self)

Returns the type of the current attribute data.

gpu_valid(self)

Returns whether this attribute data object is currently valid on the gpu.

is_read_only(self)

Returns whether this attribute data object is read only or not.

is_valid(self)

Returns whether this attribute data object is valid or not.

resize(self, arg0)

Sets the size of the array represented by this object.

set(self, value[, on_gpu])

Sets the value of the attribute data

size(self)

Returns the size of the data represented by this object (1 if it's not an array).

Attributes

gpu_ptr_kind

Defines the memory space that GPU array data pointers live in

__init__(*args, **kwargs)
copy_data(self: omni.graph.core._omni_graph_core.AttributeData, rhs: omni.graph.core._omni_graph_core.AttributeData) bool

Copies the og.AttributeData data into this object’s data.

Parameters

rhs (og.AttributeData) – Attribute data to be copied - must be the same type as the current object to work

Returns

True if the data was successfully copied, else False.

Return type

(bool)

cpu_valid(self: omni.graph.core._omni_graph_core.AttributeData) bool

Returns whether this attribute data object is currently valid on the cpu.

Returns

Is the attribute data currently valid on the cpu?

Return type

[bool]

get(self: omni.graph.core._omni_graph_core.AttributeData, on_gpu: bool = False) object
Parameters

on_gpu (bool) – Is the data to be retrieved from the GPU?

Returns

Value of the attribute data

Return type

(Any)

get_array(self: omni.graph.core._omni_graph_core.AttributeData, on_gpu: bool = False, get_for_write: bool, reserved_element_count: int) 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

Returns

Value of the attribute’s data

Return type

(Any)

get_extended_type(self: omni.graph.core._omni_graph_core.AttributeData) omni.graph.core._omni_graph_core.ExtendedAttributeType

Returns the extended type of the current attribute data.

Returns

Extended type of the attribute data object

Return type

[omni.graph.core.ExtendedAttributeType]

get_name(self: omni.graph.core._omni_graph_core.AttributeData) str

Returns the name of the current attribute data.

Returns

Name of the attribute data object

Return type

[str]

get_resolved_type(self: omni.graph.core._omni_graph_core.AttributeData) omni.graph.core._omni_graph_core.Type

Returns the resolved type of the extended attribute data. Only valid for attributes with union/any extended types.

Returns

Resolved type of the attribute data object

Return type

[omni.graph.core.Type]

get_type(self: omni.graph.core._omni_graph_core.AttributeData) omni.graph.core._omni_graph_core.Type

Returns the type of the current attribute data.

Returns

Type of the attribute data object

Return type

[omni.graph.core.Type]

gpu_valid(self: omni.graph.core._omni_graph_core.AttributeData) bool

Returns whether this attribute data object is currently valid on the gpu.

Returns

Is the attribute data currently valid on the gpu?

Return type

[bool]

is_read_only(self: omni.graph.core._omni_graph_core.AttributeData) bool

Returns whether this attribute data object is read only or not.

Returns

Is the attribute data object read-only?

Return type

[bool]

is_valid(self: omni.graph.core._omni_graph_core.AttributeData) bool

Returns whether this attribute data object is valid or not.

Returns

Is the attribute data object valid?

Return type

[bool]

resize(self: omni.graph.core._omni_graph_core.AttributeData, arg0: int) bool

Sets the size of the array represented by this object.

Returns

True if the array was resized, False if the attribute data was not an array

Return type

[bool]

set(self: omni.graph.core._omni_graph_core.AttributeData, value: object, on_gpu: bool = False) bool

Sets the value of the attribute data

Parameters
  • value (Any) – New value of the attribute data

  • on_gpu (bool) – Is the data to be set on the GPU?

Returns

True if the value was successfully set

Return type

(bool)

size(self: omni.graph.core._omni_graph_core.AttributeData) int

Returns the size of the data represented by this object (1 if it’s not an array).

Returns

Number of elements in the data

Return type

[int]

property gpu_ptr_kind

Defines the memory space that GPU array data pointers live in