GraphContext

class omni.graph.core.GraphContext

Methods

__init__(*args, **kwargs)

get_attribute_as_bool(self, attribute[, ...])

Return the value of a boolean attribute.

get_attribute_as_boolarray(self, attribute)

Return the value of a bool array attribute.

get_attribute_as_double(self, attribute[, ...])

Return the value of a double attribute.

get_attribute_as_doublearray(self, attribute)

Return the value of a double array attribute.

get_attribute_as_doublearray_tensor(self, ...)

Return the value of a double array attributein tensor form.

get_attribute_as_float(self, attribute[, ...])

Return the value of a float attribute.

get_attribute_as_floatarray(self, attribute)

Return the value of a float array attribute.

get_attribute_as_floatarray_tensor(self, ...)

Return the value of a float array attribute in tensor form.

get_attribute_as_half(self, attribute[, ...])

Return the value of a half-precision float attribute

get_attribute_as_halfarray(self, attribute)

Set the value of an attribute that is an array of half-precision floats.

get_attribute_as_int(self, arg0, arg1, arg2, ...)

Return the value of an integer attribute

get_attribute_as_int64(self, attribute[, ...])

Return the value of a 64-bit integer attribute

get_attribute_as_int64array(self, attribute)

Return the value of a 64-bit integer array attribute.

get_attribute_as_intarray(self, arg0, arg1, ...)

Return the value of an integer array attribute.

get_attribute_as_intarray_tensor(self, arg0, ...)

Return the value of an integer array attribute.

get_attribute_as_nested_doublearray(self, ...)

