2#include "Engine/Core/InstallPaths.h"
3#include "Engine/Parameter/Template.h"
14using nodeConstructor = NodeImpl* (*)(Node&, CookContext&);
25 bool multiInput =
false;
41 std::string internalName;
47 std::string displayName;
48 nodeConstructor ctorFunc =
nullptr;
49 std::vector<enzo::prm::Template> templates;
54 unsigned int maxOutputs = 1;
57 std::vector<std::string>
tags;
78 const std::string&
getName()
const {
return internalName; }
83 const std::string&
getLabel()
const {
return displayName; }
94 const auto declaredCount =
static_cast<unsigned int>(
inputPorts.size());
118 if (
iconPath.empty())
return getStaticDir() /
"icons" /
"nodeDefault.svg";
Everything every node of one kind shares.
Definition NodeType.h:40
std::filesystem::path folder
The folder the node was loaded from, which is also where its assets live.
Definition NodeType.h:60
bool hasChildScope() const
Returns whether this node holds a scope of other nodes inside it.
Definition NodeType.h:86
std::vector< InputPort > inputPorts
The input ports the node declares, in the order their inputs run.
Definition NodeType.h:52
bool hasMultiInputPort() const
Returns whether the last declared port holds any number of inputs.
Definition NodeType.h:89
std::string typeNamespace
The namespace the node was published under, such as "enzo".
Definition NodeType.h:45
std::vector< std::string > tags
The words the tab menu searches on, such as "curve" or "primitive".
Definition NodeType.h:57
std::filesystem::path getIconFile() const
Returns the icon file on disk.
Definition NodeType.h:116
std::string docsPath
The documentation file relative to the folder, empty when there is none.
Definition NodeType.h:66
unsigned int getSinglePortCount() const
Returns the number of ports that hold a single input each.
Definition NodeType.h:92
const std::string & getName() const
Returns the internal type name shared by all nodes of this type (eg. "copy_to_points")
Definition NodeType.h:78
std::string getFullName() const
Returns the name that uniquely identifies this type (eg. "enzo::copy_to_points")
Definition NodeType.h:81
const std::string & getLabel() const
Returns the human readable type label shown in the UI (eg. "Copy To Points")
Definition NodeType.h:83
bool isMultiInputPortAt(unsigned int inputIndex) const
Returns whether the input at this index belongs to the multi input port.
Definition NodeType.h:99
std::string iconPath
The icon file relative to the folder, empty when the node ships none.
Definition NodeType.h:63
std::string childScopeType
The kind of scope this node holds inside it, empty when it holds none.
Definition NodeType.h:74
const InputPort * getPortAt(unsigned int inputIndex) const
Returns the port holding an input.
Definition NodeType.h:107