summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/item_list.cpp3
-rw-r--r--scene/gui/menu_button.cpp2
-rw-r--r--scene/gui/popup_menu.cpp2
-rw-r--r--scene/resources/packed_scene.cpp2
-rw-r--r--scene/resources/resource_format_text.cpp6
-rw-r--r--scene/resources/tile_set.cpp2
6 files changed, 9 insertions, 8 deletions
diff --git a/scene/gui/item_list.cpp b/scene/gui/item_list.cpp
index 4215c9aff4..8470003b3e 100644
--- a/scene/gui/item_list.cpp
+++ b/scene/gui/item_list.cpp
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "item_list.h"
+
#include "core/config/project_settings.h"
#include "core/os/os.h"
#include "core/string/translation.h"
@@ -1605,7 +1606,7 @@ void ItemList::_bind_methods() {
ClassDB::bind_method(D_METHOD("move_item", "from_idx", "to_idx"), &ItemList::move_item);
- ClassDB::bind_method(D_METHOD("set_item_count"), &ItemList::set_item_count);
+ ClassDB::bind_method(D_METHOD("set_item_count", "count"), &ItemList::set_item_count);
ClassDB::bind_method(D_METHOD("get_item_count"), &ItemList::get_item_count);
ClassDB::bind_method(D_METHOD("remove_item", "idx"), &ItemList::remove_item);
diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp
index 2561d10f25..39c7b04955 100644
--- a/scene/gui/menu_button.cpp
+++ b/scene/gui/menu_button.cpp
@@ -203,7 +203,7 @@ void MenuButton::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_switch_on_hover"), &MenuButton::is_switch_on_hover);
ClassDB::bind_method(D_METHOD("set_disable_shortcuts", "disabled"), &MenuButton::set_disable_shortcuts);
- ClassDB::bind_method(D_METHOD("set_item_count"), &MenuButton::set_item_count);
+ ClassDB::bind_method(D_METHOD("set_item_count", "count"), &MenuButton::set_item_count);
ClassDB::bind_method(D_METHOD("get_item_count"), &MenuButton::get_item_count);
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "switch_on_hover"), "set_switch_on_hover", "is_switch_on_hover");
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index 4fef292f2f..54af9f3885 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -1733,7 +1733,7 @@ void PopupMenu::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_item_shortcut", "idx"), &PopupMenu::get_item_shortcut);
ClassDB::bind_method(D_METHOD("get_current_index"), &PopupMenu::get_current_index);
- ClassDB::bind_method(D_METHOD("set_item_count"), &PopupMenu::set_item_count);
+ ClassDB::bind_method(D_METHOD("set_item_count", "count"), &PopupMenu::set_item_count);
ClassDB::bind_method(D_METHOD("get_item_count"), &PopupMenu::get_item_count);
ClassDB::bind_method(D_METHOD("remove_item", "idx"), &PopupMenu::remove_item);
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 60cda637ca..978be2d46e 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -1651,7 +1651,7 @@ Node *PackedScene::instantiate(GenEditState p_edit_state) const {
s->set_scene_instance_state(state);
}
- if (get_path() != "" && get_path().find("::") == -1) {
+ if (!is_built_in()) {
s->set_scene_file_path(get_path());
}
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 77d915aef9..ea3b72af1b 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -1492,7 +1492,7 @@ String ResourceFormatSaverTextInstance::_write_resource(const RES &res) {
} else {
if (internal_resources.has(res)) {
return "SubResource( \"" + internal_resources[res] + "\" )";
- } else if (res->get_path().length() && res->get_path().find("::") == -1) {
+ } else if (!res->is_built_in()) {
if (res->get_path() == local_path) { //circular reference attempt
return "null";
}
@@ -1515,7 +1515,7 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
return;
}
- if (!p_main && (!bundle_resources) && res->get_path().length() && res->get_path().find("::") == -1) {
+ if (!p_main && (!bundle_resources) && !res->is_built_in()) {
if (res->get_path() == local_path) {
ERR_PRINT("Circular reference to resource being saved found: '" + local_path + "' will be null next time it's loaded.");
return;
@@ -1728,7 +1728,7 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path, const RES &p_r
for (List<RES>::Element *E = saved_resources.front(); E; E = E->next()) {
RES res = E->get();
- if (E->next() && (res->get_path() == "" || res->get_path().find("::") != -1)) {
+ if (E->next() && res->is_built_in()) {
if (res->get_scene_unique_id() != "") {
if (used_unique_ids.has(res->get_scene_unique_id())) {
res->set_scene_unique_id(""); // Repeated.
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index d5eebb1fbf..5256803d56 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -212,7 +212,7 @@ void TileMapPattern::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_cell", "coords", "source_id", "atlas_coords", "alternative_tile"), &TileMapPattern::set_cell, DEFVAL(TileSet::INVALID_SOURCE), DEFVAL(TileSetSource::INVALID_ATLAS_COORDS), DEFVAL(TileSetSource::INVALID_TILE_ALTERNATIVE));
ClassDB::bind_method(D_METHOD("has_cell", "coords"), &TileMapPattern::has_cell);
- ClassDB::bind_method(D_METHOD("remove_cell", "coords"), &TileMapPattern::remove_cell);
+ ClassDB::bind_method(D_METHOD("remove_cell", "coords", "update_size"), &TileMapPattern::remove_cell);
ClassDB::bind_method(D_METHOD("get_cell_source_id", "coords"), &TileMapPattern::get_cell_source_id);
ClassDB::bind_method(D_METHOD("get_cell_atlas_coords", "coords"), &TileMapPattern::get_cell_atlas_coords);
ClassDB::bind_method(D_METHOD("get_cell_alternative_tile", "coords"), &TileMapPattern::get_cell_alternative_tile);