INodeCategories#
- class omni.graph.core.INodeCategories#
- Bases: - _INodeCategories- 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 - 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 - Attributes - category_count- __init__(*args, **kwargs)#
- Overloaded function. - __init__(self: omni.graph.core._omni_graph_core.INodeCategories, arg0: omni.core._core.IObject) -> None 
- __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,
- 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:
- Dictionary with categories as a name:description dictionary if it succeeded, else None 
- Return type:
- dict[str,str] 
 
 - static get_node_categories(node_id: object) object#
- Return the list of categories that have been applied to the node. - Parameters:
- node_id (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 
- Return type:
- list[str] 
 
 - static get_node_type_categories(
- node_type_id: object,
- Return the list of categories that have been applied to the node type. - Parameters:
- node_type_id (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 
- Return type:
- list[str] 
 
 - remove_category(
- self: omni.graph.core._omni_graph_core.INodeCategories,
- category_name: str,
- 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