timebased: transform keyframe times to global for snapping

This commit is contained in:
itsmattkc
2022-07-22 17:57:19 -07:00
parent a3cde5bd44
commit 925d63d707
6 changed files with 61 additions and 5 deletions
+9 -2
View File
@@ -865,9 +865,16 @@ bool TimeBasedWidget::SnapPoint(const std::vector<rational> &start_times, ration
continue;
}
qreal key_scene_pt = TimeToScene(key->time());
rational time = key->time();
if (const TimeTargetObject *target = GetKeyframeTimeTarget()) {
if (Node *parent = key->parent()) {
time = target->GetAdjustedTime(parent, target->GetTimeTarget(), time, false);
}
}
AttemptSnap(potential_snaps, screen_pt, key_scene_pt, start_times, key->time());
qreal key_scene_pt = TimeToScene(time);
AttemptSnap(potential_snaps, screen_pt, key_scene_pt, start_times, time);
}
}
}