Data Types#

The Python module omni.graph.core.types contains definitions for Python type annotations that correspond to all of the data types used by Omnigraph. The annotation can be used to check that data extracted from the OmniGraph Python APIs for retrieving attribute values have the correct types.

This table shows the relationships between the attribute type as you might see it in a .ogn file, the corresponding Python type annotation to use in function and variable declarations, and the underlying data type that is returned from Python APIs that retrieve values from attributes with those corresponding OGN data types.

.ogn Type Definition

Type annotation

Python Data Type

any

omni.graph.core.types.any

any

bool

omni.graph.core.types.bool

bool

bool[]

omni.graph.core.types.boolarray

numpy.ndarray(shape=(N,), dtype=numpy.bool)

bundle

omni.graph.core.types.bundle

omni.graph.core.BundleContents

colord[3]

omni.graph.core.types.color3d

numpy.ndarray(shape=(3,), dtype=numpy.float64)

colord[3][]

omni.graph.core.types.color3darray

numpy.ndarray(shape=(N,3), dtype=numpy.float64)

colord[4]

omni.graph.core.types.color4d

numpy.ndarray(shape=(4,), dtype=numpy.float64)

colord[4][]

omni.graph.core.types.color4darray

numpy.ndarray(shape=(N,4), dtype=numpy.float64)

colorf[3]

omni.graph.core.types.color3f

numpy.ndarray(shape=(3,), dtype=numpy.float32)

colorf[3][]

omni.graph.core.types.color3farray

numpy.ndarray(shape=(N,3), dtype=numpy.float32)

colorf[4]

omni.graph.core.types.color4f

numpy.ndarray(shape=(4,), dtype=numpy.float32)

colorf[4][]

omni.graph.core.types.color4farray

numpy.ndarray(shape=(N,4), dtype=numpy.float32)

colorh[3]

omni.graph.core.types.color3h

numpy.ndarray(shape=(3,), dtype=numpy.float16)

colorh[3][]

omni.graph.core.types.color3harray

numpy.ndarray(shape=(N,3), dtype=numpy.float16)

colorh[4]

omni.graph.core.types.color4h

numpy.ndarray(shape=(4,), dtype=numpy.float16)

colorh[4][]

omni.graph.core.types.color4harray

numpy.ndarray(shape=(N,4), dtype=numpy.float16)

double

omni.graph.core.types.double

float

double[]

omni.graph.core.types.doublearray

numpy.ndarray(shape=(N,), dtype=numpy.float64)

double[2]

omni.graph.core.types.double2

numpy.ndarray(shape=(2,), dtype=numpy.float64)

double[2][]

omni.graph.core.types.double2array

numpy.ndarray(shape=(N,2), dtype=numpy.float64)

double[3]

omni.graph.core.types.double3

numpy.ndarray(shape=(3,), dtype=numpy.float64)

double[3][]

omni.graph.core.types.double3array

numpy.ndarray(shape=(N,3), dtype=numpy.float64)

double[4]

omni.graph.core.types.double4

numpy.ndarray(shape=(4,), dtype=numpy.float64)

double[4][]

omni.graph.core.types.double4array

numpy.ndarray(shape=(N,4), dtype=numpy.float64)

execution

omni.graph.core.types.execution

int

float

omni.graph.core.types.float

float

float[]

omni.graph.core.types.floatarray

numpy.ndarray(shape=(N,), dtype=numpy.float32)

float[2]

omni.graph.core.types.float2

numpy.ndarray(shape=(2,), dtype=numpy.float32)

float[2][]

omni.graph.core.types.float2array

numpy.ndarray(shape=(N,2), dtype=numpy.float32)

float[3]

omni.graph.core.types.float3

numpy.ndarray(shape=(3,), dtype=numpy.float32)

float[3][]

omni.graph.core.types.float3array

numpy.ndarray(shape=(N,3), dtype=numpy.float32)

float[4]

omni.graph.core.types.float4

numpy.ndarray(shape=(4,), dtype=numpy.float32)

float[4][]

omni.graph.core.types.float4array

numpy.ndarray(shape=(N,4), dtype=numpy.float32)

frame[4]

omni.graph.core.types.frame4d

numpy.ndarray(shape=(4,4), dtype=numpy.float64)

frame[4][]

omni.graph.core.types.frame4darray

numpy.ndarray(shape=(N,4,4), dtype=numpy.float64)

half

omni.graph.core.types.half

float

half[]

omni.graph.core.types.halfarray

numpy.ndarray(shape=(N,), dtype=numpy.float16)

half[2]

omni.graph.core.types.half2

numpy.ndarray(shape=(2,), dtype=numpy.float16)

half[2][]

omni.graph.core.types.half2array

numpy.ndarray(shape=(N,2), dtype=numpy.float16)

half[3]

omni.graph.core.types.half3

numpy.ndarray(shape=(3,), dtype=numpy.float16)

half[3][]

omni.graph.core.types.half3array

numpy.ndarray(shape=(N,3), dtype=numpy.float16)

half[4]

omni.graph.core.types.half4

numpy.ndarray(shape=(4,), dtype=numpy.float16)

half[4][]

omni.graph.core.types.half4array

numpy.ndarray(shape=(N,4), dtype=numpy.float16)

int

omni.graph.core.types.int

int

int[]

omni.graph.core.types.intarray

numpy.ndarray(shape=(N,), dtype=numpy.int32)

int[2]

omni.graph.core.types.int2

numpy.ndarray(shape=(2,), dtype=numpy.int32)

int[2][]

omni.graph.core.types.int2array

numpy.ndarray(shape=(N,2), dtype=numpy.int32)

int[3]

omni.graph.core.types.int3

numpy.ndarray(shape=(3,), dtype=numpy.int32)

int[3][]

omni.graph.core.types.int3array

numpy.ndarray(shape=(N,3), dtype=numpy.int32)

int[4]

omni.graph.core.types.int4

numpy.ndarray(shape=(4,), dtype=numpy.int32)

int[4][]

omni.graph.core.types.int4array

numpy.ndarray(shape=(N,4), dtype=numpy.int32)

int64

omni.graph.core.types.int64

int

int64[]

omni.graph.core.types.int64array

numpy.ndarray(shape=(N,), dtype=numpy.int64)

matrixd[2]

omni.graph.core.types.matrix2d

numpy.ndarray(shape=(2,2), dtype=numpy.float64)

matrixd[2][]

omni.graph.core.types.matrix2darray

numpy.ndarray(shape=(N,2,2), dtype=numpy.float64)

matrixd[3]

omni.graph.core.types.matrix3d

numpy.ndarray(shape=(3,3), dtype=numpy.float64)

matrixd[3][]

omni.graph.core.types.matrix3darray

numpy.ndarray(shape=(N,3,3), dtype=numpy.float64)

matrixd[4]

omni.graph.core.types.matrix4d

numpy.ndarray(shape=(4,4), dtype=numpy.float64)

matrixd[4][]

omni.graph.core.types.matrix4darray

numpy.ndarray(shape=(N,4,4), dtype=numpy.float64)

normald[3]

omni.graph.core.types.normal3d

numpy.ndarray(shape=(3,), dtype=numpy.float64)

normald[3][]

omni.graph.core.types.normal3darray

numpy.ndarray(shape=(N,3), dtype=numpy.float64)

normalf[3]

omni.graph.core.types.normal3f

numpy.ndarray(shape=(3,), dtype=numpy.float32)

normalf[3][]

omni.graph.core.types.normal3farray

numpy.ndarray(shape=(N,3), dtype=numpy.float32)

normalh[3]

omni.graph.core.types.normal3h

numpy.ndarray(shape=(3,), dtype=numpy.float16)

normalh[3][]

omni.graph.core.types.normal3harray

numpy.ndarray(shape=(N,3), dtype=numpy.float16)

objectId

omni.graph.core.types.objectid

int

objectId[]

omni.graph.core.types.objectidarray

numpy.ndarray(shape=(N,), dtype=numpy.uint64)

path

omni.graph.core.types.path

list[usdrt::SdfPath]

pointd[3]

omni.graph.core.types.point3d

numpy.ndarray(shape=(3,), dtype=numpy.float64)

pointd[3][]

omni.graph.core.types.point3darray

numpy.ndarray(shape=(N,3), dtype=numpy.float64)

pointf[3]

omni.graph.core.types.point3f

numpy.ndarray(shape=(3,), dtype=numpy.float32)

pointf[3][]

omni.graph.core.types.point3farray

numpy.ndarray(shape=(N,3), dtype=numpy.float32)

pointh[3]

omni.graph.core.types.point3h