Return the value of a double array having a component count greater than 1 (e.g.

get_attribute_as_nested_doublearray_tensor(...)

Return the value of a double array having a component count greater than 1 (e.g.

get_attribute_as_nested_floatarray(self, ...)

Return the value of a float array having a component count greater than 1 (e.g.

get_attribute_as_nested_floatarray_tensor(...)

Return the value of a float array having a component count greater than 1 (e.g.

get_attribute_as_nested_halfarray(self, ...)

Return the value of a half-precision float array having a component count greater than 1 (e.g.

get_attribute_as_nested_intarray(self, attribute)

Return the value of a int array having a component count greater than 1 (e.g.

get_attribute_as_nested_intarray_tensor(...)

Return the value of a int array having a component count greater than 1 (e.g.

get_attribute_as_string(self, attribute[, ...])

Return the value of a string attribute.

get_attribute_as_stringlist(self, attribute)

Return the value of a string list attribute.

get_attribute_as_uchar(self, attribute[, ...])

Return the value of an unsigned char attribute.

get_attribute_as_uchararray(self, attribute)

Return the value of an unsigned char array attribute.

get_attribute_as_uint(self, attribute[, ...])

Return the value of an unsigned integer attribute.

get_attribute_as_uint64(self, attribute[, ...])

Return the value of an unsigned 64-bit integer attribute.

get_attribute_as_uint64array(self, attribute)

Return the value of an unsigned 64-bit integer array attribute.

get_attribute_as_uintarray(self, attribute)

Return the value of an unsigned integer array attribute.

get_bundle(self, path)

Get the bundle object as read-write.

get_elapsed_time(self)

Returns the time between last evaluation of the graph and "now"

get_elem_count(*args, **kwargs)

Overloaded function.

get_frame(self)

Returns the global playback time in frames

get_graph(self)

Returns the graph associated with this graph context.

get_graph_target(self)

Get the Prim path of the graph target.

get_input_bundle(*args, **kwargs)

Overloaded function.

get_input_target_bundles(self, node, ...)

Get all input targets in the relationship with the given name on the specified compute node.

get_is_playing(self)

Returns the state of global playback

get_output_bundle(*args, **kwargs)

Overloaded function.

get_time(self)

Returns the global playback time

get_time_since_start(self)

Returns the elapsed time since the app started

inspect(self, arg0)

Runs the inspector on the graph context

is_valid(self)

Returns whether this compute graph context object is valid or not.

set_bool_attribute(self, arg0, arg1)

Set the value of a boolean attribute.

set_boolarray_attribute(self, arg0, arg1)

Set the value of a bool array attribute.

set_double_attribute(self, arg0, arg1)

Set the value of a double attribute.

set_double_matrix_attribute(self, arg0, arg1)

Set the value of a double matrix attribute The length of the list must match the expected type.

set_doublearray_attribute(self, arg0, arg1)

Set the value of a double array attribute.

set_float_attribute(self, arg0, arg1)

Set the value of a float attribute.

set_floatarray_attribute(self, arg0, arg1)

Set the value of a float array attribute.

set_half_attribute(self, arg0, arg1)

Set the value of a half-precision float attribute.

set_halfarray_attribute(self, arg0, arg1)

Set the value of a half-precision float array attribute.

set_int64_attribute(self, arg0, arg1)

Set the value of a 64-bit integer attribute.

set_int64array_attribute(self, arg0, arg1)

Set the value of a 64-bit integer array attribute.

set_int_attribute(self, arg0, arg1)

Set the value of an integer attribute.

set_intarray_attribute(self, arg0, arg1)

Set the value of an integer array attribute.

set_nested_doublearray_attribute(self, arg0, ...)

Set the value of a double array attribute with component count > 1 (e.g.

set_nested_floatarray_attribute(self, arg0, arg1)

Set the value of a float array attribute with component count > 1 (e.g.

set_nested_halfarray_attribute(self, arg0, arg1)

Set the value of a half-precision float array attribute with component count > 1 (e.g.

set_nested_intarray_attribute(self, arg0, arg1)

Set the value of an integer array attribute.

set_string_attribute(self, arg0, arg1)

Set the value of a string attribute.

set_stringarray_attribute(self, arg0, arg1)

Set the value of a string array attribute.

set_uchar_attribute(self, arg0, arg1)

Set the value of an unsigned char attribute.

set_uchararray_attribute(self, arg0, arg1)

Set the value of an unsigned char array attribute.

set_uint64_attribute(self, arg0, arg1)

Set the value of an unsigned 64-bit integer attribute.

set_uint64array_attribute(self, arg0, arg1)

Set the value of a 64-bit unsigned integer array attribute.

set_uint_attribute(self, arg0, arg1)

Set the value of an unsigned integer attribute.

set_uintarray_attribute(self, arg0, arg1)

Set the value of an unsigned integer array attribute.

write_bucket_to_backing(self, arg0)

Forces the given bucket to be written to the backing storage.

__init__(*args, **kwargs)
get_attribute_as_bool(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) bool

Return the value of a boolean attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(bool)

get_attribute_as_boolarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[bool]

Return the value of a bool array attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[int])

get_attribute_as_double(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) float

Return the value of a double attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(float)

get_attribute_as_doublearray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.float64]

Return the value of a double array attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

Returns

Value of the attribute

Return type

(numpy.array[float])

get_attribute_as_doublearray_tensor(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, is_on_gpu: bool = False, write: bool = False, write_element_count: int = 0) PyTorchTensor<double>

Return the value of a double array attributein tensor form.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not the tensor is on the GPU

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(PyTorch[float])

get_attribute_as_float(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) float

Return the value of a float attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(float)

get_attribute_as_floatarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.float32]

Return the value of a float array attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[float])

get_attribute_as_floatarray_tensor(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, is_on_gpu: bool = False, write: bool = False, write_element_count: int = 0) PyTorchTensor<float>

Return the value of a float array attribute in tensor form.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not the tensor is on the GPU

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(PyTorch[float])

get_attribute_as_half(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) float

Return the value of a half-precision float attribute

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute as a float

Return type

(float)

get_attribute_as_halfarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.float32]

Set the value of an attribute that is an array of half-precision floats.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[float])

get_attribute_as_int(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute, arg1: bool, arg2: bool, arg3: int) int

Return the value of an integer attribute

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value.

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(int)

get_attribute_as_int64(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) int

Return the value of a 64-bit integer attribute

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value.

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(int)

get_attribute_as_int64array(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.int64]

Return the value of a 64-bit integer array attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

Returns

Value of the attribute

Return type

(numpy.array[int])

get_attribute_as_intarray(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute, arg1: bool, arg2: bool, arg3: int) numpy.ndarray[numpy.int32]

Return the value of an integer array attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[int])

get_attribute_as_intarray_tensor(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute, arg1: bool, arg2: bool, arg3: int) PyTorchTensor<int>

Return the value of an integer array attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[int])

get_attribute_as_nested_doublearray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.float64]

Return the value of a double array having a component count greater than 1 (e.g. double[3]).

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[double][double])

get_attribute_as_nested_doublearray_tensor(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute, arg1: bool, arg2: bool, arg3: int) PyTorchTensor<double>

Return the value of a double array having a component count greater than 1 (e.g. double[3]) as a tensor.

Parameters

attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

Returns

Value of the attribute

Return type

