All Data Type Examples
This file contains example usage for all of the AutoNode data types in one place for easy reference and searching. For a view of the examples that is separated into more digestible portions see AutoNode Examples.
bool
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_bool(first_value: ot.bool, second_value: ot.bool) -> ot.boolean:
"""Takes in two boolean values and outputs the logical AND of them.
The types of both inputs and the return value are Python booleans.
Note that the return type name is the Warp-compatible "boolean", which is just a synonym for "bool".
"""
return first_value and second_value
bool[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_boolarray(first_value: ot.boolarray, second_value: ot.boolarray) -> ot.boolarray:
"""Takes in two arrays of boolean attributes and returns an array with the logical AND of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=bool) where "N" is the
size of the array determined at runtime.
"""
return first_value & second_value
double
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_double(first_value: ot.double, second_value: ot.double) -> ot.float64:
"""Takes in two double precision values and outputs the sum of them.
The types of both inputs and the return value are Python floats as Python does not distinguish between
different precision levels. When put into Fabric and USD the values are stored as double.
precision values.
Note that the return type is the Warp-compatible "float64" which is a synonym for "double".
"""
return first_value + second_value
double[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_doublearray(first_value: ot.doublearray, second_value: ot.doublearray) -> ot.doublearray:
"""Takes in two arrays of double attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=numpy.float64) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
float
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_float(first_value: ot.float, second_value: ot.float) -> ot.float32:
"""Takes in two single-precision floating point values and outputs the sum of them.
The types of both inputs and the return value are Python floats as Python does not distinguish between
different precision levels. When put into Fabric and USD the values are stored as single-precision
floating point values.
Note that the return type is the Warp-compatible "float32" which is a synonym for "float".
"""
return first_value + second_value
float[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_floatarray(first_value: ot.floatarray, second_value: ot.floatarray) -> ot.floatarray:
"""Takes in two arrays of float attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=numpy.float32) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
half
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_half(first_value: ot.half, second_value: ot.half) -> ot.float16:
"""Takes in two half-precision floating point values and outputs the sum of them.
The types of both inputs and the return value are Python floats as Python does not distinguish between
different precision levels. When put into Fabric and USD the values are stored as half
precision floating point values.
Note that the return type is the Warp-compatible "float16" which is a synonym for "half".
"""
return first_value + second_value
half[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_halfarray(first_value: ot.halfarray, second_value: ot.halfarray) -> ot.halfarray:
"""Takes in two arrays of half attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=numpy.float16) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
int
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_int(first_value: ot.int, second_value: ot.int) -> ot.int32:
"""Takes in two 32-bit precision integer values and outputs the sum of them.
The types of both inputs and the return value are Python ints as Python does not distinguish between
different precision levels. When put into Fabric and USD the values are stored as 32-bit precision
integer values.
Note that the return type is the Warp-compatible "int32" which is a synonym for "int".
"""
return first_value + second_value
int[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_intarray(first_value: ot.intarray, second_value: ot.intarray) -> ot.intarray:
"""Takes in two arrays of integer attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=numpy.int32) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
int64
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_int64(first_value: ot.int64, second_value: ot.int64) -> ot.int64:
"""Takes in two 64-bit precision integer values and outputs the sum of them.
The types of both inputs and the return value are Python ints as Python does not distinguish between
different precision levels. When put into Fabric and USD the values are stored as 64-bit precision
integer values.
"""
return first_value + second_value
int64[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_int64array(first_value: ot.int64array, second_value: ot.int64array) -> ot.int64array:
"""Takes in two arrays of 64-bit integer attributes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=numpy.int64) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
string
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_string(first_value: ot.string, second_value: ot.string) -> ot.string:
"""Takes in two string values and outputs the concatenated string.
The types of both inputs and the return value are Python str. When put into Fabric the values are
stored as uchar arrays with a length value. USD stores it as a native string type.
"""
return first_value + second_value
token
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_token(first_value: ot.token, second_value: ot.token) -> ot.token:
"""Takes in two tokenized strings and outputs the string resulting from concatenating them together.
The types of both inputs and the return value are Python strs as Python does not have the concept of a
unique tokenized string. When put into Fabric and USD the values are stored as a single
64-bit unsigned integer that is a token .
"""
return first_value + second_value
token[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_tokenarray(first_value: ot.tokenarray, second_value: ot.tokenarray) -> ot.tokenarray:
"""Takes in two arrays of tokens and returns an array containing the concatenations of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype="<US") where "N" is
the size of the array determined at runtime.
"""
return np.array([x + y for x, y in zip(first_value, second_value)])
uchar
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_uchar(first_value: ot.uchar, second_value: ot.uchar) -> ot.uint8:
"""Takes in two 8-bit precision unsigned integer values and outputs the sum of them.
The types of both inputs and the return value are Python ints as Python does not distinguish between
different precision levels or signs. When put into Fabric and USD the values are stored as 8-bit
precision unsigned integer values.
Note that the return type is the Warp-compatible "uint8" which is a synonym for "uchar".
"""
return first_value + second_value
uchar[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_uchararray(first_value: ot.uchararray, second_value: ot.uchararray) -> ot.uchararray:
"""Takes in two arrays of 8-bit unsigned integer attributes and returns an array containing the sum of each
element. The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=numpy.uchar8) where
"N" is the size of the array determined at runtime.
"""
return first_value + second_value
uint
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_uint(first_value: ot.uint, second_value: ot.uint) -> ot.uint:
"""Takes in two 32-bit precision unsigned integer values and outputs the sum of them.
The types of both inputs and the return value are Python ints as Python does not distinguish between
different precision levels or signs. When put into Fabric and USD the values are stored as 32-bit
precision unsigned integer values.
"""
return first_value + second_value
uint[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_uintarray(first_value: ot.uintarray, second_value: ot.uintarray) -> ot.uintarray:
"""Takes in two arrays of 32-bit unsigned integer attributes and returns an array containing the sum of each
element. The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=numpy.uint32) where
"N" is the size of the array determined at runtime.
"""
return first_value + second_value
uint64
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_uint64(first_value: ot.uint64, second_value: ot.uint64) -> ot.uint64:
"""Takes in two 64-bit precision unsigned integer values and outputs the sum of them.
The types of both inputs and the return value are Python ints as Python does not distinguish between
different precision levels or signs. When put into Fabric and USD the values are stored as 64-bit
precision unsigned integer values.
"""
return first_value + second_value
uint64[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_uint64array(first_value: ot.uint64array, second_value: ot.uint64array) -> ot.uint64array:
"""Takes in two arrays of 8-bit unsigned integer attributes and returns an array containing the sum of each
element. The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=numpy.uint64) where
"N" is the size of the array determined at runtime.
"""
return first_value + second_value
@og.create_node_type(ui_name=str)
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type(ui_name="Fluffy Bunny")
def autonode_decoration_ui_name() -> ot.string:
"""This node type has no inputs and returns the UI name of its node type as output. It demonstrates how the
optional ui_name argument can be used on the decorator to modify the name of the node type as it
will appear to the user.
"""
# We know the name of the node type by construction
node_type = og.get_node_type("omni.graph.autonode_decoration_ui_name")
# Get the metadata containing the UI name - will always return "Fluffy Bunny"
return node_type.get_metadata(og.MetadataKeys.UI_NAME)
@og.create_node_type(unique_name=str)
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type(unique_name="omni.graph.autonode_unique_name")
def autonode_decoration_unique_name() -> ot.string:
"""This node type has no inputs and returns the unique name of its node type as output. It demonstrates how the
optional unique_name argument can be used on the decorator to modify the name of the node type as it
is used for registration and identification.
"""
# Look up the node type name using the supplied unique name rather than the one that would have been
# automatically generated (omni.graph.autonode_decoration_unique_name)
node_type = og.get_node_type("omni.graph.autonode_unique_name")
return node_type.get_node_type() if node_type.is_valid() else ""
@og.create_node_type(add_execution_pins)
import inspect
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type(add_execution_pins=True)
def autonode_decoration_add_execution_pins() -> ot.int:
"""This node type has no inputs and returns the number of attributes it has of type "execution". It
demonstrates how the optional add_execution_pins argument can be used on the decorator to automatically
include both an input and an output execution pin so that the node type can be easily included in the
Action Graph.
"""
frame = inspect.currentframe().f_back
node = frame.f_locals.get("node")
# This will return 2, counting the automatically added input and output execution attributes
return sum(1 for attr in node.get_attributes() if attr.get_resolved_type().role == og.AttributeRole.EXECUTION)
@og.create_node_type(metadata=dict(str,any))
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type(metadata={"Emperor": "Palpatine"})
def autonode_decoration_metadata() -> ot.string:
"""This node type has no inputs and returns a string consisting of the value of the metadata
whose name was specified in the decorator "metadata" argument. It demonstrates how the optional metadata
argument can be used on the decorator to automatically add metadata to the node type definition.
"""
# We know the name of the node type by construction
node_type = og.get_node_type("omni.graph.autonode_decoration_metadata")
# Return the metadata with the custom name we specified - will always return "Palpatine"
return node_type.get_metadata("Emperor")
Multiple Simple Outputs
import statistics as st
import numpy as np
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_multi_simple(values: ot.floatarray) -> tuple[ot.float, ot.float, ot.float]:
"""Takes in a list of floating point values and returns three outputs that are the mean, median,
and mode of the values in the list. The outputs will be named "out_0", "out_1", and "out_2".
"""
return (values.mean(), np.median(values), st.mode(values))
Multiple Tuple Outputs
import numpy as np
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_multi_tuple(original: ot.matrix2d) -> tuple[ot.matrix2d, ot.matrix2d]:
"""Takes in a 2x2 matrix and returns two outputs that are the inverse and transpose of the matrix.
Reports an error if the matrix is not invertible. Note that even though the data types themselves
are tuples the return values will be correctly interpreted as being separate output attributes
with each of the outputs itself being a tuple value. The outputs will be named "out_1" and "out_2".
"""
try:
return (original.transpose(), np.linalg.inv(original))
except np.linalg.LinAlgError as error:
raise og.OmniGraphError(f"Could not invert matrix {original}") from error
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
colord[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color3d(first_value: ot.color3d, second_value: ot.color3d) -> ot.color3d:
"""Takes in two colord[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 the values are stored as 3 double-precision values. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
colord[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color3darray(first_value: ot.color3darray, second_value: ot.color3darray) -> ot.color3darray:
"""Takes in two arrays of color3d 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. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
colorf[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color3f(first_value: ot.color3f, second_value: ot.color3f) -> ot.color3f:
"""Takes in two colorf[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 the values are stored as 3 single-precision values. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
colorf[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color3farray(first_value: ot.color3farray, second_value: ot.color3farray) -> ot.color3farray:
"""Takes in two arrays of color3f 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. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
colorh[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color3h(first_value: ot.color3h, second_value: ot.color3h) -> ot.color3h:
"""Takes in two colorh[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 the values are stored as 3 half-precision values. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
colorh[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color3harray(first_value: ot.color3harray, second_value: ot.color3harray) -> ot.color3harray:
"""Takes in two arrays of color3h 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. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
colord[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color4d(first_value: ot.color4d, second_value: ot.color4d) -> ot.color4d:
"""Takes in two color4d 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 the values are stored as 4 double-precision values. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
colord[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color4darray(first_value: ot.color4darray, second_value: ot.color4darray) -> ot.color4darray:
"""Takes in two arrays of color4d 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. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
colorf[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color4f(first_value: ot.color4f, second_value: ot.color4f) -> ot.color4f:
"""Takes in two color4f 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 the values are stored as 4 single-precision values. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
colorf[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color4farray(first_value: ot.color4farray, second_value: ot.color4farray) -> ot.color4farray:
"""Takes in two arrays of color4f 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. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
colorh[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color4h(first_value: ot.color4h, second_value: ot.color4h) -> ot.color4h:
"""Takes in two color4h 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 the values are stored as 4 half-precision values. The color role is applied to USD and OmniGraph types as
an aid to interpreting the values.
"""
return first_value + second_value
colorh[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_color4harray(first_value: ot.color4harray, second_value: ot.color4harray) -> ot.color4harray:
"""Takes in two arrays of color4h 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. The color role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
frame[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_frame4d(first_value: ot.frame4d, second_value: ot.frame4d) -> ot.frame4d:
"""Takes in two frame4d values and outputs the sum of them.
The types of both inputs and the return value are numpy.ndarray(shape=(4,4), dtype=numpy.float64). When put
into Fabric the values are stored as a set of 16 double-precision values. USD uses the special frame4d type.
"""
return first_value + second_value
frame[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_frame4darray(first_value: ot.frame4darray, second_value: ot.frame4darray) -> ot.frame4darray:
"""Takes in two frame4darray values and outputs the sum of them.
The types of both inputs and the return value are numpy.ndarray(shape=(4,4,N), dtype=numpy.float64) where "N" is
the size of the array determined at runtime. When put into Fabric the values are stored as an array of sets
of 16 double-precision values. USD stores it as the native frame4d[] type.
"""
return first_value + second_value
matrixd[2]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_matrix2d(first_value: ot.matrix2d, second_value: ot.matrix2d) -> ot.matrix2d:
"""Takes in two matrix2d values and outputs the sum of them.
The types of both inputs and the return value are numpy.ndarray(shape=(2,2), dtype=numpy.float64). When put
into Fabric and USD the values are stored as a list of 4 double-precision values.
"""
return first_value + second_value
matrixd[2][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_matrix2darray(first_value: ot.matrix2darray, second_value: ot.matrix2darray) -> ot.matrix2darray:
"""Takes in two matrix2darray values and outputs the sum of them.
The types of both inputs and the return value are numpy.ndarray(shape=(N,2,2), dtype=numpy.float64) where "N" is
the size of the array determined at runtime.. When put into Fabric the values are stored as an array of sets
of 9 double-precision values. USD stores it as the native matrix2d[] type.
"""
return first_value + second_value
matrixd[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_matrix3d(first_value: ot.matrix3d, second_value: ot.matrix3d) -> ot.matrix3d:
"""Takes in two matrix3d values and outputs the sum of them.
The types of both inputs and the return value are numpy.ndarray(shape=(3,3), dtype=numpy.float64). When put
into Fabric and USD the values are stored as a list of 9 double-precision values.
"""
return first_value + second_value
matrixd[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_matrix3darray(first_value: ot.matrix3darray, second_value: ot.matrix3darray) -> ot.matrix3darray:
"""Takes in two matrix3darray values and outputs the sum of them.
The types of both inputs and the return value are numpy.ndarray(shape=(3,3,N), dtype=numpy.float64) where "N" is
the size of the array determined at runtime.. When put into Fabric the values are stored as an array of sets
of 9 double-precision values. USD stores it as the native matrix3d[] type.
"""
return first_value + second_value
matrixd[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_matrix4d(first_value: ot.matrix4d, second_value: ot.matrix4d) -> ot.matrix4d:
"""Takes in two matrix4d values and outputs the sum of them.
The types of both inputs and the return value are numpy.ndarray(shape=(4,4), dtype=numpy.float64). When put
into Fabric and USD the values are stored as a list of 9 double-precision values.
"""
return first_value + second_value
matrixd[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_matrix4darray(first_value: ot.matrix4darray, second_value: ot.matrix4darray) -> ot.matrix4darray:
"""Takes in two matrix4darray values and outputs the sum of them.
The types of both inputs and the return value are numpy.ndarray(shape=(4,4,N), dtype=numpy.float64) where "N" is
the size of the array determined at runtime.. When put into Fabric the values are stored as an array of sets
of 16 double-precision values. USD stores it as the native matrix4d[] type.
"""
return first_value + second_value
normald[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_normal3d(first_value: ot.normal3d, second_value: ot.normal3d) -> ot.normal3d:
"""Takes in two normald[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 the values are stored as 3 double-precision values. The normal role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
normald[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_normal3darray(first_value: ot.normal3darray, second_value: ot.normal3darray) -> ot.normal3darray:
"""Takes in two arrays of normal3d 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. The normal role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
normalf[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_normal3f(first_value: ot.normal3f, second_value: ot.normal3f) -> ot.normal3f:
"""Takes in two normalf[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 the values are stored as 3 single-precision values. The normal role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
normalf[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_normal3farray(first_value: ot.normal3farray, second_value: ot.normal3farray) -> ot.normal3farray:
"""Takes in two arrays of normal3f 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. The normal role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
normalh[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_normal3h(first_value: ot.normal3h, second_value: ot.normal3h) -> ot.normal3h:
"""Takes in two normalh[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 the values are stored as 3 half-precision values. The normal role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
normalh[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_normal3harray(first_value: ot.normal3harray, second_value: ot.normal3harray) -> ot.normal3harray:
"""Takes in two arrays of normal3h 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. The normal role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
pointd[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_point3d(first_value: ot.point3d, second_value: ot.point3d) -> ot.point3d:
"""Takes in two pointd[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 the values are stored as 3 double-precision values. The point role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
pointd[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_point3darray(first_value: ot.point3darray, second_value: ot.point3darray) -> ot.point3darray:
"""Takes in two arrays of point3d 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. The point role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
pointf[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_point3f(first_value: ot.point3f, second_value: ot.point3f) -> ot.point3f:
"""Takes in two pointf[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 the values are stored as 3 single-precision values. The point role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
pointf[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_point3farray(first_value: ot.point3farray, second_value: ot.point3farray) -> ot.point3farray:
"""Takes in two arrays of point3f 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. The point role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
pointh[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_point3h(first_value: ot.point3h, second_value: ot.point3h) -> ot.point3h:
"""Takes in two pointh[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 the values are stored as 3 half-precision values. The point role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
pointh[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_point3harray(first_value: ot.point3harray, second_value: ot.point3harray) -> ot.point3harray:
"""Takes in two arrays of point3h 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. The point role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
quatd[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_quatd(first_value: ot.quatd, second_value: ot.quatd) -> ot.quatd:
"""Takes in two quatd[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 the values are stored as 4 double-precision values. The quaternion role is applied to USD and OmniGraph
types as an aid to interpreting the values.
"""
return first_value + second_value
quatd[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_quatdarray(first_value: ot.quatdarray, second_value: ot.quatdarray) -> ot.quatdarray:
"""Takes in two arrays of quatd 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. The quaternion role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
quatf[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_quatf(first_value: ot.quatf, second_value: ot.quatf) -> ot.quatf:
"""Takes in two quatf[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 the values are stored as 4 single-precision values. The quaternion role is applied to USD and OmniGraph
types as an aid to interpreting the values.
"""
return first_value + second_value
quatf[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_quatfarray(first_value: ot.quatfarray, second_value: ot.quatfarray) -> ot.quatfarray:
"""Takes in two arrays of quatf 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. The quaternion role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
quath[4]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_quath(first_value: ot.quath, second_value: ot.quath) -> ot.quath:
"""Takes in two quath[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 the values are stored as 4 half-precision values. The quaternion role is applied to USD and OmniGraph
types as an aid to interpreting the values.
"""
return first_value + second_value
quath[4][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_quatharray(first_value: ot.quatharray, second_value: ot.quatharray) -> ot.quatharray:
"""Takes in two arrays of quath 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. The quaternion role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
texcoordd[2]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord2d(first_value: ot.texcoord2d, second_value: ot.texcoord2d) -> ot.texcoord2d:
"""Takes in two texcoordd[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 the values are stored as 2 double-precision values. The texcoord role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
texcoordd[2][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord2darray(
first_value: ot.texcoord2darray, second_value: ot.texcoord2darray
) -> ot.texcoord2darray:
"""Takes in two arrays of texcoord2d 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. The texcoord role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
texcoordf[2]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord2f(first_value: ot.texcoord2f, second_value: ot.texcoord2f) -> ot.texcoord2f:
"""Takes in two texcoordf[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 the values are stored as 2 single-precision values. The texcoord role is applied to USD and OmniGraph
types as an aid to interpreting the values.
"""
return first_value + second_value
texcoordf[2][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord2farray(
first_value: ot.texcoord2farray, second_value: ot.texcoord2farray
) -> ot.texcoord2farray:
"""Takes in two arrays of texcoord2f 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. The texcoord role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
texcoordh[2]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord2h(first_value: ot.texcoord2h, second_value: ot.texcoord2h) -> ot.texcoord2h:
"""Takes in two texcoordh[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 the values are stored as 2 half-precision values. The texcoord role is applied to USD and OmniGraph
types as an aid to interpreting the values.
"""
return first_value + second_value
texcoordh[2][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord2harray(
first_value: ot.texcoord2harray, second_value: ot.texcoord2harray
) -> ot.texcoord2harray:
"""Takes in two arrays of texcoord2h 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. The texcoord role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
texcoordd[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord3d(first_value: ot.texcoord3d, second_value: ot.texcoord3d) -> ot.texcoord3d:
"""Takes in two texcoordd[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 the values are stored as 3 double-precision values. The texcoord role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
texcoordd[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord3darray(
first_value: ot.texcoord3darray, second_value: ot.texcoord3darray
) -> ot.texcoord3darray:
"""Takes in two arrays of texcoord3d 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. The texcoord role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
texcoordf[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord3f(first_value: ot.texcoord3f, second_value: ot.texcoord3f) -> ot.texcoord3f:
"""Takes in two texcoordf[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 the values are stored as 3 single-precision values. The texcoord role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
texcoordf[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord3farray(
first_value: ot.texcoord3farray, second_value: ot.texcoord3farray
) -> ot.texcoord3farray:
"""Takes in two arrays of texcoord3f 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. The texcoord role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
texcoordh[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord3h(first_value: ot.texcoord3h, second_value: ot.texcoord3h) -> ot.texcoord3h:
"""Takes in two texcoordh[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 the values are stored as 3 half-precision values. The texcoord role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
texcoordh[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_texcoord3harray(
first_value: ot.texcoord3harray, second_value: ot.texcoord3harray
) -> ot.texcoord3harray:
"""Takes in two arrays of texcoord3h 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. The texcoord role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
timecode
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_timecode(first_value: ot.timecode, second_value: ot.timecode) -> ot.timecode:
"""Takes in two timecodes outputs the sum of them.
The types of both inputs and the return value are Python floats with the full precision required in order
to represent the range of legal timecodes. When put into Fabric and USD the values are stored as a
double-precision floating point value.
"""
return first_value + second_value
timecode[]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_timecodearray(first_value: ot.timecodearray, second_value: ot.timecodearray) -> ot.timecodearray:
"""Takes in two arrays of timecodes and returns an array containing the sum of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=numpy.float64) where "N" is
the size of the array determined at runtime.
"""
return first_value + second_value
vectord[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_vector3d(first_value: ot.vector3d, second_value: ot.vector3d) -> ot.vector3d:
"""Takes in two vectord[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 the values are stored as 3 double-precision values. The vector role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
vectord[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_vector3darray(first_value: ot.vector3darray, second_value: ot.vector3darray) -> ot.vector3darray:
"""Takes in two arrays of vector3d 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. The vector role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
vectorf[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_vector3f(first_value: ot.vector3f, second_value: ot.vector3f) -> ot.vector3f:
"""Takes in two vectorf[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 the values are stored as 3 single-precision values. The vector role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
vectorf[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_vector3farray(first_value: ot.vector3farray, second_value: ot.vector3farray) -> ot.vector3farray:
"""Takes in two arrays of vector3f 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. The vector role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
vectorh[3]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_vector3h(first_value: ot.vector3h, second_value: ot.vector3h) -> ot.vector3h:
"""Takes in two vectorh[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 the values are stored as 3 half-precision values. The vector role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
vectorh[3][]
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_vector3harray(first_value: ot.vector3harray, second_value: ot.vector3harray) -> ot.vector3harray:
"""Takes in two arrays of vector3h 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. The vector role is applied to USD and OmniGraph types
as an aid to interpreting the values.
"""
return first_value + second_value
bundle
import inspect
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_bundle(bundle: ot.bundle, added: ot.int) -> ot.bundle:
"""Takes in a bundle value and outputs a bundle containing everything in the input bundle plus a count
of "added" extra integer members named "added_0", "added_1", etc. Use the special value "added = 0" to
indicate that the bundle should be cleared.
The types of both inputs and the return value are og.BundleContents. When put into Fabric the bundle is
stored as a data bucket and in USD it is represented as a target or reference to a prim when connected.
Note how, since AutoNode definitions do not have direct access to the node, the inspect module must be
used to get at it in order to construct an output bundle.
"""
frame = inspect.currentframe().f_back
node = frame.f_locals.get("node")
context = frame.f_locals.get("context")
result = og.BundleContents(context, node, "outputs_out_0", read_only=False, gpu_by_default=False)
result.clear()
if bundle.valid:
result.bundle = bundle
if added > 0:
first_index = result.size
for index in range(added):
result.bundle.create_attribute(f"added_{index + first_index}", og.Type(og.BaseDataType.INT))
return result
execution
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_execution(first_trigger: ot.execution, second_trigger: ot.execution) -> ot.execution:
"""Takes two execution pins and triggers the output only when both of them are enabled.
The types of both inputs and the return value are Python ints as Python does not distinguish between
different precision levels. When put into Fabric and USD the values are stored as 32-bit precision
integer values.
"""
if first_trigger == og.ExecutionAttributeState.ENABLED and second_trigger == og.ExecutionAttributeState.ENABLED:
return og.ExecutionAttributeState.ENABLED
return og.ExecutionAttributeState.DISABLED
objectId
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_objectid(first_value: ot.objectid, second_value: ot.objectid) -> ot.objectid:
"""Takes in two objectId values and outputs the larger of them.
The types of both inputs and the return value are Python ints as Python does not distinguish between
different precision levels or signs. When put into Fabric and USD the values are stored as 64-bit
unsigned integer values.
"""
return first_value if first_value > second_value else second_value
objectId[]
import numpy as np
import omni.graph.core as og
import omni.graph.core.types as ot
@og.create_node_type
def autonode_objectidarray(first_value: ot.objectidarray, second_value: ot.objectidarray) -> ot.objectidarray:
"""Takes in two arrays of object IDs and returns an array containing the largest of each element.
The types of both inputs and the return value are numpy.ndarray(shape=(N,), dtype=numpy.uint64) where
"N" is the size of the array determined at runtime.
"""
return np.maximum(first_value, second_value)
target
import omni.graph.core as og
import omni.graph.core.types as ot
from usdrt import Sdf
@og.create_node_type
def autonode_target(target_values: ot.target) -> ot.target:
"""Takes in target values and outputs the targets resulting from appending "TestChild" to the target.
The types of both inputs and the return value are list[usdrt.Sdf.Path]. Unlike most other array types this
is represented as a list rather than a numpy array since the value type is not one supported by numpy.
When put into Fabric the value is stored as an SdfPath token, while USD uses the native rel type.
"""
return [target.AppendPath("Child") for target in target_values]