numpy.ndarray(shape=(3,), dtype=numpy.float16)

pointh[3][]

omni.graph.core.types.point3harray

numpy.ndarray(shape=(N,3), dtype=numpy.float16)

quatd[4]

omni.graph.core.types.quatd

numpy.ndarray(shape=(4,), dtype=numpy.float64)

quatd[4][]

omni.graph.core.types.quatdarray

numpy.ndarray(shape=(N,4), dtype=numpy.float64)

quatf[4]

omni.graph.core.types.quatf

numpy.ndarray(shape=(4,), dtype=numpy.float32)

quatf[4][]

omni.graph.core.types.quatfarray

numpy.ndarray(shape=(N,4), dtype=numpy.float32)

quath[4]

omni.graph.core.types.quath

numpy.ndarray(shape=(4,), dtype=numpy.float16)

quath[4][]

omni.graph.core.types.quatharray

numpy.ndarray(shape=(N,4), dtype=numpy.float16)

string

omni.graph.core.types.string

str

target

omni.graph.core.types.target

list[usdrt::SdfPath]

texcoordd[2]

omni.graph.core.types.texcoord2d

numpy.ndarray(shape=(2,), dtype=numpy.float64)

texcoordd[2][]

omni.graph.core.types.texcoord2darray

numpy.ndarray(shape=(N,2), dtype=numpy.float64)

texcoordd[3]

omni.graph.core.types.texcoord3d

numpy.ndarray(shape=(3,), dtype=numpy.float64)

texcoordd[3][]

omni.graph.core.types.texcoord3darray

numpy.ndarray(shape=(N,3), dtype=numpy.float64)

texcoordf[2]

omni.graph.core.types.texcoord2f

numpy.ndarray(shape=(2,), dtype=numpy.float32)

texcoordf[2][]

omni.graph.core.types.texcoord2farray

numpy.ndarray(shape=(N,2), dtype=numpy.float32)

texcoordf[3]

omni.graph.core.types.texcoord3f

numpy.ndarray(shape=(3,), dtype=numpy.float32)

texcoordf[3][]

omni.graph.core.types.texcoord3farray

numpy.ndarray(shape=(N,3), dtype=numpy.float32)

texcoordh[2]

omni.graph.core.types.texcoord2h

numpy.ndarray(shape=(2,), dtype=numpy.float16)

texcoordh[2][]

omni.graph.core.types.texcoord2harray

numpy.ndarray(shape=(N,2), dtype=numpy.float16)

texcoordh[3]

omni.graph.core.types.texcoord3h

numpy.ndarray(shape=(3,), dtype=numpy.float16)

texcoordh[3][]

omni.graph.core.types.texcoord3harray

numpy.ndarray(shape=(N,3), dtype=numpy.float16)

timecode

omni.graph.core.types.timecode

float

timecode[]

omni.graph.core.types.timecodearray

numpy.ndarray(shape=(N,), dtype=numpy.float64)

token

omni.graph.core.types.token

str

token[]

omni.graph.core.types.tokenarray

numpy.ndarray(shape=(N,), dtype=numpy.str)

uchar

omni.graph.core.types.uchar

int

uchar[]

omni.graph.core.types.uchararray

numpy.ndarray(shape=(N,), dtype=numpy.uint8)

uint

omni.graph.core.types.uint

int

uint[]

omni.graph.core.types.uintarray

numpy.ndarray(shape=(N,), dtype=numpy.uint32)

uint64

omni.graph.core.types.uint64

int

uint64[]

omni.graph.core.types.uint64array

numpy.ndarray(shape=(N,), dtype=numpy.uint64)

vectord[3]

omni.graph.core.types.vector3d

numpy.ndarray(shape=(3,), dtype=numpy.float64)

vectord[3][]

omni.graph.core.types.vector3darray

numpy.ndarray(shape=(N,3), dtype=numpy.float64)

vectorf[3]

omni.graph.core.types.vector3f

numpy.ndarray(shape=(3,), dtype=numpy.float32)

vectorf[3][]

omni.graph.core.types.vector3farray

numpy.ndarray(shape=(N,3), dtype=numpy.float32)

vectorh[3]

omni.graph.core.types.vector3h

numpy.ndarray(shape=(3,), dtype=numpy.float16)

vectorh[3][]

omni.graph.core.types.vector3harray

numpy.ndarray(shape=(N,3), dtype=numpy.float16)