INodeCategories

class omni.graph.core.INodeCategories

Bases: omni.graph.core._omni_graph_core._INodeCategories, omni.core._core.IObject

Interface to the list of categories that a node type can belong to

Methods

__init__(*args, **kwargs)

Overloaded function.

define_category(self, category_name, ...)

Define a new category @param[in] categoryName Name of the new category @param[in] categoryDescription Description of the category @return false if there was already a category with the given name

get_all_categories()

Get the list of available categories and their descriptions.

get_node_categories(node_id)

Return the list of categories that have been applied to the node.

get_node_type_categories(node_type_id)

Return the list of categories that have been applied to the node type.

remove_category(self, category_name)

Remove an existing category, mainly to manage the ones created by a node type for itself @param[in] categoryName Name of the category to remove @return false if there was no category with the given name

Attributes

category_count

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: omni.graph.core._omni_graph_core.INodeCategories, arg0: omni.core._core.IObject) -> None

  2. __init__(self: omni.graph.core._omni_graph_core.INodeCategories) -> None

define_category(self: omni.graph.core._omni_graph_core.INodeCategories, category_name: str, category_description: str) bool

Define a new category @param[in] categoryName Name of the new category @param[in] categoryDescription Description of the category @return false if there was already a category with the given name

static get_all_categories() object

Get the list of available categories and their descriptions. :returns: description dictionary if it succeeded, else None :rtype: Dictionary with categories as a name

static get_node_categories(node_id: object) object

Return the list of categories that have been applied to the node.

Parameters

node_id (Union[str, Node]) – The node, or path to the node, whose categories are to be found

Returns

A list of category names applied to the node if it succeeded, else None

static get_node_type_categories(node_type_id: object) object

Return the list of categories that have been applied to the node type.

Parameters

node_type_id (Union[str, NodeType]) – The node type, or name of the node type, whose categories are to be found

Returns

A list of category names applied to the node type if it succeeded, else None

remove_category(self: omni.graph.core._omni_graph_core.INodeCategories, category_name: str) bool

Remove an existing category, mainly to manage the ones created by a node type for itself @param[in] categoryName Name of the category to remove @return false if there was no category with the given name