Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Courses
Scotty3D
Commits
2a52e1fc
Commit
2a52e1fc
authored
Apr 23, 2021
by
Chittesh Thavamani
Browse files
add move keyframe left/right buttons
parent
42b027ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/gui/animate.cpp
View file @
2a52e1fc
...
...
@@ -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.0
f
,
1.0
f
});
ImGui
::
SameLine
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment