IVariable
- class omni.graph.core.IVariable
Bases:
omni.graph.core._omni_graph_core._IVariable
,omni.core._core.IObject
Methods
__init__
(*args, **kwargs)Overloaded function.
get
(self, graph_context, instance_path)- param graph_context
The GraphContext object to get the variable value from.
get_array
(self, graph_context, ...)- param graph_context
The GraphContext object to get the variable value from.
set
(self, graph_context, value, instance_path)Sets the value of the attribute data
Attributes
category
display_name
name
scope
source_path
tooltip
Gets the data type of the variable.
valid
- __init__(*args, **kwargs)
Overloaded function.
__init__(self: omni.graph.core._omni_graph_core.IVariable, arg0: omni.core._core.IObject) -> None
__init__(self: omni.graph.core._omni_graph_core.IVariable) -> None
- get(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, instance_path: str = None) object
- Parameters
graph_context (omni.graph.core.GraphContext) – The GraphContext object to get the variable value from.
instance_path (str) – Optional path to the prim instance to fetch the variable value for. By default this will fetch the variable value from the graph prim.
- Returns
Value of the attribute data
- Return type
(Any)
- get_array(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, get_for_write: bool = False, reserved_element_count: int = 0, instance_path: str = None) object
- Parameters
graph_context (omni.graph.core.GraphContext) – The GraphContext object to get the variable value from.
get_for_write (bool) – Should the data be retrieved for writing?
reserved_element_count (int) – If the data is to be retrieved for writing, preallocate this many elements
instance_path (str) – Optional path to the prim instance to fetch the variable value for. By default this will fetch the variable value from the graph prim.
- Returns
Value of the attribute’s data
- Return type
(Any)
- set(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, value: object, instance_path: str = None) bool
Sets the value of the attribute data
- Parameters
graph_context (omni.graph.core.GraphContext) – The GraphContext object to store the variable value.
on_gpu (bool) – Is the data to be set on the GPU?
instance_path (str) – Optional path to the prim instance to set the variable value on. By default this will set the variable value on the graph prim.
- Returns
True if the value was successfully set
- Return type
(bool)
- property type
Gets the data type of the variable.
- Returns
(og.Type) The data type of the variable.