improved sequence creation

This commit is contained in:
itsmattkc
2019-09-27 03:38:21 +10:00
parent e0a483065a
commit 9806c772ac
7 changed files with 150 additions and 58 deletions
+5
View File
@@ -59,6 +59,11 @@ void NodeGraph::TakeNode(Node *node, QObject* new_parent)
return;
}
if (!node->CanBeDeleted()) {
qWarning() << "Tried to delete a Node that's been flagged as not deletable";
return;
}
node->DisconnectAll();
disconnect(node, SIGNAL(EdgeAdded(NodeEdgePtr)), this, SIGNAL(EdgeAdded(NodeEdgePtr)));
+12 -1
View File
@@ -25,7 +25,8 @@
#include "common/qobjectlistcast.h"
Node::Node() :
last_processed_time_(-1)
last_processed_time_(-1),
can_be_deleted_(true)
{
}
@@ -132,6 +133,16 @@ void Node::CopyInputs(Node *source, Node *destination)
}
}
bool Node::CanBeDeleted()
{
return can_be_deleted_;
}
void Node::SetCanBeDeleted(bool s)
{
can_be_deleted_ = s;
}
rational Node::LastProcessedTime()
{
rational t;
+15
View File
@@ -222,6 +222,16 @@ public:
*/
static void CopyInputs(Node* source, Node* destination);
/**
* @brief Return whether this Node can be deleted or not
*/
bool CanBeDeleted();
/**
* @brief Set whether
*/
void SetCanBeDeleted(bool s);
protected:
/**
* @brief Add a parameter to this node
@@ -317,6 +327,11 @@ private:
*/
QMutex run_lock_;
/**
* @brief Internal variable for whether this Node can be deleted or not
*/
bool can_be_deleted_;
private slots:
void InputChanged(rational start, rational end);
+4
View File
@@ -131,6 +131,10 @@ void RendererProcessor::InvalidateCache(const rational &start_range, const ratio
{
Q_UNUSED(from)
if (timebase_.isNull()) {
return;
}
//ClearCachedValuesInParameters(start_range, end_range);
texture_input_->ClearCachedValue();
length_input_->ClearCachedValue();