| 583 | } |
| 584 | |
| 585 | std::optional<size_t> SequencerController::selectedKeyframe() const { |
| 586 | if (!selected_keyframe_id_.has_value()) |
| 587 | return std::nullopt; |
| 588 | |
| 589 | const auto index = timeline_.findKeyframeIndex(*selected_keyframe_id_); |
| 590 | if (!index.has_value()) |
| 591 | return std::nullopt; |
| 592 | |
| 593 | const auto* const keyframe = timeline_.getKeyframe(*index); |
| 594 | if (!keyframe || keyframe->is_loop_point) |
| 595 | return std::nullopt; |
| 596 | return index; |
| 597 | } |
| 598 | |
| 599 | sequencer::CameraState SequencerController::currentCameraState() const { |
| 600 | return timeline_.evaluate(playhead_); |