created NodeInputArray parameter type
It seems unwise to let NodeInputs take more than one value, but at times it makes sense to create a list or array of inputs. This class will create sub-parameters as an easy way to provide variable inputs while also enforcing one connection per input parameter. This is also the primary motivation for the previous commit (disambiguating when a NodeParam's parent is a Node vs some other type).
This commit is contained in:
+12
-2
@@ -1,11 +1,21 @@
|
||||
#ifndef INPUTARRAY_H
|
||||
#define INPUTARRAY_H
|
||||
|
||||
#include "input.h"
|
||||
|
||||
class InputArray
|
||||
class NodeInputArray : public NodeInput
|
||||
{
|
||||
public:
|
||||
InputArray();
|
||||
NodeInputArray(const QString &id);
|
||||
|
||||
int GetSize() const;
|
||||
void SetSize(int size);
|
||||
|
||||
NodeInput* ParamAt(int index);
|
||||
|
||||
private:
|
||||
QVector<NodeInput*> sub_params_;
|
||||
|
||||
};
|
||||
|
||||
#endif // INPUTARRAY_H
|
||||
|
||||
Reference in New Issue
Block a user