summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/dictionary.cpp2
-rw-r--r--core/dictionary.h2
-rw-r--r--core/variant_call.cpp2
-rw-r--r--editor/editor_autoload_settings.cpp28
-rw-r--r--editor/icons/SCsub3
-rw-r--r--editor/icons/icon_a_a_b_b.svg (renamed from editor/icons/icon_aabb.svg)0
-rw-r--r--editor/icons/icon_nil.svg3
-rw-r--r--editor/icons/icon_range.svg5
-rw-r--r--editor/icons/icon_scroll_bar.svg5
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp6
-rw-r--r--editor/project_settings_editor.cpp8
-rw-r--r--editor/property_editor.cpp4
-rw-r--r--editor/property_editor.h4
-rw-r--r--editor/settings_config_dialog.cpp76
-rw-r--r--editor/settings_config_dialog.h6
-rw-r--r--modules/visual_script/visual_script_editor.cpp22
-rw-r--r--scene/3d/sprite_3d.cpp1
-rw-r--r--scene/main/node.cpp4
-rw-r--r--scene/register_scene_types.cpp6
19 files changed, 111 insertions, 76 deletions
diff --git a/core/dictionary.cpp b/core/dictionary.cpp
index 44fce2474f..66af6a1a9a 100644
--- a/core/dictionary.cpp
+++ b/core/dictionary.cpp
@@ -215,7 +215,7 @@ const Variant *Dictionary::next(const Variant *p_key) const {
return NULL;
}
-Dictionary Dictionary::copy() const {
+Dictionary Dictionary::duplicate() const {
Dictionary n;
diff --git a/core/dictionary.h b/core/dictionary.h
index c8177d5648..1d8ca0023e 100644
--- a/core/dictionary.h
+++ b/core/dictionary.h
@@ -74,7 +74,7 @@ public:
Array keys() const;
Array values() const;
- Dictionary copy() const;
+ Dictionary duplicate() const;
Dictionary(const Dictionary &p_from);
Dictionary();
diff --git a/core/variant_call.cpp b/core/variant_call.cpp
index 2b99a60ba5..0284c4d866 100644
--- a/core/variant_call.cpp
+++ b/core/variant_call.cpp
@@ -462,6 +462,7 @@ struct _VariantCall {
VCALL_LOCALMEM0R(Dictionary, hash);
VCALL_LOCALMEM0R(Dictionary, keys);
VCALL_LOCALMEM0R(Dictionary, values);
+ VCALL_LOCALMEM0R(Dictionary, duplicate);
VCALL_LOCALMEM2(Array, set);
VCALL_LOCALMEM1R(Array, get);
@@ -1607,6 +1608,7 @@ void register_variant_methods() {
ADDFUNC0R(DICTIONARY, INT, Dictionary, hash, varray());
ADDFUNC0R(DICTIONARY, ARRAY, Dictionary, keys, varray());
ADDFUNC0R(DICTIONARY, ARRAY, Dictionary, values, varray());
+ ADDFUNC0R(DICTIONARY, DICTIONARY, Dictionary, duplicate, varray());
ADDFUNC0R(ARRAY, INT, Array, size, varray());
ADDFUNC0R(ARRAY, BOOL, Array, empty, varray());
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index ae7ed7ce61..2796f776d7 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -548,34 +548,28 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
HBoxContainer *hbc = memnew(HBoxContainer);
add_child(hbc);
- VBoxContainer *vbc_path = memnew(VBoxContainer);
- vbc_path->set_h_size_flags(SIZE_EXPAND_FILL);
+ Label *l = memnew(Label);
+ l->set_text(TTR("Path:"));
+ hbc->add_child(l);
autoload_add_path = memnew(EditorLineEditFileChooser);
autoload_add_path->set_h_size_flags(SIZE_EXPAND_FILL);
-
autoload_add_path->get_file_dialog()->set_mode(EditorFileDialog::MODE_OPEN_FILE);
autoload_add_path->get_file_dialog()->connect("file_selected", this, "_autoload_file_callback");
+ hbc->add_child(autoload_add_path);
- vbc_path->add_margin_child(TTR("Path:"), autoload_add_path);
- hbc->add_child(vbc_path);
-
- VBoxContainer *vbc_name = memnew(VBoxContainer);
- vbc_name->set_h_size_flags(SIZE_EXPAND_FILL);
-
- HBoxContainer *hbc_name = memnew(HBoxContainer);
+ l = memnew(Label);
+ l->set_text(TTR("Node Name:"));
+ hbc->add_child(l);
autoload_add_name = memnew(LineEdit);
autoload_add_name->set_h_size_flags(SIZE_EXPAND_FILL);
- hbc_name->add_child(autoload_add_name);
+ hbc->add_child(autoload_add_name);
Button *add_autoload = memnew(Button);
add_autoload->set_text(TTR("Add"));
- hbc_name->add_child(add_autoload);
add_autoload->connect("pressed", this, "_autoload_add");
-
- vbc_name->add_margin_child(TTR("Node Name:"), hbc_name);
- hbc->add_child(vbc_name);
+ hbc->add_child(add_autoload);
tree = memnew(Tree);
tree->set_hide_root(true);
@@ -606,5 +600,7 @@ EditorAutoloadSettings::EditorAutoloadSettings() {
tree->connect("item_edited", this, "_autoload_edited");
tree->connect("button_pressed", this, "_autoload_button_pressed");
- add_margin_child(TTR("List:"), tree, true);
+ tree->set_v_size_flags(SIZE_EXPAND_FILL);
+
+ add_child(tree, true);
}
diff --git a/editor/icons/SCsub b/editor/icons/SCsub
index e28c229a38..0e4a4796ec 100644
--- a/editor/icons/SCsub
+++ b/editor/icons/SCsub
@@ -49,6 +49,9 @@ def make_editor_icons_action(target, source, env):
fname = str(f)
icon_name = os.path.basename(fname)[5:-4].title().replace("_", "")
+ # some special cases
+ if icon_name in ['Int', 'Bool', 'Float']:
+ icon_name = icon_name.lower()
if icon_name.endswith("MediumThumb"): # dont know a better way to handle this
thumb_medium_indices.append(str(index))
if icon_name.endswith("BigThumb"): # dont know a better way to handle this
diff --git a/editor/icons/icon_aabb.svg b/editor/icons/icon_a_a_b_b.svg
index 1af05f9b68..1af05f9b68 100644
--- a/editor/icons/icon_aabb.svg
+++ b/editor/icons/icon_a_a_b_b.svg
diff --git a/editor/icons/icon_nil.svg b/editor/icons/icon_nil.svg
new file mode 100644
index 0000000000..b266161c2b
--- /dev/null
+++ b/editor/icons/icon_nil.svg
@@ -0,0 +1,3 @@
+<svg width="16" height="12" version="1.1" viewBox="0 0 16 12" xmlns="http://www.w3.org/2000/svg">
+<path d="m8 2v2h2v-2zm4 0v5c0 1.6569 1.3431 3 3 3h1v-2h-1c-0.55228-9.6e-6 -0.99999-0.44772-1-1v-5zm-11 2v6h2v-4h1c0.55228 9.6e-6 0.99999 0.44772 1 1v3h2v-3c0-1.6569-1.3431-3-3-3zm7 2v4h2v-4z" fill="#e0e0e0"/>
+</svg>
diff --git a/editor/icons/icon_range.svg b/editor/icons/icon_range.svg
deleted file mode 100644
index 4bf0170e55..0000000000
--- a/editor/icons/icon_range.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m1 3v10h2v-4h2v2h2v-2h2v2h2v-2h2v4h2v-10h-2v4h-2v-2h-2v2h-2v-2h-2v2h-2v-4z" fill="#a5efac"/>
-</g>
-</svg>
diff --git a/editor/icons/icon_scroll_bar.svg b/editor/icons/icon_scroll_bar.svg
deleted file mode 100644
index c58c31464d..0000000000
--- a/editor/icons/icon_scroll_bar.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg">
-<g transform="translate(0 -1036.4)">
-<path transform="translate(0 1036.4)" d="m3 3c-1.1046 0-2 0.89543-2 2v6c0 1.1046 0.89543 2 2 2h10c1.1046 0 2-0.89543 2-2v-6c0-1.1046-0.89543-2-2-2h-10zm0 2h10v6h-10v-6zm1 1v4h4v-4h-4z" fill="#a5efac"/>
-</g>
-</svg>
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 019e32f847..d70f41d2e0 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -1348,14 +1348,14 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
if (SpatialEditor::get_singleton()->is_visible()) {
// 3D
spatial_edit_state = SpatialEditor::get_singleton()->get_state();
- Dictionary new_state = spatial_edit_state.copy();
+ Dictionary new_state = spatial_edit_state.duplicate();
new_state["show_grid"] = false;
new_state["show_origin"] = false;
Array orig_vp = spatial_edit_state["viewports"];
Array vp;
vp.resize(4);
for (int i = 0; i < vp.size(); i++) {
- Dictionary d = ((Dictionary)orig_vp[i]).copy();
+ Dictionary d = ((Dictionary)orig_vp[i]).duplicate();
d["use_environment"] = false;
d["doppler"] = false;
d["gizmos"] = onion.include_gizmos ? d["gizmos"] : Variant(false);
@@ -1368,7 +1368,7 @@ void AnimationPlayerEditor::_prepare_onion_layers_2() {
} else { // CanvasItemEditor
// 2D
canvas_edit_state = CanvasItemEditor::get_singleton()->get_state();
- Dictionary new_state = canvas_edit_state.copy();
+ Dictionary new_state = canvas_edit_state.duplicate();
new_state["show_grid"] = false;
new_state["show_rulers"] = false;
new_state["show_guides"] = false;
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 1a7b7f3575..6f8573cd70 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -1690,13 +1690,13 @@ ProjectSettingsEditor::ProjectSettingsEditor(EditorData *p_data) {
vbc->set_anchor_and_margin(MARGIN_LEFT, ANCHOR_BEGIN, 0);
vbc->set_anchor_and_margin(MARGIN_RIGHT, ANCHOR_END, 0);
- l = memnew(Label);
- vbc->add_child(l);
- l->set_text(TTR("Action:"));
-
hbc = memnew(HBoxContainer);
vbc->add_child(hbc);
+ l = memnew(Label);
+ hbc->add_child(l);
+ l->set_text(TTR("Action:"));
+
action_name = memnew(LineEdit);
action_name->set_h_size_flags(SIZE_EXPAND_FILL);
hbc->add_child(action_name);
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 623b0e15ab..47feac9a12 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -4599,7 +4599,7 @@ SectionedPropertyEditor::SectionedPropertyEditor() {
sections->set_v_size_flags(SIZE_EXPAND_FILL);
sections->set_hide_root(true);
- left_vb->add_margin_child(TTR("Sections:"), sections, true);
+ left_vb->add_child(sections, true);
VBoxContainer *right_vb = memnew(VBoxContainer);
right_vb->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -4608,7 +4608,7 @@ SectionedPropertyEditor::SectionedPropertyEditor() {
filter = memnew(SectionedPropertyEditorFilter);
editor = memnew(PropertyEditor);
editor->set_v_size_flags(SIZE_EXPAND_FILL);
- right_vb->add_margin_child(TTR("Properties:"), editor, true);
+ right_vb->add_child(editor, true);
editor->get_scene_tree()->set_column_titles_visible(false);
diff --git a/editor/property_editor.h b/editor/property_editor.h
index f684f5768d..115ce07339 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -314,9 +314,9 @@ public:
class SectionedPropertyEditorFilter;
-class SectionedPropertyEditor : public HBoxContainer {
+class SectionedPropertyEditor : public HSplitContainer {
- GDCLASS(SectionedPropertyEditor, HBoxContainer);
+ GDCLASS(SectionedPropertyEditor, HSplitContainer);
ObjectID obj;
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index fccd0c51aa..cc70a48f6f 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -100,6 +100,8 @@ void EditorSettingsDialog::popup_edit_settings() {
} else {
popup_centered_ratio(0.7);
}
+
+ _focus_current_search_box();
}
void EditorSettingsDialog::_clear_search_box() {
@@ -137,13 +139,18 @@ void EditorSettingsDialog::_notification(int p_what) {
undo_redo->set_commit_notify_callback(_undo_redo_callback, this);
} break;
case NOTIFICATION_ENTER_TREE: {
- clear_button->set_icon(get_icon("Close", "EditorIcons"));
- shortcut_clear_button->set_icon(get_icon("Close", "EditorIcons"));
+ _update_icons();
} break;
case NOTIFICATION_POPUP_HIDE: {
EditorSettings::get_singleton()->set("interface/dialogs/editor_settings_bounds", get_rect());
set_process_unhandled_input(false);
} break;
+ case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
+ _update_icons();
+ // Update theme colors.
+ property_editor->update_category_list();
+ _update_shortcuts();
+ } break;
}
}
@@ -179,6 +186,14 @@ void EditorSettingsDialog::_unhandled_input(const Ref<InputEvent> &p_event) {
}
}
+void EditorSettingsDialog::_update_icons() {
+
+ search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
+ shortcut_search_box->add_icon_override("right_icon", get_icon("Search", "EditorIcons"));
+ clear_button->set_icon(get_icon("Close", "EditorIcons"));
+ shortcut_clear_button->set_icon(get_icon("Close", "EditorIcons"));
+}
+
void EditorSettingsDialog::_update_shortcuts() {
shortcuts->clear();
@@ -329,6 +344,26 @@ void EditorSettingsDialog::_press_a_key_confirm() {
undo_redo->commit_action();
}
+void EditorSettingsDialog::_tabs_tab_changed(int p_tab) {
+
+ _focus_current_search_box();
+}
+
+void EditorSettingsDialog::_focus_current_search_box() {
+
+ Control *tab = tabs->get_current_tab_control();
+ LineEdit* current_search_box;
+ if (tab == tab_general)
+ current_search_box = search_box;
+ else if (tab == tab_shortcuts)
+ current_search_box = shortcut_search_box;
+
+ if (current_search_box) {
+ current_search_box->grab_focus();
+ current_search_box->select_all();
+ }
+}
+
void EditorSettingsDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_unhandled_input"), &EditorSettingsDialog::_unhandled_input);
@@ -342,6 +377,7 @@ void EditorSettingsDialog::_bind_methods() {
ClassDB::bind_method(D_METHOD("_update_shortcuts"), &EditorSettingsDialog::_update_shortcuts);
ClassDB::bind_method(D_METHOD("_press_a_key_confirm"), &EditorSettingsDialog::_press_a_key_confirm);
ClassDB::bind_method(D_METHOD("_wait_for_key"), &EditorSettingsDialog::_wait_for_key);
+ ClassDB::bind_method(D_METHOD("_tabs_tab_changed"), &EditorSettingsDialog::_tabs_tab_changed);
}
EditorSettingsDialog::EditorSettingsDialog() {
@@ -352,20 +388,19 @@ EditorSettingsDialog::EditorSettingsDialog() {
tabs = memnew(TabContainer);
tabs->set_tab_align(TabContainer::ALIGN_LEFT);
+ tabs->connect("tab_changed", this, "_tabs_tab_changed");
add_child(tabs);
//set_child_rect(tabs);
- VBoxContainer *vbc = memnew(VBoxContainer);
- tabs->add_child(vbc);
- vbc->set_name(TTR("General"));
+ // General Tab
+
+ tab_general = memnew(VBoxContainer);
+ tabs->add_child(tab_general);
+ tab_general->set_name(TTR("General"));
HBoxContainer *hbc = memnew(HBoxContainer);
hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- vbc->add_child(hbc);
-
- Label *l = memnew(Label);
- l->set_text(TTR("Search:") + " ");
- hbc->add_child(l);
+ tab_general->add_child(hbc);
search_box = memnew(LineEdit);
search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -381,20 +416,18 @@ EditorSettingsDialog::EditorSettingsDialog() {
property_editor->register_search_box(search_box);
property_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
property_editor->get_property_editor()->set_undo_redo(undo_redo);
- vbc->add_child(property_editor);
+ tab_general->add_child(property_editor);
property_editor->get_property_editor()->connect("property_edited", this, "_settings_property_edited");
- vbc = memnew(VBoxContainer);
- tabs->add_child(vbc);
- vbc->set_name(TTR("Shortcuts"));
+ // Shortcuts Tab
+
+ tab_shortcuts = memnew(VBoxContainer);
+ tabs->add_child(tab_shortcuts);
+ tab_shortcuts->set_name(TTR("Shortcuts"));
hbc = memnew(HBoxContainer);
hbc->set_h_size_flags(Control::SIZE_EXPAND_FILL);
- vbc->add_child(hbc);
-
- l = memnew(Label);
- l->set_text(TTR("Search:") + " ");
- hbc->add_child(l);
+ tab_shortcuts->add_child(hbc);
shortcut_search_box = memnew(LineEdit);
shortcut_search_box->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -406,7 +439,8 @@ EditorSettingsDialog::EditorSettingsDialog() {
shortcut_clear_button->connect("pressed", this, "_clear_shortcut_search_box");
shortcuts = memnew(Tree);
- vbc->add_margin_child(TTR("Shortcut List:"), shortcuts, true);
+ tab_shortcuts->add_child(shortcuts, true);
+ shortcuts->set_v_size_flags(SIZE_EXPAND_FILL);
shortcuts->set_columns(2);
shortcuts->set_hide_root(true);
//shortcuts->set_hide_folding(true);
@@ -419,7 +453,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
press_a_key->set_focus_mode(FOCUS_ALL);
add_child(press_a_key);
- l = memnew(Label);
+ Label *l = memnew(Label);
l->set_text(TTR("Press a Key.."));
l->set_anchors_and_margins_preset(Control::PRESET_WIDE);
l->set_align(Label::ALIGN_CENTER);
diff --git a/editor/settings_config_dialog.h b/editor/settings_config_dialog.h
index a03b15c06d..64b8833821 100644
--- a/editor/settings_config_dialog.h
+++ b/editor/settings_config_dialog.h
@@ -41,6 +41,8 @@ class EditorSettingsDialog : public AcceptDialog {
bool updating;
TabContainer *tabs;
+ Control *tab_general;
+ Control *tab_shortcuts;
LineEdit *search_box;
LineEdit *shortcut_search_box;
@@ -68,10 +70,14 @@ class EditorSettingsDialog : public AcceptDialog {
void _unhandled_input(const Ref<InputEvent> &p_event);
void _notification(int p_what);
+ void _update_icons();
void _press_a_key_confirm();
void _wait_for_key(const Ref<InputEvent> &p_event);
+ void _tabs_tab_changed(int p_tab);
+ void _focus_current_search_box();
+
void _clear_shortcut_search_box();
void _clear_search_box();
diff --git a/modules/visual_script/visual_script_editor.cpp b/modules/visual_script/visual_script_editor.cpp
index 0bb235436e..faf3aecbd4 100644
--- a/modules/visual_script/visual_script_editor.cpp
+++ b/modules/visual_script/visual_script_editor.cpp
@@ -228,7 +228,7 @@ protected:
if (String(p_name) == "type") {
- Dictionary dc = d.copy();
+ Dictionary dc = d.duplicate();
dc["type"] = p_value;
undo_redo->create_action(TTR("Set Variable Type"));
undo_redo->add_do_method(script.ptr(), "set_variable_info", var, dc);
@@ -241,7 +241,7 @@ protected:
if (String(p_name) == "hint") {
- Dictionary dc = d.copy();
+ Dictionary dc = d.duplicate();
dc["hint"] = p_value;
undo_redo->create_action(TTR("Set Variable Type"));
undo_redo->add_do_method(script.ptr(), "set_variable_info", var, dc);
@@ -254,7 +254,7 @@ protected:
if (String(p_name) == "hint_string") {
- Dictionary dc = d.copy();
+ Dictionary dc = d.duplicate();
dc["hint_string"] = p_value;
undo_redo->create_action(TTR("Set Variable Type"));
undo_redo->add_do_method(script.ptr(), "set_variable_info", var, dc);
@@ -481,9 +481,9 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Ref<Texture> type_icons[Variant::VARIANT_MAX] = {
Control::get_icon("Variant", "EditorIcons"),
- Control::get_icon("Bool", "EditorIcons"),
- Control::get_icon("Int", "EditorIcons"),
- Control::get_icon("Float", "EditorIcons"),
+ Control::get_icon("bool", "EditorIcons"),
+ Control::get_icon("int", "EditorIcons"),
+ Control::get_icon("float", "EditorIcons"),
Control::get_icon("String", "EditorIcons"),
Control::get_icon("Vector2", "EditorIcons"),
Control::get_icon("Rect2", "EditorIcons"),
@@ -491,7 +491,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
Control::get_icon("Transform2D", "EditorIcons"),
Control::get_icon("Plane", "EditorIcons"),
Control::get_icon("Quat", "EditorIcons"),
- Control::get_icon("Aabb", "EditorIcons"),
+ Control::get_icon("AABB", "EditorIcons"),
Control::get_icon("Basis", "EditorIcons"),
Control::get_icon("Transform", "EditorIcons"),
Control::get_icon("Color", "EditorIcons"),
@@ -775,9 +775,9 @@ void VisualScriptEditor::_update_members() {
Ref<Texture> type_icons[Variant::VARIANT_MAX] = {
Control::get_icon("Variant", "EditorIcons"),
- Control::get_icon("Bool", "EditorIcons"),
- Control::get_icon("Int", "EditorIcons"),
- Control::get_icon("Float", "EditorIcons"),
+ Control::get_icon("bool", "EditorIcons"),
+ Control::get_icon("int", "EditorIcons"),
+ Control::get_icon("float", "EditorIcons"),
Control::get_icon("String", "EditorIcons"),
Control::get_icon("Vector2", "EditorIcons"),
Control::get_icon("Rect2", "EditorIcons"),
@@ -785,7 +785,7 @@ void VisualScriptEditor::_update_members() {
Control::get_icon("Transform2D", "EditorIcons"),
Control::get_icon("Plane", "EditorIcons"),
Control::get_icon("Quat", "EditorIcons"),
- Control::get_icon("Aabb", "EditorIcons"),
+ Control::get_icon("AABB", "EditorIcons"),
Control::get_icon("Basis", "EditorIcons"),
Control::get_icon("Transform", "EditorIcons"),
Control::get_icon("Color", "EditorIcons"),
diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp
index 18ebc22c8b..2ecc445663 100644
--- a/scene/3d/sprite_3d.cpp
+++ b/scene/3d/sprite_3d.cpp
@@ -294,6 +294,7 @@ SpriteBase3D::SpriteBase3D() {
for (int i = 0; i < FLAG_MAX; i++)
flags[i] = i == FLAG_TRANSPARENT || i == FLAG_DOUBLE_SIDED;
+ alpha_cut = ALPHA_CUT_DISABLED;
axis = Vector3::AXIS_Z;
pixel_size = 0.01;
modulate = Color(1, 1, 1, 1);
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index af7a6bddd9..de1ab9959a 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2162,7 +2162,7 @@ Node *Node::_duplicate(int p_flags, Map<const Node *, Node *> *r_duplimap) const
Variant value = N->get()->get(name);
// Duplicate dictionaries and arrays, mainly needed for __meta__
if (value.get_type() == Variant::DICTIONARY) {
- value = Dictionary(value).copy();
+ value = Dictionary(value).duplicate();
} else if (value.get_type() == Variant::ARRAY) {
value = Array(value).duplicate();
}
@@ -2303,7 +2303,7 @@ void Node::_duplicate_and_reown(Node *p_new_parent, const Map<Node *, Node *> &p
Variant value = get(name);
// Duplicate dictionaries and arrays, mainly needed for __meta__
if (value.get_type() == Variant::DICTIONARY) {
- value = Dictionary(value).copy();
+ value = Dictionary(value).duplicate();
} else if (value.get_type() == Variant::ARRAY) {
value = Array(value).duplicate();
}
diff --git a/scene/register_scene_types.cpp b/scene/register_scene_types.cpp
index 9715e1d6a0..246283edcc 100644
--- a/scene/register_scene_types.cpp
+++ b/scene/register_scene_types.cpp
@@ -268,11 +268,11 @@ void register_scene_types() {
ClassDB::register_class<Control>();
ClassDB::register_class<Button>();
ClassDB::register_class<Label>();
- ClassDB::register_class<ScrollBar>();
+ ClassDB::register_virtual_class<ScrollBar>();
ClassDB::register_class<HScrollBar>();
ClassDB::register_class<VScrollBar>();
ClassDB::register_class<ProgressBar>();
- ClassDB::register_class<Slider>();
+ ClassDB::register_virtual_class<Slider>();
ClassDB::register_class<HSlider>();
ClassDB::register_class<VSlider>();
ClassDB::register_class<Popup>();
@@ -283,7 +283,7 @@ void register_scene_types() {
ClassDB::register_class<ToolButton>();
ClassDB::register_class<LinkButton>();
ClassDB::register_class<Panel>();
- ClassDB::register_class<Range>();
+ ClassDB::register_virtual_class<Range>();
OS::get_singleton()->yield(); //may take time to init