use strings to connect nodes
This makes the node system somewhat more high-level with the intent of making working with them far more flexible and stable. By making the architecture more abstracted, it becomes far less rigid which should allow us to do even more with it and make it much less crash prone.
This commit is contained in:
@@ -33,9 +33,6 @@ public:
|
||||
|
||||
virtual Type type() const override;
|
||||
|
||||
NodeInput* out_block_input() const;
|
||||
NodeInput* in_block_input() const;
|
||||
|
||||
virtual void Retranslate() override;
|
||||
|
||||
rational in_offset() const;
|
||||
@@ -50,7 +47,11 @@ public:
|
||||
|
||||
virtual void Hash(QCryptographicHash& hash, const rational &time) const override;
|
||||
|
||||
virtual NodeValueTable Value(NodeValueDatabase &value) const override;
|
||||
virtual NodeValueTable Value(const QString& output, NodeValueDatabase &value) const override;
|
||||
|
||||
static const QString kOutBlockInput;
|
||||
static const QString kInBlockInput;
|
||||
static const QString kCurveInput;
|
||||
|
||||
protected:
|
||||
virtual void ShaderJobEvent(NodeValueDatabase &value, ShaderJob& job) const;
|
||||
@@ -59,6 +60,10 @@ protected:
|
||||
|
||||
double TransformCurve(double linear) const;
|
||||
|
||||
virtual void InputConnectedEvent(const QString& input, int element, const NodeOutput& output) override;
|
||||
|
||||
virtual void InputDisconnectedEvent(const QString& input, int element, const NodeOutput& output) override;
|
||||
|
||||
private:
|
||||
enum CurveType {
|
||||
kLinear,
|
||||
@@ -70,25 +75,10 @@ private:
|
||||
|
||||
void InsertTransitionTimes(AcceleratedJob* job, const double& time) const;
|
||||
|
||||
NodeInput* out_block_input_;
|
||||
|
||||
NodeInput* in_block_input_;
|
||||
|
||||
NodeInput* curve_input_;
|
||||
|
||||
Block* connected_out_block_;
|
||||
|
||||
Block* connected_in_block_;
|
||||
|
||||
private slots:
|
||||
void OutBlockConnected(Node* node);
|
||||
|
||||
void OutBlockDisconnected();
|
||||
|
||||
void InBlockConnected(Node* node);
|
||||
|
||||
void InBlockDisconnected();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user