keyframeview: implemented transforming keyframe times to and from sequence time

Since the node graph can have transform cross nodes, input keyframes may occur
at a different times requiring transforming between sequence time and media
time. This commit implements such a mechanism in all UI classes that need it.
This commit is contained in:
itsmattkc
2020-03-26 19:17:46 +11:00
parent 592171cc31
commit 3399227b3a
27 changed files with 389 additions and 144 deletions
+13
View File
@@ -107,6 +107,8 @@ void CurveWidget::SetInput(NodeInput *input)
if (input_) {
bridge_ = new NodeParamViewWidgetBridge(input_, this);
bridge_->SetTimeTarget(GetTimeTarget());
for (int i=0;i<bridge_->widgets().size();i++) {
// Insert between two stretches to center the widget
widget_bridge_layout_->insertWidget(2 + i, bridge_->widgets().at(i));
@@ -165,6 +167,17 @@ void CurveWidget::ScaleChangedEvent(const double &scale)
view_->SetScale(scale);
}
void CurveWidget::TimeTargetChangedEvent(Node *target)
{
key_control_->SetTimeTarget(target);
view_->SetTimeTarget(target);
if (bridge_) {
bridge_->SetTimeTarget(target);
}
}
void CurveWidget::UpdateInputLabel()
{
if (input_) {