Tuple Data Type Examples
This file contains example usage for all of the AutoNode tuple data types. For access to the other types of examples see AutoNode Examples.
double[2]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_double2(first_value: ot.double2, second_value: ot.double2) -> ot.double2:
"""Takes in two double[2] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(2,), dtype=numpy.float64). When put into
Fabric and USD the values are stored as two double-precision floating point values.
"""
return first_value + second_value
double[2][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_double2array(first_value: ot.double2array, second_value: ot.double2array) -> ot.double2array:
"""Takes in two arrays of double2 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(2,N,), dtype=numpy.float64) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
double[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_double3(first_value: ot.double3, second_value: ot.double3) -> ot.double3:
"""Takes in two double[3] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(3,), dtype=numpy.float64). When put into
Fabric and USD the values are stored as three double-precision floating point values.
"""
return first_value + second_value
double[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_double3array(first_value: ot.double3array, second_value: ot.double3array) -> ot.double3array:
"""Takes in two arrays of double3 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(3,N,), dtype=numpy.float64) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
double[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_double4(first_value: ot.double4, second_value: ot.double4) -> ot.double4:
"""Takes in two double[4] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(4,), dtype=numpy.float64). When put into
Fabric and USD the values are stored as four double-precision floating point values.
"""
return first_value + second_value
double[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_double4array(first_value: ot.double4array, second_value: ot.double4array) -> ot.double4array:
"""Takes in two arrays of double4 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(4,N,), dtype=numpy.float64) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
float[2]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_float2(first_value: ot.float2, second_value: ot.float2) -> ot.float2:
"""Takes in two float[2] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(2,), dtype=numpy.float32). When put into
Fabric and USD the values are stored as two single-precision floating point values.
"""
return first_value + second_value
float[2][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_float2array(first_value: ot.float2array, second_value: ot.float2array) -> ot.float2array:
"""Takes in two arrays of float2 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(2,N,), dtype=numpy.float32) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
float[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_float3(first_value: ot.float3, second_value: ot.float3) -> ot.float3:
"""Takes in two float[3] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(3,), dtype=numpy.float32). When put into
Fabric and USD the values are stored as three single-precision floating point values.
"""
return first_value + second_value
float[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_float3array(first_value: ot.float3array, second_value: ot.float3array) -> ot.float3array:
"""Takes in two arrays of float3 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(3,N,), dtype=numpy.float32) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
float[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_float4(first_value: ot.float4, second_value: ot.float4) -> ot.float4:
"""Takes in two float[4] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(4,), dtype=numpy.float32). When put into
Fabric and USD the values are stored as four single-precision floating point values.
"""
return first_value + second_value
float[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_float4array(first_value: ot.float4array, second_value: ot.float4array) -> ot.float4array:
"""Takes in two arrays of float4 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(4,N,), dtype=numpy.float32) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
half[2]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_half2(first_value: ot.half2, second_value: ot.half2) -> ot.half2:
"""Takes in two half[2] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(2,), dtype=numpy.float16). When put into
Fabric and USD the values are stored as two 16-bit floating point values.
"""
return first_value + second_value
half[2][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_half2array(first_value: ot.half2array, second_value: ot.half2array) -> ot.half2array:
"""Takes in two arrays of half2 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(2,N,), dtype=numpy.float16) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
half[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_half3(first_value: ot.half3, second_value: ot.half3) -> ot.half3:
"""Takes in two half[3] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(3,), dtype=numpy.float16). When put into
Fabric and USD the values are stored as three 16-bit floating point values.
"""
return first_value + second_value
half[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_half3array(first_value: ot.half3array, second_value: ot.half3array) -> ot.half3array:
"""Takes in two arrays of half3 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(3,N,), dtype=numpy.float16) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
half[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_half4(first_value: ot.half4, second_value: ot.half4) -> ot.half4:
"""Takes in two half[4] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(4,), dtype=numpy.float16). When put into
Fabric and USD the values are stored as four 16-bit floating point values.
"""
return first_value + second_value
half[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_half4array(first_value: ot.half4array, second_value: ot.half4array) -> ot.half4array:
"""Takes in two arrays of half4 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(4,N,), dtype=numpy.float16) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
int[2]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_int2(first_value: ot.int2, second_value: ot.int2) -> ot.int2:
"""Takes in two int[2] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(2,), dtype=numpy.int32). When put into
Fabric and USD the values are stored as two 32-bit integer values.
"""
return first_value + second_value
int[2][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_int2array(first_value: ot.int2array, second_value: ot.int2array) -> ot.int2array:
"""Takes in two arrays of int2 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(2,N,), dtype=numpy.int32) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
int[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_int3(first_value: ot.int3, second_value: ot.int3) -> ot.int3:
"""Takes in two int[3] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(3,), dtype=numpy.int32). When put into
Fabric and USD the values are stored as three 32-bit integer values.
"""
return first_value + second_value
int[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_int3array(first_value: ot.int3array, second_value: ot.int3array) -> ot.int3array:
"""Takes in two arrays of int3 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(3,N,), dtype=numpy.int32) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
int[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_int4(first_value: ot.int4, second_value: ot.int4) -> ot.int4:
"""Takes in two int[4] values and outputs the sum of them.
The types of both inputs and the return value are numpy.array(shape=(4,), dtype=numpy.int32). When put into
Fabric and USD the values are stored as two 32-bit integer values.
"""
return first_value + second_value
int[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_int4array(first_value: ot.int4array, second_value: ot.int4array) -> ot.int4array:
"""Takes in two arrays of int4 attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(4,N,), dtype=numpy.int32) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value