Commit 2a52e1fc authored by Chittesh Thavamani's avatar Chittesh Thavamani
Browse files

add move keyframe left/right buttons

parent 42b027ac
......@@ -472,6 +472,36 @@ void Animate::timeline(Manager& manager, Undo& undo, Scene& scene, Scene_Maybe o
undo.bundle_last(undo.n_actions() - n);
}
ImGui::SameLine();
if(ImGui::Button("Move Left") && current_frame > 0) {
if(camera_selected) {
undo.anim_clear_camera(anim_camera, (float)current_frame);
current_frame--;
undo.anim_camera(anim_camera, (float)current_frame, ui_camera.get());
camera_spline();
} else if(select) {
clear_item(*select);
current_frame--;
set_item(*select);
}
frame_changed = true;
}
ImGui::SameLine();
if(ImGui::Button("Move Right") && current_frame < max_frame-1) {
if(camera_selected) {
undo.anim_clear_camera(anim_camera, (float)current_frame);
current_frame++;
undo.anim_camera(anim_camera, (float)current_frame, ui_camera.get());
camera_spline();
} else if(select) {
clear_item(*select);
current_frame++;
set_item(*select);
}
frame_changed = true;
}
ImGui::Separator();
ImGui::Dummy({74.0f, 1.0f});
ImGui::SameLine();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment