summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-04-29 16:22:48 +0200
committerGitHub <noreply@github.com>2019-04-29 16:22:48 +0200
commit8cf193b5c2d160aeb7910c1e77ea395eb172c714 (patch)
tree9785a2d313adb0abdb721763829bc02ac61d9999 /editor
parentb1f824291b5c093f6f1e486e08fd101ab1865b64 (diff)
parent62e02629510902ee51dd36a5d4dd7ddeec158831 (diff)
Merge pull request #28480 from homer666/keyframe-fps-mode
Update edited keyframe's snap mode properly
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_track_editor.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 2376d08077..def55d6057 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -544,7 +544,7 @@ public:
if (use_fps && animation->get_step() > 0) {
float max_frame = animation->get_length() / animation->get_step();
- p_list->push_back(PropertyInfo(Variant::REAL, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",0.01"));
+ p_list->push_back(PropertyInfo(Variant::REAL, "frame", PROPERTY_HINT_RANGE, "0," + rtos(max_frame) + ",1"));
} else {
p_list->push_back(PropertyInfo(Variant::REAL, "time", PROPERTY_HINT_RANGE, "0," + rtos(animation->get_length()) + ",0.01"));
}
@@ -4122,6 +4122,7 @@ void AnimationTrackEditor::_update_key_edit() {
key_edit = memnew(AnimationTrackKeyEdit);
key_edit->animation = animation;
key_edit->track = selection.front()->key().track;
+ key_edit->use_fps = timeline->is_using_fps();
float ofs = animation->track_get_key_time(key_edit->track, selection.front()->key().key);
key_edit->key_ofs = ofs;