renderer/viewer: fixed playback and live updates from value changes

This commit is contained in:
itsmattkc
2020-05-15 15:02:30 +10:00
parent 8795e51452
commit 2039067fdc
17 changed files with 146 additions and 148 deletions
-4
View File
@@ -151,11 +151,7 @@ void MatrixGenerator::GizmoMove(const QPointF &p, const QVector2D &scale, const
gizmo_x2_dragger_.Drag(new_pos2.x());
gizmo_y2_dragger_.Drag(new_pos2.y());
InvalidateVisible(position_input_, position_input_);
}
InvalidateVisible(gizmo_drag_, gizmo_drag_);
}
void MatrixGenerator::GizmoRelease()
-2
View File
@@ -150,8 +150,6 @@ void PolygonGenerator::GizmoMove(const QPointF &p, const QVector2D &scale, const
gizmo_x_dragger_.Drag(new_pos.x());
gizmo_y_dragger_.Drag(new_pos.y());
InvalidateVisible(gizmo_drag_, gizmo_drag_);
}
void PolygonGenerator::GizmoRelease()
+4 -4
View File
@@ -61,9 +61,9 @@ void NodeInputDragger::Start(NodeInput *input, const rational &time, int track)
track);
// We disable default signal emitting during the drag
input_->blockSignals(true);
//input_->blockSignals(true);
input_->insert_keyframe(dragging_key_);
input_->blockSignals(false);
//input_->blockSignals(false);
emit input_->KeyframeAdded(dragging_key_);
}
@@ -76,7 +76,7 @@ void NodeInputDragger::Drag(const QVariant& value)
end_value_ = value;
input_->blockSignals(true);
//input_->blockSignals(true);
if (input_->is_keyframing()) {
dragging_key_->set_value(value);
@@ -84,7 +84,7 @@ void NodeInputDragger::Drag(const QVariant& value)
input_->set_standard_value(value, track_);
}
input_->blockSignals(false);
//input_->blockSignals(false);
}
void NodeInputDragger::End()
-13
View File
@@ -175,19 +175,6 @@ void Node::InvalidateCache(const TimeRange &range, NodeInput *from, NodeInput *s
SendInvalidateCache(range, source);
}
void Node::InvalidateVisible(NodeInput *from, NodeInput* source)
{
Q_UNUSED(from)
foreach (NodeParam* param, params_) {
if (param->type() == NodeParam::kOutput) {
foreach (NodeEdgePtr edge, param->edges()) {
edge->input()->parentNode()->InvalidateVisible(edge->input(), source);
}
}
}
}
TimeRange Node::InputTimeAdjustment(NodeInput *, const TimeRange &input_time) const
{
// Default behavior is no time adjustment at all
-5
View File
@@ -325,11 +325,6 @@ public:
*/
virtual void InvalidateCache(const TimeRange& range, NodeInput* from, NodeInput* source);
/**
* @brief Signal through node graph to only invalidate frames that are currently visible on a ViewerWidget
*/
virtual void InvalidateVisible(NodeInput *from, NodeInput* source);
/**
* @brief Adjusts time that should be sent to nodes connected to certain inputs.
*
-9
View File
@@ -99,15 +99,6 @@ void ViewerOutput::InvalidateCache(const TimeRange &range, NodeInput *from, Node
Node::InvalidateCache(range, from, source);
}
void ViewerOutput::InvalidateVisible(NodeInput* from, NodeInput *source)
{
if (from == texture_input()) {
emit VisibleInvalidated(source);
}
Node::InvalidateVisible(from, source);
}
void ViewerOutput::set_video_params(const VideoParams &video)
{
video_params_ = video;
-3
View File
@@ -63,7 +63,6 @@ public:
}
virtual void InvalidateCache(const TimeRange &range, NodeInput *from, NodeInput* source) override;
virtual void InvalidateVisible(NodeInput *from, NodeInput* source) override;
const VideoParams& video_params() const {
return video_params_;
@@ -115,8 +114,6 @@ signals:
void GraphChangedFrom(NodeInput* source);
void VisibleInvalidated(NodeInput* source);
void LengthChanged(const rational& length);
void SizeChanged(int width, int height);