NodeType

class omni.graph.core.NodeType

Bases: pybind11_object

Definition of a node’s interface and structure

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.

defined_at_runtime(self)

Checks to see if this node type was defined at runtime or at build time

get_all_categories(self)

Gets the node type's categories

get_all_metadata(self)

Gets the node type's metadata

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)

Gets the number of metadata values set on the node type

get_node_type(self)

Get this node type's name

get_path(self)

Gets the path to the node type definition

get_scheduling_hints(self)

Gets the set of scheduling hints currently set on the node type.

has_state(self)

Checks to see if instantiations of the node type has internal state

inspect(self, inspector)

Runs the inspector on the node type

is_compound_node_type(self)

Checks to see if this node type defines a compound node type

is_valid(self)

Checks to see if this object 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
  • name (str) – The name of the input

  • type (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated For example, “double,float”

  • is_required (bool) – Whether the input is required or not

  • extended_type (omni.graph.core.ExtendedAttributeType) – The kind of extended attribute this is e.g. omni.graph.core.ExtendedAttributeType.EXTENDED_ATTR_TYPE_UNION

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
  • name (str) – The name of the output

  • type (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated For example, “double,float”

  • is_required (bool) – Whether the output is required or not

  • extended_type (omni.graph.core.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
  • name (str) – The name of the state attribute

  • type (str) – Extra information for the type - for union types, this is a list of types of this union, comma separated For example, “double,float”

  • is_required (bool) – Whether the state attribute is required or not

  • extended_type (omni.graph.core.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
  • name (str) – The name of the input

  • type (str) – The type name of the input

  • is_required (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
  • name (str) – The name of the output

  • type (str) – The type name of the output

  • is_required (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
  • name (str) – The name of the state

  • type (str) – The type name of the state

  • is_required (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)

defined_at_runtime(self: omni.graph.core._omni_graph_core.NodeType) bool

Checks to see if this node type was defined at runtime or at build time

Returns

True if this node type was defined at runtime.

Return type

bool

get_all_categories(self: omni.graph.core._omni_graph_core.NodeType) list

Gets the node type’s categories

Returns

A list of all categories associated with this node type

Return type

list[str]

get_all_metadata(self: omni.graph.core._omni_graph_core.NodeType) dict

Gets the node type’s metadata

Returns

A dictionary of name:value metadata on the node type

Return type

dict[str,str]

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, omni.graph.core.NodeType]

get_metadata(self: omni.graph.core._omni_graph_core.NodeType, key: str) str

Returns the metadata value for the given key.

Parameters

key (str) – The metadata keyword

Returns

Metadata value for the given keyword, or None if it is not defined

Return type

str | None

get_metadata_count(self: omni.graph.core._omni_graph_core.NodeType) int

Gets the number of metadata values set on the node type

Returns

The number of metadata values currently defined on the node type.

Return type

int

get_node_type(self: omni.graph.core._omni_graph_core.NodeType) str

Get this node type’s name

Returns

The name of this node type.

Return type

str

get_path(self: omni.graph.core._omni_graph_core.NodeType) str

Gets the path to the node type definition

Returns

The path to the node type prim. For compound node definitions, this is path on the stage to the OmniGraphSchema.CompoundNodeType_1 object that defines the compound. For other node types, the path returned is unique, but does not represent a valid Prim on the stage.

Return type

str

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

omni.graph.core.ISchedulingHints

has_state(self: omni.graph.core._omni_graph_core.NodeType) bool

Checks to see if instantiations of the node type has internal state

Returns

True if nodes of this type will have internal state data, False if not.

Return type

bool

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

inspector (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

Checks to see if this node type defines a compound node type

Returns

True if this node type is a compound node type, meaning its implementation is defined by an OmniGraph

Return type

bool

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

Checks to see if this object is valid

Returns

True if this node type object is valid.

Return type

bool

set_has_state(self: omni.graph.core._omni_graph_core.NodeType, has_state: bool) None

Sets the boolean indicating a node has state.

Parameters

has_state (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
  • key (str) – The metadata keyword

  • value (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 (omni.graph.core.ISchedulingHints) – New set of scheduling hints for the node type