GraphContext#
- class omni.graph.core.GraphContext#
Bases:
pybind11_object
Execution context for a graph
Methods
__init__
(*args, **kwargs)get_attribute_as_bool
(self, attribute[, ...])get_attribute_as_bool is deprecated.
get_attribute_as_boolarray
(self, attribute)get_attribute_as_boolarray is deprecated.
get_attribute_as_double
(self, attribute[, ...])get_attribute_as_double is deprecated.
get_attribute_as_doublearray
(self, attribute)get_attribute_as_doublearray is deprecated.
get_attribute_as_float
(self, attribute[, ...])get_attribute_as_float is deprecated.
get_attribute_as_floatarray
(self, attribute)get_attribute_as_floatarray is deprecated.
get_attribute_as_half
(self, attribute[, ...])get_attribute_as_half is deprecated.
get_attribute_as_halfarray
(self, attribute)get_attribute_as_halfarray is deprecated.
get_attribute_as_int
(self, arg0, arg1, arg2, ...)get_attribute_as_int is deprecated.
get_attribute_as_int64
(self, attribute[, ...])get_attribute_as_int64 is deprecated.
get_attribute_as_int64array
(self, attribute)get_attribute_as_int64array is deprecated.
get_attribute_as_intarray
(self, arg0, arg1, ...)get_attribute_as_intarray is deprecated.
get_attribute_as_nested_doublearray
(self, ...)get_attribute_as_nested_doublearray is deprecated.
get_attribute_as_nested_floatarray
(self, ...)get_attribute_as_nested_floatarray is deprecated.
get_attribute_as_nested_halfarray
(self, ...)get_attribute_as_nested_halfarray is deprecated.
get_attribute_as_nested_intarray
(self, attribute)get_attribute_as_nested_intarray is deprecated.
get_attribute_as_string
(self, attribute[, ...])get_attribute_as_string is deprecated.
get_attribute_as_uchar
(self, attribute[, ...])get_attribute_as_uchar is deprecated.
get_attribute_as_uchararray
(self, attribute)get_attribute_as_uchararray is deprecated.
get_attribute_as_uint
(self, attribute[, ...])get_attribute_as_uint is deprecated.
get_attribute_as_uint64
(self, attribute[, ...])get_attribute_as_uint64 is deprecated.
get_attribute_as_uint64array
(self, attribute)get_attribute_as_uint64array is deprecated.
get_attribute_as_uintarray
(self, attribute)get_attribute_as_uintarray is deprecated.
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)Gets the graph associated with this graph context
get_graph_target
(self[, index])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, inspector)Runs the inspector on the graph context
is_valid
(self)Checks to see if this graph context object is valid
set_bool_attribute
(self, arg0, arg1)set_bool_attribute is deprecated.
set_boolarray_attribute
(self, arg0, arg1)set_boolarray_attribute is deprecated.
set_double_attribute
(self, arg0, arg1)set_double_attribute is deprecated.
set_double_matrix_attribute
(self, arg0, arg1)set_double_matrix_attribute is deprecated.
set_doublearray_attribute
(self, arg0, arg1)set_doublearray_attribute is deprecated.
set_float_attribute
(self, arg0, arg1)set_float_attribute is deprecated.
set_floatarray_attribute
(self, arg0, arg1)set_floatarray_attribute is deprecated.
set_half_attribute
(self, arg0, arg1)set_half_attribute is deprecated.
set_halfarray_attribute
(self, arg0, arg1)set_halfarray_attribute is deprecated.
set_int64_attribute
(self, arg0, arg1)set_int64_attribute is deprecated.
set_int64array_attribute
(self, arg0, arg1)set_int64array_attribute is deprecated.
set_int_attribute
(self, arg0, arg1)set_int_attribute is deprecated.
set_intarray_attribute
(self, arg0, arg1)set_intarray_attribute is deprecated.
set_nested_doublearray_attribute
(self, arg0, ...)set_nested_doublearray_attribute is deprecated.
set_nested_floatarray_attribute
(self, arg0, arg1)set_nested_floatarray_attribute is deprecated.
set_nested_halfarray_attribute
(self, arg0, arg1)set_nested_halfarray_attribute is deprecated.
set_nested_intarray_attribute
(self, arg0, arg1)set_nested_intarray_attribute is deprecated.
set_string_attribute
(self, arg0, arg1)set_string_attribute is deprecated.
set_uchar_attribute
(self, arg0, arg1)set_uchar_attribute is deprecated.
set_uchararray_attribute
(self, arg0, arg1)set_uchararray_attribute is deprecated.
set_uint64_attribute
(self, arg0, arg1)set_uint64_attribute is deprecated.
set_uint64array_attribute
(self, arg0, arg1)set_uint64array_attribute is deprecated.
set_uint_attribute
(self, arg0, arg1)set_uint_attribute is deprecated.
set_uintarray_attribute
(self, arg0, arg1)set_uintarray_attribute is deprecated.
write_bucket_to_backing
(self, bucket_id)This method was internal, and is now obsolete: it does not function anymore.
- __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,
get_attribute_as_bool is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_boolarray is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_double is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_doublearray is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_float is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_floatarray is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_half is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_halfarray is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_int is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_int64 is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_int64array is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_intarray is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_nested_doublearray is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_nested_floatarray is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_nested_halfarray is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_nested_intarray is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_string is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_uchar is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_uchararray is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_uint is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_uint64 is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_uint64array is deprecated. Use og.Controller.get() instead.
- 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,
get_attribute_as_uintarray is deprecated. Use og.Controller.get() instead.
- get_bundle(
- self: omni.graph.core._omni_graph_core.GraphContext,
- path: str,
Get the bundle object as read-write.
- Parameters:
path (str) – the path to the bundle
- Returns:
The bundle object at the path, None if there isn’t one
- Return type:
- get_elapsed_time( ) float #
Returns the time between last evaluation of the graph and “now”
- Returns:
the elapsed time
- Return type:
float
- get_elem_count(*args, **kwargs)#
Overloaded function.
get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, attribute_data: omni::graph::core::Py_AttributeData) -> int
get_elem_count is deprecated. Use og.Controller.get_array_size() instead.
get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute) -> int
get_elem_count is deprecated. Use og.Controller.get_array_size() instead.
- get_frame( ) float #
Returns the global playback time in frames
- Returns:
the global playback time in frames
- Return type:
float
- get_graph( ) omni.graph.core._omni_graph_core.Graph #
Gets the graph associated with this graph context
- Returns:
The graph associated with this graph context.
- Return type:
- get_graph_target(
- self: omni.graph.core._omni_graph_core.GraphContext,
- index: int = 18446744073709551614,
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.
- Parameters:
index (int) – The index of instance to fetch. By default, the graph context index is used.
- Returns:
The prim path of the current graph target.
- Return type:
str
- get_input_bundle(*args, **kwargs)#
Overloaded function.
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:
path (str): the path to the bundle
- Returns:
omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one
get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> 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 instance (int): an instance index when getting value on an instantiated graph
- Returns:
omni.graph.core.IConstBundle2: The bundle object at the path, None if there isn’t one
- get_input_target_bundles(
- self: omni.graph.core._omni_graph_core.GraphContext,
- node: omni.graph.core._omni_graph_core.Node,
- attribute_name: str,
- instance: int = 18446744073709551614,
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
instance (int) – an instance index when getting value on an instantiated graph
- Returns:
The list of input targets, as bundle objects.
- Return type:
- get_is_playing( ) bool #
Returns the state of global playback
- Returns:
True if playback has started, False is playback is stopped
- Return type:
bool
- get_output_bundle(*args, **kwargs)#
Overloaded function.
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:
path (str): the path to the bundle
- Returns:
omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one
get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> 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 instance (int): an instance index when getting value on an instantiated graph
- Returns:
omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one
- get_time( ) float #
Returns the global playback time
- Returns:
the global playback time in seconds
- Return type:
float
- get_time_since_start( ) float #
Returns the elapsed time since the app started
- Returns:
the number of seconds since the app started in seconds
- Return type:
float
- inspect(
- self: omni.graph.core._omni_graph_core.GraphContext,
- inspector: omni::core::Api<omni::inspect::IInspector_abi>,
Runs the inspector on the graph context
- Parameters:
inspector (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( ) bool #
Checks to see if this graph context object is valid
- Returns:
True if this object is valid
- Return type:
bool
- set_bool_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: bool,
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_bool_attribute is deprecated. Use og.Controller.set() instead.
- set_boolarray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[bool],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_boolarray_attribute is deprecated. Use og.Controller.set() instead.
- set_double_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: float,
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_double_attribute is deprecated. Use og.Controller.set() instead.
- set_double_matrix_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[float],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_double_matrix_attribute is deprecated. Use og.Controller.set() instead.
- set_doublearray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[float],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_doublearray_attribute is deprecated. Use og.Controller.set() instead.
- set_float_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: float,
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_float_attribute is deprecated. Use og.Controller.set() instead.
- set_floatarray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[float],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_floatarray_attribute is deprecated. Use og.Controller.set() instead.
- set_half_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: float,
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_half_attribute is deprecated. Use og.Controller.set() instead.
- set_halfarray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[float],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_halfarray_attribute is deprecated. Use og.Controller.set() instead.
- set_int64_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: int,
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_int64_attribute is deprecated. Use og.Controller.set() instead.
- set_int64array_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[int],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_int64array_attribute is deprecated. Use og.Controller.set() instead.
- set_int_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: int,
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_int_attribute is deprecated. Use og.Controller.set() instead.
- set_intarray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[int],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_intarray_attribute is deprecated. Use og.Controller.set() instead.
- set_nested_doublearray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[List[float]],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_nested_doublearray_attribute is deprecated. Use og.Controller.set() instead.
- set_nested_floatarray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[List[float]],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_nested_floatarray_attribute is deprecated. Use og.Controller.set() instead.
- set_nested_halfarray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[List[float]],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_nested_halfarray_attribute is deprecated. Use og.Controller.set() instead.
- set_nested_intarray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[List[int]],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_nested_intarray_attribute is deprecated. Use og.Controller.set() instead.
- set_string_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: str,
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_string_attribute is deprecated. Use og.Controller.set() instead.
- set_uchar_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: int,
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_uchar_attribute is deprecated. Use og.Controller.set() instead.
- set_uchararray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[int],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_uchararray_attribute is deprecated. Use og.Controller.set() instead.
- set_uint64_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: int,
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_uint64_attribute is deprecated. Use og.Controller.set() instead.
- set_uint64array_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[int],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_uint64array_attribute is deprecated. Use og.Controller.set() instead.
- set_uint_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: int,
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_uint_attribute is deprecated. Use og.Controller.set() instead.
- set_uintarray_attribute(
- self: omni.graph.core._omni_graph_core.GraphContext,
- arg0: List[int],
- arg1: omni.graph.core._omni_graph_core.Attribute,
set_uintarray_attribute is deprecated. Use og.Controller.set() instead.
- write_bucket_to_backing(
- self: omni.graph.core._omni_graph_core.GraphContext,
- bucket_id: omni::fabric::BucketId,
This method was internal, and is now obsolete: it does not function anymore. In order to write back to USD, you can directly use the USD API.