1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Dead code tells no tales

This commit is contained in:
Rémi Verschelde
2017-08-27 21:07:15 +02:00
parent 37da8155a4
commit 7ad14e7a3e
215 changed files with 153 additions and 56138 deletions

View File

@@ -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) {