You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Add editor setting for default animation step
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
#include "scene/main/node.h"
|
||||
#include "scene/main/scene_tree.h"
|
||||
#include "scene/main/window.h"
|
||||
#include "scene/resources/animation.h"
|
||||
|
||||
// PRIVATE METHODS
|
||||
|
||||
@@ -918,6 +919,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
||||
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/polygon_editor/auto_bake_delay", 1.5, "-1.0,10.0,0.01");
|
||||
|
||||
// Animation
|
||||
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/animation/default_animation_step", Animation::DEFAULT_STEP, "0.0,10.0,0.00000001");
|
||||
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "editors/animation/default_fps_mode", 0, "Seconds,FPS");
|
||||
_initial_set("editors/animation/default_fps_compatibility", true);
|
||||
_initial_set("editors/animation/autorename_animation_tracks", true);
|
||||
|
||||
@@ -655,6 +655,8 @@ void AnimationPlayerEditor::_animation_name_edited() {
|
||||
if (current_anim.is_valid()) {
|
||||
new_anim->set_step(current_anim->get_step());
|
||||
}
|
||||
} else {
|
||||
new_anim->set_step(EDITOR_GET("editors/animation/default_animation_step"));
|
||||
}
|
||||
|
||||
String library_name;
|
||||
|
||||
Reference in New Issue
Block a user