Enzo
Loading...
Searching...
No Matches
enzo::nt::NodeType Struct Reference

Everything every node of one kind shares. More...

#include <NodeType.h>

Public Member Functions

const std::string & getName () const
 Returns the internal type name shared by all nodes of this type (eg. "copy_to_points")
 
std::string getFullName () const
 Returns the name that uniquely identifies this type (eg. "enzo::copy_to_points")
 
const std::string & getLabel () const
 Returns the human readable type label shown in the UI (eg. "Copy To Points")
 
bool hasChildScope () const
 Returns whether this node holds a scope of other nodes inside it.
 
bool hasMultiInputPort () const
 Returns whether the last declared port holds any number of inputs.
 
unsigned int getSinglePortCount () const
 Returns the number of ports that hold a single input each.
 
bool isMultiInputPortAt (unsigned int inputIndex) const
 Returns whether the input at this index belongs to the multi input port.
 
const InputPortgetPortAt (unsigned int inputIndex) const
 Returns the port holding an input.
 
std::filesystem::path getIconFile () const
 Returns the icon file on disk.
 

Public Attributes

std::string internalName
 
std::string typeNamespace
 The namespace the node was published under, such as "enzo".
 
std::string displayName
 
nodeConstructor ctorFunc = nullptr
 
std::vector< enzo::prm::Templatetemplates
 
std::vector< InputPortinputPorts
 The input ports the node declares, in the order their inputs run.
 
unsigned int maxOutputs = 1
 
std::vector< std::string > tags
 The words the tab menu searches on, such as "curve" or "primitive".
 
std::filesystem::path folder
 The folder the node was loaded from, which is also where its assets live.
 
std::string iconPath
 The icon file relative to the folder, empty when the node ships none.
 
std::string docsPath
 The documentation file relative to the folder, empty when there is none.
 
std::string childScopeType
 The kind of scope this node holds inside it, empty when it holds none.
 

Detailed Description

Everything every node of one kind shares.

A node type is what a grid node has in common with every other grid node, so the label, the parameters, the inputs and outputs, and the constructor that produces its behaviour. It comes from a node folder's manifest and is owned by the nt::NodeTypeTable, with each node holding a reference to it.

Member Function Documentation

◆ getFullName()

std::string enzo::nt::NodeType::getFullName ( ) const
inline

Returns the name that uniquely identifies this type (eg. "enzo::copy_to_points")

Note
This is the form saved scenes store and the form lookups take.

◆ getIconFile()

std::filesystem::path enzo::nt::NodeType::getIconFile ( ) const
inline

Returns the icon file on disk.

Returns
The full path, empty when the node ships no icon.

◆ getPortAt()

const InputPort * enzo::nt::NodeType::getPortAt ( unsigned int inputIndex) const
inline

Returns the port holding an input.

Returns
The declared port, or nothing when the index is past the last input.
Note
Every index at or above the multi input port's position belongs to it.

Member Data Documentation

◆ childScopeType

std::string enzo::nt::NodeType::childScopeType

The kind of scope this node holds inside it, empty when it holds none.

A node naming one can be entered and filled with other nodes, and the kind names what those nodes are allowed to be, so a "geometry" scope takes geometry nodes.

◆ typeNamespace

std::string enzo::nt::NodeType::typeNamespace

The namespace the node was published under, such as "enzo".

Note
Two authors may both publish a "circle" as long as their namespaces differ.

The documentation for this struct was generated from the following file: