NodeType
- class omni.graph.core.NodeType
Methods
__init__
(*args, **kwargs)add_extended_input
(self, name, type, ...)Adds an extended input type to this node type.
add_extended_output
(self, name, type, ...)Adds an extended output type to this node type.
add_extended_state
(self, name, type, ...)Adds an extended state type to this node type.
add_input
(self, name, type, is_required[, ...])Adds an input to this node type.
add_output
(self, name, type, is_required[, ...])Adds an output to this node type.
add_state
(self, name, type, is_required[, ...])Adds an state to this node type.
get_all_categories
(self)Returns a list of all categories associated with this node type
get_all_metadata
(self)Returns a dictionary of metadata on the node type.
get_all_subnode_types
(self)Finds all subnode types of the current node type.
get_metadata
(self, key)Returns the metadata value for the given key.
get_metadata_count
(self)Returns the number of metadata values currently defined on the node type.
get_node_type
(self)Returns the name of the node type.
get_path
(self)- returns
(str) The path to the node type prim.
get_scheduling_hints
(self)Gets the set of scheduling hints currently set on the node type.
has_state
(self)Returns True if the node has internal state data, False if not.
inspect
(self, inspector)Runs the inspector on the node type
is_compound_node_type
(self)Returns True if this node type is a compound node type, meaning its implementation is defined by an OmniGraph
is_valid
(self)Returns whether the current node type is valid.
set_has_state
(self, has_state)Sets the boolean indicating a node has state.
set_metadata
(self, key, value)Sets the metadata value for the given key.
set_scheduling_hints
(self, scheduling_hints)Modify the scheduling hints defined on the node type.
- __init__(*args, **kwargs)
- add_extended_input(self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType) None
Adds an extended input type to this node type. Every node of this node type would then have this input.
- Parameters
arg0 (str) – The name of the input
arg1 (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated For example, “double,float”
getDefault (bool) – Whether the input is required or not
arg2 (ExtendedAttributeType) –
- add_extended_output(self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType) None
Adds an extended output type to this node type. Every node of this node type would then have this output.
- Parameters
arg0 (str) – The name of the output
arg1 (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated For example, “double,float”
getDefault (bool) – Whether the output is required or not
arg2 (ExtendedAttributeType) – The kind of extended attribute this is e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION
- add_extended_state(self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, extended_type: omni.graph.core._omni_graph_core.ExtendedAttributeType) None
Adds an extended state type to this node type. Every node of this node type would then have this state.
- Parameters
arg0 (str) – The name of the state
arg1 (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated For example, “double,float”
getDefault (bool) – Whether the state is required or not
arg2 (ExtendedAttributeType) – The kind of extended attribute this is e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION
- add_input(self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, default_value: object = None) None
Adds an input to this node type. Every node of this node type would then have this input.
- Parameters
arg0 (str) – The name of the input
arg1 (str) – The type name of the input
write (bool) – Whether the input is required or not
default_value (any) – Default value for the attribute if it is not explicitly set (None means no default)
- add_output(self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, default_value: object = None) None
Adds an output to this node type. Every node of this node type would then have this output.
- Parameters
arg0 (str) – The name of the output
arg1 (str) – The type name of the output
write (bool) – Whether the output is required or not
default_value (any) – Default value for the attribute if it is not explicitly set (None means no default)
- add_state(self: omni.graph.core._omni_graph_core.NodeType, name: str, type: str, is_required: bool, default_value: object = None) None
Adds an state to this node type. Every node of this node type would then have this state.
- Parameters
arg0 (str) – The name of the state
arg1 (str) – The type name of the state
write (bool) – Whether the state is required or not
default_value (any) – Default value for the attribute if it is not explicitly set (None means no default)
- get_all_categories(self: omni.graph.core._omni_graph_core.NodeType) list
Returns a list of all categories associated with this node type
- get_all_metadata(self: omni.graph.core._omni_graph_core.NodeType) dict
Returns a dictionary of metadata on the node type.
- get_all_subnode_types(self: omni.graph.core._omni_graph_core.NodeType) dict
Finds all subnode types of the current node type.
- Returns
Dictionary of type_name:type_object for all subnode types of this one
- Return type
(dict[str, og.NodeType])
- get_metadata(self: omni.graph.core._omni_graph_core.NodeType, key: str) str
Returns the metadata value for the given key.
- Parameters
arg0 (str) – The metadata keyword
- Returns
Metadata value for the given keyword, or None if it is not defined
- Return type
(str)
- get_metadata_count(self: omni.graph.core._omni_graph_core.NodeType) int
Returns the number of metadata values currently defined on the node type.
- get_node_type(self: omni.graph.core._omni_graph_core.NodeType) str
Returns the name of the node type.
- get_path(self: omni.graph.core._omni_graph_core.NodeType) str
- Returns
(str) The path to the node type prim.
For compound node definitions, this is path on the stage to the OmniGraphSchema.OmniGraphCompoundNodeType object that defines the compound.
For other node types, the path returned is unique, but does not represent a valid Prim on the stage.
- get_scheduling_hints(self: omni.graph.core._omni_graph_core.NodeType) omni.graph.core._omni_graph_core.ISchedulingHints
Gets the set of scheduling hints currently set on the node type.
- Returns
The scheduling hints for this node type
- Return type
(og.SchedulingHints)
- has_state(self: omni.graph.core._omni_graph_core.NodeType) bool
Returns True if the node has internal state data, False if not.
- inspect(self: omni.graph.core._omni_graph_core.NodeType, inspector: omni::core::Api<omni::inspect::IInspector_abi>) bool
Runs the inspector on the node type
- Parameters
arg0 (omni.inspect.Inspector) – The inspector to run
- Returns
True if the inspector was successfully run on the node type, False if it is not supported
- Return type
(bool)
- is_compound_node_type(self: omni.graph.core._omni_graph_core.NodeType) bool
Returns True if this node type is a compound node type, meaning its implementation is defined by an OmniGraph
- is_valid(self: omni.graph.core._omni_graph_core.NodeType) bool
Returns whether the current node type is valid.
- set_has_state(self: omni.graph.core._omni_graph_core.NodeType, has_state: bool) None
Sets the boolean indicating a node has state.
- Parameters
arg0 (bool) – Whether the node has state or not
- set_metadata(self: omni.graph.core._omni_graph_core.NodeType, key: str, value: str) bool
Sets the metadata value for the given key.
- Parameters
arg0 (str) – The metadata keyword
arg1 (str) – The value of the metadata
- set_scheduling_hints(self: omni.graph.core._omni_graph_core.NodeType, scheduling_hints: omni.graph.core._omni_graph_core.ISchedulingHints) None
Modify the scheduling hints defined on the node type.
- Parameters
scheduling_hints (og.SchedulingHints) – New set of scheduling hints for the node type