diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2017-08-27 21:07:15 +0200 |
|---|---|---|
| committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-08-27 22:13:45 +0200 |
| commit | 7ad14e7a3e6f87ddc450f7e34621eb5200808451 (patch) | |
| tree | 8804d0dd24cc126087462edfbbbf73ed61b56b0e /editor/plugins/animation_player_editor_plugin.cpp | |
| parent | 37da8155a4500a9386027b4d791a86186bc7ab4a (diff) | |
| download | redot-engine-7ad14e7a3e6f87ddc450f7e34621eb5200808451.tar.gz | |
Dead code tells no tales
Diffstat (limited to 'editor/plugins/animation_player_editor_plugin.cpp')
| -rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 05d926dcc8..cc7fc57cde 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -965,71 +965,6 @@ void AnimationPlayerEditor::_list_changed() { if (is_visible_in_tree()) _update_player(); } -#if 0 -void AnimationPlayerEditor::_editor_store() { - - if (animation->get_item_count()==0) - return; - String current = animation->get_item_text(animation->get_selected()); - Ref<Animation> anim = player->get_animation(current); - - if (key_editor->get_current_animation()==anim) - return; //already there - - - undo_redo->create_action("Store anim in editor"); - undo_redo->add_do_method(key_editor,"set_animation",anim); - undo_redo->add_undo_method(key_editor,"remove_animation",anim); - undo_redo->commit_action(); -} - -void AnimationPlayerEditor::_editor_load(){ - - Ref<Animation> anim = key_editor->get_current_animation(); - if (anim.is_null()) - return; - - String existing = player->find_animation(anim); - if (existing!="") { - _select_anim_by_name(existing); - return; //already has - } - - int count=1; - String base=anim->get_name(); - bool noname=false; - if (base=="") { - base="New Anim"; - noname=true; - } - - while(true) { - String attempt = base; - if (count>1) - attempt+=" ("+itos(count)+")"; - if (player->has_animation(attempt)) { - count++; - continue; - } - base=attempt; - break; - } - - if (noname) - anim->set_name(base); - - undo_redo->create_action("Add Animation From Editor"); - undo_redo->add_do_method(player,"add_animation",base,anim); - undo_redo->add_undo_method(player,"remove_animation",base); - undo_redo->add_do_method(this,"_animation_player_changed",player); - undo_redo->add_undo_method(this,"_animation_player_changed",player); - undo_redo->commit_action(); - - _select_anim_by_name(base); - - -} -#endif void AnimationPlayerEditor::_animation_key_editor_anim_len_changed(float p_len) { |