(PyTorch[double][double])

get_attribute_as_nested_floatarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.float32]

Return the value of a float array having a component count greater than 1 (e.g. float[3]).

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[float][float])

get_attribute_as_nested_floatarray_tensor(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute, arg1: bool, arg2: bool, arg3: int) PyTorchTensor<float>

Return the value of a float array having a component count greater than 1 (e.g. float[3]) as a tensor.

Parameters

attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

Returns

Value of the attribute

Return type

(PyTorch[float][float])

get_attribute_as_nested_halfarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.float32]

Return the value of a half-precision float array having a component count greater than 1 (e.g. half[3]).

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[float][float])

get_attribute_as_nested_intarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.int32]

Return the value of a int array having a component count greater than 1 (e.g. int[3]).

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[int][int])

get_attribute_as_nested_intarray_tensor(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute, arg1: bool, arg2: bool, arg3: int) PyTorchTensor<int>

Return the value of a int array having a component count greater than 1 (e.g. int[3]) as a tensor.

Parameters

attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

Returns

Value of the attribute

Return type

(PyTorch[float][float])

get_attribute_as_string(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) str

Return the value of a string attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(str)

get_attribute_as_stringlist(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) list

Return the value of a string list attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

list(str)

get_attribute_as_uchar(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) int

Return the value of an unsigned char attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(int)

get_attribute_as_uchararray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.uint8]

Return the value of an unsigned char array attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[int])

get_attribute_as_uint(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) int

Return the value of an unsigned integer attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(int)

get_attribute_as_uint64(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) int

Return the value of an unsigned 64-bit integer attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(int)

get_attribute_as_uint64array(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.uint64]

Return the value of an unsigned 64-bit integer array attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[int])

get_attribute_as_uintarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) numpy.ndarray[numpy.uint32]

Return the value of an unsigned integer array attribute.

Parameters
  • attribute (omni.graph.core.Attribute) – The attribute whose value is to be retrieved

  • getDefault (bool) – Whether or not to get the default value

  • write (bool) – Whether or not to get the value for writing

  • writeElemCount (int) – Number of elements to be written, if getting the value for writing

Returns

Value of the attribute

Return type

(numpy.array[int])

get_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) omni.graph.core._omni_graph_core.IBundle2

Get the bundle object as read-write.

Parameters

arg0 (str) – the path to the bundle

get_elapsed_time(self: omni.graph.core._omni_graph_core.GraphContext) float

Returns the time between last evaluation of the graph and “now”

Returns

the elapsed time

get_elem_count(*args, **kwargs)

Overloaded function.

  1. get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni::graph::core::Py_AttributeData) -> int

    Get the number of elements in an array attribute data.

    Args:

    arg0 (omni.graph.core.AttributeData): the attribute data identifying the location

    Returns:

    (int): The number of elements in the array attribute data

  2. get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute) -> int

    Get the number of elements in an array attribute.

    Args:

    attribute (omni.graph.core.Attribute): the attribute identifying the location

    Returns:

    (int): The number of elements in the array attribute

get_frame(self: omni.graph.core._omni_graph_core.GraphContext) float

Returns the global playback time in frames

Returns

the global playback time in frames

get_graph(self: omni.graph.core._omni_graph_core.GraphContext) omni.graph.core._omni_graph_core.Graph

Returns the graph associated with this graph context.

get_graph_target(self: omni.graph.core._omni_graph_core.GraphContext) str

Get the Prim path of the graph target.

The graph target is defined as the parent Prim of the compute graph, except during instancing - where OmniGraph executes a graph once for each Prim. In the case of instancing, the graph target will change at each execution to be the path of the instance. If this is called outside of graph execution, the path of the graph Prim is returned, or an empty token if the graph does not have a Prim associated with it.

Returns

(str) The prim path of the current graph target.

get_input_bundle(*args, **kwargs)

Overloaded function.

  1. get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) -> omni.graph.core._omni_graph_core.IConstBundle2

    Get the bundle object as read only.

    Args:

    arg0 (str): the path to the bundle

  2. get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str) -> omni.graph.core._omni_graph_core.IConstBundle2

    Get a bundle object that is an input attribute.

    Args:

    node (omni.graph.core.Node): the node on which the bundle can be found attribute_name (str): the name of the input attribute

get_input_target_bundles(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str) List[omni.graph.core._omni_graph_core.IConstBundle2]

Get all input targets in the relationship with the given name on the specified compute node.

The targets are returned as bundle objects.

