diff options
| author | Rémi Verschelde | 2018-01-12 09:00:20 +0100 |
|---|---|---|
| committer | GitHub | 2018-01-12 09:00:20 +0100 |
| commit | e24f2c6489afdccc6268008d3dcc1ff4ad8ea71c (patch) | |
| tree | ee8faddef95f8bcb66acfce729a6f85513740b2d /editor | |
| parent | 00630479dd5e5aa95915fddf7df9c6b11f525b0e (diff) | |
| parent | ad79c703008394a360eb9875196a9414e1c84585 (diff) | |
| download | godot-e24f2c6489afdccc6268008d3dcc1ff4ad8ea71c.tar.gz godot-e24f2c6489afdccc6268008d3dcc1ff4ad8ea71c.tar.zst godot-e24f2c6489afdccc6268008d3dcc1ff4ad8ea71c.zip | |
Merge pull request #15611 from bojidar-bg/x-bind-more-properties
Bind many more properties to scripts
Diffstat (limited to 'editor')
| -rw-r--r-- | editor/editor_settings.cpp | 2 | ||||
| -rw-r--r-- | editor/plugins/animation_player_editor_plugin.cpp | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index d3e3269c4..86000d774 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -213,7 +213,7 @@ void EditorSettings::_get_property_list(List<PropertyInfo> *p_list) const { p_list->push_back(pi); } - p_list->push_back(PropertyInfo(Variant::ARRAY, "shortcuts", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR)); //do not edit + p_list->push_back(PropertyInfo(Variant::ARRAY, "shortcuts", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL)); //do not edit } void EditorSettings::_add_property_info_bind(const Dictionary &p_info) { diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp index 86b085b42..3593493d1 100644 --- a/editor/plugins/animation_player_editor_plugin.cpp +++ b/editor/plugins/animation_player_editor_plugin.cpp @@ -299,7 +299,7 @@ void AnimationPlayerEditor::_animation_selected(int p_which) { if (current != "") { - player->set_current_animation(current); + // player->set_current_animation(current, false); Ref<Animation> anim = player->get_animation(current); { @@ -654,7 +654,9 @@ Dictionary AnimationPlayerEditor::get_state() const { d["visible"] = is_visible_in_tree(); if (EditorNode::get_singleton()->get_edited_scene() && is_visible_in_tree() && player) { d["player"] = EditorNode::get_singleton()->get_edited_scene()->get_path_to(player); - d["animation"] = player->get_current_animation(); + } + if (animation->get_selected() >= 0 && animation->get_selected() < animation->get_item_count()) { + d["animation"] = animation->get_item_text(animation->get_selected()); } return d; |
