can visually see connections between parameters in the node view
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -62,6 +62,8 @@ public:
|
||||
|
||||
Node* parent();
|
||||
|
||||
int index();
|
||||
|
||||
const QVector<NodeEdgePtr>& edges();
|
||||
|
||||
static bool AreDataTypesCompatible(const DataType& output_type, const DataType& input_type);
|
||||
|
||||
Reference in New Issue
Block a user