Basics¶
Flavors¶
-
NodegraphAPI.
AddNodeFlavor
(nodeType, flavor)¶ Tag a node type with a flavor. The flavor name is created if it has never been used. It is safe to tag the node multiple times with the same flavor, the tag is only recorded once. It is also safe to call this if the node type has never been registered.
Parameters: - nodeType –
str
of the node name - flavor –
str
of the flavor name
- nodeType –
-
NodegraphAPI.
ClearFlavorNodes
(flavor)¶ Untag all nodes from the flavor. All nodes types previously tagged with the flavor or untagged. This is safe to call if the flavor has never been defined.
Parameters: flavor – str
of the flavor name
-
NodegraphAPI.
GetAllFlavors
()¶ Untag all nodes from the flavor. Get a list of all defined flavors
Returns: list
-
NodegraphAPI.
GetFlavorNodes
(flavor, filterExists=False)¶ Get all node types tagged with a flavor. If the filterExists flag is passed as True, then only nodes types that have been registered will be returned. Otherwise node types may be returned that have been tagged but not defined.
Parameters: - flavor –
str
- filterExists –
bool
Returns: list
- flavor –
-
NodegraphAPI.
GetNodeFlavors
(nodeType)¶ Get all tagged flavors for a node type.
Parameters: nodeType – str
Returns: list
-
NodegraphAPI.
NodeMatchesFlavors
(nodeType, flavors, ignoreFlavors)¶ Return True if the node type matches the list of flavors. The flavors represent the required flavors to use, or None for all. The match will fail if ignoreFlavors is given and matches one of the flavors.
Parameters: - nodeType –
str
- flavors –
sequence
ofstr
- ignoreFlavors –
sequence
ofstr
Returns: bool
- nodeType –
-
NodegraphAPI.
RemoveNodeFlavor
(nodeType, flavor)¶ Untag a node type with a flavor. This is safe to call if the node has never been tagged with this flavor, or neither has been previously registered.
Parameters: - nodeType –
str
of the node name - flavor –
str
of the flavor name
- nodeType –