diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-09-03 14:53:17 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-09-03 14:54:15 -0300 |
commit | adde89e8b1c66b4f4814c3b47a5d347ff576428b (patch) | |
tree | 5ae201a8f957bb934a8386921c204a26491c5359 /scene | |
parent | 29db531fc8360b1e6d5e23008b208517b6d8c627 (diff) |
-Added an optimization so physics shapes are configured later, speeds up grid map loading and editing
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/mesh_library.cpp | 5 | ||||
-rw-r--r-- | scene/resources/mesh_library.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/scene/resources/mesh_library.cpp b/scene/resources/mesh_library.cpp index 4e1ffd2ab3..e1131e7e3e 100644 --- a/scene/resources/mesh_library.cpp +++ b/scene/resources/mesh_library.cpp @@ -214,7 +214,7 @@ Vector<int> MeshLibrary::get_item_list() const { return ret; } -int MeshLibrary::find_item_name(const String &p_name) const { +int MeshLibrary::find_item_by_name(const String &p_name) const { for (Map<int, Item>::Element *E = item_map.front(); E; E = E->next()) { @@ -275,6 +275,9 @@ void MeshLibrary::_bind_methods() { ClassDB::bind_method(D_METHOD("get_item_shapes", "id"), &MeshLibrary::_get_item_shapes); ClassDB::bind_method(D_METHOD("get_item_preview", "id"), &MeshLibrary::get_item_preview); ClassDB::bind_method(D_METHOD("remove_item", "id"), &MeshLibrary::remove_item); + ClassDB::bind_method(D_METHOD("remove_item", "id"), &MeshLibrary::remove_item); + ClassDB::bind_method(D_METHOD("find_item_by_name", "name"), &MeshLibrary::find_item_by_name); + ClassDB::bind_method(D_METHOD("clear"), &MeshLibrary::clear); ClassDB::bind_method(D_METHOD("get_item_list"), &MeshLibrary::get_item_list); ClassDB::bind_method(D_METHOD("get_last_unused_item_id"), &MeshLibrary::get_last_unused_item_id); diff --git a/scene/resources/mesh_library.h b/scene/resources/mesh_library.h index 99b6b48d61..c5d23ce50f 100644 --- a/scene/resources/mesh_library.h +++ b/scene/resources/mesh_library.h @@ -84,7 +84,7 @@ public: void clear(); - int find_item_name(const String &p_name) const; + int find_item_by_name(const String &p_name) const; Vector<int> get_item_list() const; int get_last_unused_item_id() const; |