Parameters
  • node (omni.graph.core.Node) – the node on which the input targets can be found

  • attribute_name (str) – the name of the relationship attribute

Returns

The list of input targets, as bundle objects.

Return type

List[og.IConstBundle]

get_is_playing(self: omni.graph.core._omni_graph_core.GraphContext) bool

Returns the state of global playback

Returns

True if playback has started, False is playback is stopped

get_output_bundle(*args, **kwargs)

Overloaded function.

  1. get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) -> omni.graph.core._omni_graph_core.IBundle2

    Get a bundle object that is an output attribute.

    Args:

    arg0 (str): the path to the bundle

  2. get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str) -> omni.graph.core._omni_graph_core.IBundle2

    Get a bundle object that is an output attribute.

    Args:

    node (omni.graph.core.Node): the node on which the bundle can be found attribute_name (str): the name of the output attribute

get_time(self: omni.graph.core._omni_graph_core.GraphContext) float

Returns the global playback time

Returns

the global playback time in seconds

get_time_since_start(self: omni.graph.core._omni_graph_core.GraphContext) float

Returns the elapsed time since the app started

Returns

the number of seconds since the app started in seconds

inspect(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni::core::Api<omni::inspect::IInspector_abi>) bool

Runs the inspector on the graph context

Parameters

arg0 (omni.inspect.Inspector) – The inspector to run

Returns

True if the inspector was successfully run on the context, False if it is not supported

Return type

(bool)

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

Returns whether this compute graph context object is valid or not.

set_bool_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: bool, arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a boolean attribute.

Parameters
set_boolarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[bool], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a bool array attribute.

Parameters
  • arg0 (List, numpy.array) – The list of values to set

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_double_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a double attribute.

Parameters
set_double_matrix_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a double matrix attribute The length of the list must match the expected type. For matrix2d, it’s 4, for matrix3d it’s 9, and for matrix4d, it’s 16

Parameters
  • arg0 (List, numpy.array) – The list of values in row major format representing a matrix to set

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a double array attribute.

Args :

arg0: The list of values to set arg1(omni.graph.core.Attribute): the attribute identifying the location

set_float_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a float attribute.

Parameters
set_floatarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a float array attribute.

Parameters
  • arg0 (List, numpy.array) – The list of values to set

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_half_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a half-precision float attribute.

Parameters
set_halfarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a half-precision float array attribute.

Parameters
  • arg0 (List, numpy.array) – The list of values to set

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_int64_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a 64-bit integer attribute.

Parameters
set_int64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a 64-bit integer array attribute.

Parameters
  • arg0 (List, numpy.array) – The list of values to set

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_int_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of an integer attribute.

Parameters
set_intarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of an integer array attribute.

Parameters
  • arg0 (List, numpy.array) – The list of values to set

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_nested_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a double array attribute with component count > 1 (e.g. double[3]).

Parameters
  • arg0 (List, numpy.array) – The list of nested values to set (array of array of 3 elements, for example)

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_nested_floatarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a float array attribute with component count > 1 (e.g. float[3]).

Parameters
  • arg0 (List, numpy.array) – The list of nested values to set (array of array of 3 elements, for example)

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_nested_halfarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a half-precision float array attribute with component count > 1 (e.g. half[3]).

Parameters
  • arg0 (List, numpy.array) – The list of nested values to set (array of array of 3 elements, for example)

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_nested_intarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[int]], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of an integer array attribute.

Parameters
  • arg0 (List, numpy.array) – The list of values to set

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_string_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: str, arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a string attribute.

Parameters
set_stringarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[str], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a string array attribute.

Parameters
set_uchar_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of an unsigned char attribute.

Parameters
set_uchararray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of an unsigned char array attribute.

Parameters
  • arg0 (List, numpy.array) – The list of values to set

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_uint64_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of an unsigned 64-bit integer attribute.

Parameters
set_uint64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of a 64-bit unsigned integer array attribute.

Parameters
  • arg0 (List, numpy.array) – The list of values to set

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

set_uint_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of an unsigned integer attribute.

Parameters
set_uintarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) None

Set the value of an unsigned integer array attribute.

Parameters
  • arg0 (List, numpy.array) – The list of values to set

  • arg1 (omni.graph.core.Attribute) – the attribute identifying the location

write_bucket_to_backing(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni::fabric::BucketId) None

Forces the given bucket to be written to the backing storage. Raises ValueError if the bucket could not be found.

Parameters

arg0 (int) – The bucket id of the bucket to be written