can visually see connections between parameters in the node view

This commit is contained in:
itsmattkc
2019-07-15 12:43:56 -04:00
parent 837d43fe07
commit 3ec133f254
8 changed files with 233 additions and 36 deletions
+10
View File
@@ -60,3 +60,13 @@ QList<NodeParam *> Node::parameters()
{
return static_qobjectlist_cast<NodeParam>(children());
}
int Node::ParameterCount()
{
return children().size();
}
int Node::IndexOfParameter(NodeParam *param)
{
return children().indexOf(param);
}
+11
View File
@@ -53,6 +53,17 @@ public:
*/
QList<NodeParam*> parameters();
/**
* @brief Return the current number of parameters
*/
int ParameterCount();
/**
* @brief Return the index of a parameter
* @return Parameter index or -1 if this parameter is not part of this Node
*/
int IndexOfParameter(NodeParam* param);
public slots:
virtual void Process(const rational& time) = 0;
};
+5
View File
@@ -45,6 +45,11 @@ Node *NodeParam::parent()
return static_cast<Node*>(QObject::parent());
}
int NodeParam::index()
{
return parent()->IndexOfParameter(this);
}
const QVector<NodeEdgePtr> &NodeParam::edges()
{
return edges_;
+2
View File
@@ -62,6 +62,8 @@ public:
Node* parent();
int index();
const QVector<NodeEdgePtr>& edges();
static bool AreDataTypesCompatible(const DataType& output_type, const DataType& input_type);