2#include "Engine/Parameter/Template.h"
13using nodeConstructor = NodeImpl* (*)(Node&, CookContext&);
24 bool multiInput =
false;
40 std::string internalName;
46 std::string displayName;
47 nodeConstructor ctorFunc =
nullptr;
48 std::vector<enzo::prm::Template> templates;
53 unsigned int maxOutputs = 1;
56 std::vector<std::string>
tags;
77 const std::string&
getName()
const {
return internalName; }
82 const std::string&
getLabel()
const {
return displayName; }
93 const auto declaredCount =
static_cast<unsigned int>(
inputPorts.size());
Everything every node of one kind shares.
Definition NodeType.h:39
std::filesystem::path folder
The folder the node was loaded from, which is also where its assets live.
Definition NodeType.h:59
bool hasChildScope() const
Returns whether this node holds a scope of other nodes inside it.
Definition NodeType.h:85
std::vector< InputPort > inputPorts
The input ports the node declares, in the order their inputs run.
Definition NodeType.h:51
bool hasMultiInputPort() const
Returns whether the last declared port holds any number of inputs.
Definition NodeType.h:88
std::string typeNamespace
The namespace the node was published under, such as "enzo".
Definition NodeType.h:44
std::vector< std::string > tags
The words the tab menu searches on, such as "curve" or "primitive".
Definition NodeType.h:56
std::filesystem::path getIconFile() const
Returns the icon file on disk.
Definition NodeType.h:115
std::string docsPath
The documentation file relative to the folder, empty when there is none.
Definition NodeType.h:65
unsigned int getSinglePortCount() const
Returns the number of ports that hold a single input each.
Definition NodeType.h:91
const std::string & getName() const
Returns the internal type name shared by all nodes of this type (eg. "copy_to_points")
Definition NodeType.h:77
std::string getFullName() const
Returns the name that uniquely identifies this type (eg. "enzo::copy_to_points")
Definition NodeType.h:80
const std::string & getLabel() const
Returns the human readable type label shown in the UI (eg. "Copy To Points")
Definition NodeType.h:82
bool isMultiInputPortAt(unsigned int inputIndex) const
Returns whether the input at this index belongs to the multi input port.
Definition NodeType.h:98
std::string iconPath
The icon file relative to the folder, empty when the node ships none.
Definition NodeType.h:62
std::string childScopeType
The kind of scope this node holds inside it, empty when it holds none.
Definition NodeType.h:73
const InputPort * getPortAt(unsigned int inputIndex) const
Returns the port holding an input.
Definition NodeType.h:106