summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_track_editor.cpp3
-rw-r--r--editor/code_editor.cpp2
-rw-r--r--editor/editor_audio_buses.cpp3
-rw-r--r--editor/editor_inspector.cpp3
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/editor_plugin.cpp5
-rw-r--r--editor/editor_plugin.h1
-rw-r--r--editor/editor_properties.cpp2
-rw-r--r--editor/icons/GPUParticlesAttractorBox3D.svg (renamed from editor/icons/GPUParticlesAttractorBox.svg)0
-rw-r--r--editor/icons/GPUParticlesAttractorSphere3D.svg (renamed from editor/icons/GPUParticlesAttractorSphere.svg)0
-rw-r--r--editor/icons/GPUParticlesAttractorVectorField3D.svg (renamed from editor/icons/GPUParticlesAttractorVectorField.svg)0
-rw-r--r--editor/icons/GPUParticlesCollisionBox3D.svg (renamed from editor/icons/GPUParticlesCollisionBox.svg)0
-rw-r--r--editor/icons/GPUParticlesCollisionHeightField3D.svg (renamed from editor/icons/GPUParticlesCollisionHeightField.svg)0
-rw-r--r--editor/icons/GPUParticlesCollisionSDF3D.svg (renamed from editor/icons/GPUParticlesCollisionSDF.svg)0
-rw-r--r--editor/icons/GPUParticlesCollisionSphere3D.svg (renamed from editor/icons/GPUParticlesCollisionSphere.svg)0
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp3
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp9
-rw-r--r--editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp42
-rw-r--r--editor/plugins/gpu_particles_collision_sdf_editor_plugin.h12
-rw-r--r--editor/plugins/node_3d_editor_gizmos.cpp24
-rw-r--r--editor/plugins/shader_editor_plugin.cpp16
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp2
-rw-r--r--editor/plugins/theme_editor_plugin.cpp6
-rw-r--r--editor/plugins/theme_editor_preview.cpp2
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.cpp6
-rw-r--r--editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp6
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp8
-rw-r--r--editor/project_manager.cpp2
29 files changed, 86 insertions, 75 deletions
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 0c2754ba74..a306fc20de 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -6117,8 +6117,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
track_vbox = memnew(VBoxContainer);
scroll->add_child(track_vbox);
track_vbox->set_h_size_flags(SIZE_EXPAND_FILL);
- scroll->set_enable_h_scroll(false);
- scroll->set_enable_v_scroll(true);
+ scroll->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
track_vbox->add_theme_constant_override("separation", 0);
HBoxContainer *bottom_hb = memnew(HBoxContainer);
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 1f01e9d4cf..0f6fdcdae5 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1854,7 +1854,7 @@ CodeTextEditor::CodeTextEditor() {
ScrollContainer *scroll = memnew(ScrollContainer);
scroll->set_h_size_flags(SIZE_EXPAND_FILL);
scroll->set_v_size_flags(SIZE_EXPAND_FILL);
- scroll->set_enable_v_scroll(false);
+ scroll->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
status_bar->add_child(scroll);
error = memnew(Label);
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 0d7a2eded9..656c219d1c 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -1298,8 +1298,7 @@ EditorAudioBuses::EditorAudioBuses() {
bus_scroll = memnew(ScrollContainer);
bus_scroll->set_v_size_flags(SIZE_EXPAND_FILL);
- bus_scroll->set_enable_h_scroll(true);
- bus_scroll->set_enable_v_scroll(false);
+ bus_scroll->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
add_child(bus_scroll);
bus_hb = memnew(HBoxContainer);
bus_hb->set_v_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index d61be38014..485a093aa1 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -3540,8 +3540,7 @@ EditorInspector::EditorInspector() {
main_vbox->set_h_size_flags(SIZE_EXPAND_FILL);
main_vbox->add_theme_constant_override("separation", 0);
add_child(main_vbox);
- set_enable_h_scroll(false);
- set_enable_v_scroll(true);
+ set_horizontal_scroll_mode(SCROLL_MODE_DISABLED);
wide_editors = false;
show_categories = false;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 9ffe677091..f06ef39bc3 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -7010,7 +7010,7 @@ EditorNode::EditorNode() {
add_editor_plugin(memnew(PhysicalBone3DEditorPlugin(this)));
add_editor_plugin(memnew(MeshEditorPlugin(this)));
add_editor_plugin(memnew(MaterialEditorPlugin(this)));
- add_editor_plugin(memnew(GPUParticlesCollisionSDFEditorPlugin(this)));
+ add_editor_plugin(memnew(GPUParticlesCollisionSDF3DEditorPlugin(this)));
add_editor_plugin(memnew(InputEventEditorPlugin(this)));
add_editor_plugin(memnew(SubViewportPreviewEditorPlugin(this)));
add_editor_plugin(memnew(TextControlEditorPlugin(this)));
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 61c01993ae..3261e6ddaf 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -166,6 +166,10 @@ void EditorInterface::edit_node(Node *p_node) {
EditorNode::get_singleton()->edit_node(p_node);
}
+void EditorInterface::edit_script(const Ref<Script> &p_script, int p_line, int p_col, bool p_grab_focus) {
+ ScriptEditor::get_singleton()->edit(p_script, p_line, p_col, p_grab_focus);
+}
+
void EditorInterface::open_scene_from_path(const String &scene_path) {
if (EditorNode::get_singleton()->is_changing_scene()) {
return;
@@ -326,6 +330,7 @@ void EditorInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_editor_scale"), &EditorInterface::get_editor_scale);
ClassDB::bind_method(D_METHOD("edit_resource", "resource"), &EditorInterface::edit_resource);
ClassDB::bind_method(D_METHOD("edit_node", "node"), &EditorInterface::edit_node);
+ ClassDB::bind_method(D_METHOD("edit_script", "script", "line", "column", "grab_focus"), &EditorInterface::edit_script, DEFVAL(-1), DEFVAL(0), DEFVAL(true));
ClassDB::bind_method(D_METHOD("open_scene_from_path", "scene_filepath"), &EditorInterface::open_scene_from_path);
ClassDB::bind_method(D_METHOD("reload_scene_from_path", "scene_filepath"), &EditorInterface::reload_scene_from_path);
ClassDB::bind_method(D_METHOD("play_main_scene"), &EditorInterface::play_main_scene);
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index 278059f8c4..a49e1bf229 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -74,6 +74,7 @@ public:
Control *get_editor_main_control();
void edit_resource(const Ref<Resource> &p_resource);
void edit_node(Node *p_node);
+ void edit_script(const Ref<Script> &p_script, int p_line = -1, int p_col = 0, bool p_grab_focus = true);
void open_scene_from_path(const String &scene_path);
void reload_scene_from_path(const String &scene_path);
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index b30168e5c3..5ba8dd17f1 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -3065,7 +3065,7 @@ void EditorPropertyResource::update_property() {
if (res.is_valid() && get_edited_object()->editor_is_section_unfolded(get_edited_property())) {
if (!sub_inspector) {
sub_inspector = memnew(EditorInspector);
- sub_inspector->set_enable_v_scroll(false);
+ sub_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
sub_inspector->set_use_doc_hints(true);
sub_inspector->set_sub_inspector(true);
diff --git a/editor/icons/GPUParticlesAttractorBox.svg b/editor/icons/GPUParticlesAttractorBox3D.svg
index 7a2ee7a6b9..7a2ee7a6b9 100644
--- a/editor/icons/GPUParticlesAttractorBox.svg
+++ b/editor/icons/GPUParticlesAttractorBox3D.svg
diff --git a/editor/icons/GPUParticlesAttractorSphere.svg b/editor/icons/GPUParticlesAttractorSphere3D.svg
index 2215331a18..2215331a18 100644
--- a/editor/icons/GPUParticlesAttractorSphere.svg
+++ b/editor/icons/GPUParticlesAttractorSphere3D.svg
diff --git a/editor/icons/GPUParticlesAttractorVectorField.svg b/editor/icons/GPUParticlesAttractorVectorField3D.svg
index 87b2b21804..87b2b21804 100644
--- a/editor/icons/GPUParticlesAttractorVectorField.svg
+++ b/editor/icons/GPUParticlesAttractorVectorField3D.svg
diff --git a/editor/icons/GPUParticlesCollisionBox.svg b/editor/icons/GPUParticlesCollisionBox3D.svg
index 4f7325d086..4f7325d086 100644
--- a/editor/icons/GPUParticlesCollisionBox.svg
+++ b/editor/icons/GPUParticlesCollisionBox3D.svg
diff --git a/editor/icons/GPUParticlesCollisionHeightField.svg b/editor/icons/GPUParticlesCollisionHeightField3D.svg
index 8bdc98a84b..8bdc98a84b 100644
--- a/editor/icons/GPUParticlesCollisionHeightField.svg
+++ b/editor/icons/GPUParticlesCollisionHeightField3D.svg
diff --git a/editor/icons/GPUParticlesCollisionSDF.svg b/editor/icons/GPUParticlesCollisionSDF3D.svg
index 00eca8295d..00eca8295d 100644
--- a/editor/icons/GPUParticlesCollisionSDF.svg
+++ b/editor/icons/GPUParticlesCollisionSDF3D.svg
diff --git a/editor/icons/GPUParticlesCollisionSphere.svg b/editor/icons/GPUParticlesCollisionSphere3D.svg
index cd188ddacc..cd188ddacc 100644
--- a/editor/icons/GPUParticlesCollisionSphere.svg
+++ b/editor/icons/GPUParticlesCollisionSphere3D.svg
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 6c5606fbfd..d65ed9cea2 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -226,8 +226,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
AnimationNodeAnimation::get_editable_animation_list = get_animation_list;
path_edit = memnew(ScrollContainer);
add_child(path_edit);
- path_edit->set_enable_h_scroll(true);
- path_edit->set_enable_v_scroll(false);
+ path_edit->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
path_hb = memnew(HBoxContainer);
path_edit->add_child(path_hb);
path_hb->add_child(memnew(Label(TTR("Path:"))));
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 1a216b3862..5cfd7525e5 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -288,8 +288,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
previews = memnew(ScrollContainer);
previews_bg->add_child(previews);
- previews->set_enable_v_scroll(false);
- previews->set_enable_h_scroll(true);
+ previews->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
preview_hb = memnew(HBoxContainer);
preview_hb->set_v_size_flags(Control::SIZE_EXPAND_FILL);
@@ -1431,8 +1430,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
library_scroll_bg->set_v_size_flags(Control::SIZE_EXPAND_FILL);
library_scroll = memnew(ScrollContainer);
- library_scroll->set_enable_v_scroll(true);
- library_scroll->set_enable_h_scroll(false);
+ library_scroll->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
library_scroll_bg->add_child(library_scroll);
@@ -1499,8 +1497,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
set_process_unhandled_key_input(true); // Global shortcuts since there is no main element to be focused.
downloads_scroll = memnew(ScrollContainer);
- downloads_scroll->set_enable_h_scroll(true);
- downloads_scroll->set_enable_v_scroll(false);
+ downloads_scroll->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
library_main->add_child(downloads_scroll);
downloads_hb = memnew(HBoxContainer);
downloads_scroll->add_child(downloads_hb);
diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
index 57279c57e7..c1a1e44ba2 100644
--- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.cpp
@@ -30,7 +30,7 @@
#include "gpu_particles_collision_sdf_editor_plugin.h"
-void GPUParticlesCollisionSDFEditorPlugin::_bake() {
+void GPUParticlesCollisionSDF3DEditorPlugin::_bake() {
if (col_sdf) {
if (col_sdf->get_texture().is_null() || !col_sdf->get_texture()->get_path().is_resource_file()) {
String path = get_tree()->get_edited_scene_root()->get_scene_file_path();
@@ -49,8 +49,8 @@ void GPUParticlesCollisionSDFEditorPlugin::_bake() {
}
}
-void GPUParticlesCollisionSDFEditorPlugin::edit(Object *p_object) {
- GPUParticlesCollisionSDF *s = Object::cast_to<GPUParticlesCollisionSDF>(p_object);
+void GPUParticlesCollisionSDF3DEditorPlugin::edit(Object *p_object) {
+ GPUParticlesCollisionSDF3D *s = Object::cast_to<GPUParticlesCollisionSDF3D>(p_object);
if (!s) {
return;
}
@@ -58,11 +58,11 @@ void GPUParticlesCollisionSDFEditorPlugin::edit(Object *p_object) {
col_sdf = s;
}
-bool GPUParticlesCollisionSDFEditorPlugin::handles(Object *p_object) const {
- return p_object->is_class("GPUParticlesCollisionSDF");
+bool GPUParticlesCollisionSDF3DEditorPlugin::handles(Object *p_object) const {
+ return p_object->is_class("GPUParticlesCollisionSDF3D");
}
-void GPUParticlesCollisionSDFEditorPlugin::_notification(int p_what) {
+void GPUParticlesCollisionSDF3DEditorPlugin::_notification(int p_what) {
if (p_what == NOTIFICATION_PROCESS) {
if (!col_sdf) {
return;
@@ -77,7 +77,7 @@ void GPUParticlesCollisionSDFEditorPlugin::_notification(int p_what) {
int data_size = 2;
const double size_mb = size.x * size.y * size.z * data_size / (1024.0 * 1024.0);
- // Add a qualitative measurement to help the user assess whether a GPUParticlesCollisionSDF node is using a lot of VRAM.
+ // Add a qualitative measurement to help the user assess whether a GPUParticlesCollisionSDF3D node is using a lot of VRAM.
String size_quality;
if (size_mb < 8.0) {
size_quality = TTR("Low");
@@ -101,7 +101,7 @@ void GPUParticlesCollisionSDFEditorPlugin::_notification(int p_what) {
}
}
-void GPUParticlesCollisionSDFEditorPlugin::make_visible(bool p_visible) {
+void GPUParticlesCollisionSDF3DEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
bake_hb->show();
set_process(true);
@@ -111,26 +111,26 @@ void GPUParticlesCollisionSDFEditorPlugin::make_visible(bool p_visible) {
}
}
-EditorProgress *GPUParticlesCollisionSDFEditorPlugin::tmp_progress = nullptr;
+EditorProgress *GPUParticlesCollisionSDF3DEditorPlugin::tmp_progress = nullptr;
-void GPUParticlesCollisionSDFEditorPlugin::bake_func_begin(int p_steps) {
+void GPUParticlesCollisionSDF3DEditorPlugin::bake_func_begin(int p_steps) {
ERR_FAIL_COND(tmp_progress != nullptr);
tmp_progress = memnew(EditorProgress("bake_sdf", TTR("Bake SDF"), p_steps));
}
-void GPUParticlesCollisionSDFEditorPlugin::bake_func_step(int p_step, const String &p_description) {
+void GPUParticlesCollisionSDF3DEditorPlugin::bake_func_step(int p_step, const String &p_description) {
ERR_FAIL_COND(tmp_progress == nullptr);
tmp_progress->step(p_description, p_step, false);
}
-void GPUParticlesCollisionSDFEditorPlugin::bake_func_end() {
+void GPUParticlesCollisionSDF3DEditorPlugin::bake_func_end() {
ERR_FAIL_COND(tmp_progress == nullptr);
memdelete(tmp_progress);
tmp_progress = nullptr;
}
-void GPUParticlesCollisionSDFEditorPlugin::_sdf_save_path_and_bake(const String &p_path) {
+void GPUParticlesCollisionSDF3DEditorPlugin::_sdf_save_path_and_bake(const String &p_path) {
probe_file->hide();
if (col_sdf) {
Ref<Image> bake_img = col_sdf->bake();
@@ -168,10 +168,10 @@ void GPUParticlesCollisionSDFEditorPlugin::_sdf_save_path_and_bake(const String
}
}
-void GPUParticlesCollisionSDFEditorPlugin::_bind_methods() {
+void GPUParticlesCollisionSDF3DEditorPlugin::_bind_methods() {
}
-GPUParticlesCollisionSDFEditorPlugin::GPUParticlesCollisionSDFEditorPlugin(EditorNode *p_node) {
+GPUParticlesCollisionSDF3DEditorPlugin::GPUParticlesCollisionSDF3DEditorPlugin(EditorNode *p_node) {
editor = p_node;
bake_hb = memnew(HBoxContainer);
bake_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -180,7 +180,7 @@ GPUParticlesCollisionSDFEditorPlugin::GPUParticlesCollisionSDFEditorPlugin(Edito
bake->set_flat(true);
bake->set_icon(editor->get_gui_base()->get_theme_icon(SNAME("Bake"), SNAME("EditorIcons")));
bake->set_text(TTR("Bake SDF"));
- bake->connect("pressed", callable_mp(this, &GPUParticlesCollisionSDFEditorPlugin::_bake));
+ bake->connect("pressed", callable_mp(this, &GPUParticlesCollisionSDF3DEditorPlugin::_bake));
bake_hb->add_child(bake);
add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU, bake_hb);
@@ -188,14 +188,14 @@ GPUParticlesCollisionSDFEditorPlugin::GPUParticlesCollisionSDFEditorPlugin(Edito
probe_file = memnew(EditorFileDialog);
probe_file->set_file_mode(EditorFileDialog::FILE_MODE_SAVE_FILE);
probe_file->add_filter("*.exr");
- probe_file->connect("file_selected", callable_mp(this, &GPUParticlesCollisionSDFEditorPlugin::_sdf_save_path_and_bake));
+ probe_file->connect("file_selected", callable_mp(this, &GPUParticlesCollisionSDF3DEditorPlugin::_sdf_save_path_and_bake));
get_editor_interface()->get_base_control()->add_child(probe_file);
probe_file->set_title(TTR("Select path for SDF Texture"));
- GPUParticlesCollisionSDF::bake_begin_function = bake_func_begin;
- GPUParticlesCollisionSDF::bake_step_function = bake_func_step;
- GPUParticlesCollisionSDF::bake_end_function = bake_func_end;
+ GPUParticlesCollisionSDF3D::bake_begin_function = bake_func_begin;
+ GPUParticlesCollisionSDF3D::bake_step_function = bake_func_step;
+ GPUParticlesCollisionSDF3D::bake_end_function = bake_func_end;
}
-GPUParticlesCollisionSDFEditorPlugin::~GPUParticlesCollisionSDFEditorPlugin() {
+GPUParticlesCollisionSDF3DEditorPlugin::~GPUParticlesCollisionSDF3DEditorPlugin() {
}
diff --git a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h
index 26b8b352d6..ce7ca18293 100644
--- a/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h
+++ b/editor/plugins/gpu_particles_collision_sdf_editor_plugin.h
@@ -36,10 +36,10 @@
#include "scene/3d/gpu_particles_collision_3d.h"
#include "scene/resources/material.h"
-class GPUParticlesCollisionSDFEditorPlugin : public EditorPlugin {
- GDCLASS(GPUParticlesCollisionSDFEditorPlugin, EditorPlugin);
+class GPUParticlesCollisionSDF3DEditorPlugin : public EditorPlugin {
+ GDCLASS(GPUParticlesCollisionSDF3DEditorPlugin, EditorPlugin);
- GPUParticlesCollisionSDF *col_sdf;
+ GPUParticlesCollisionSDF3D *col_sdf;
HBoxContainer *bake_hb;
Button *bake;
@@ -60,14 +60,14 @@ protected:
void _notification(int p_what);
public:
- virtual String get_name() const override { return "GPUParticlesCollisionSDF"; }
+ virtual String get_name() const override { return "GPUParticlesCollisionSDF3D"; }
bool has_main_screen() const override { return false; }
virtual void edit(Object *p_object) override;
virtual bool handles(Object *p_object) const override;
virtual void make_visible(bool p_visible) override;
- GPUParticlesCollisionSDFEditorPlugin(EditorNode *p_node);
- ~GPUParticlesCollisionSDFEditorPlugin();
+ GPUParticlesCollisionSDF3DEditorPlugin(EditorNode *p_node);
+ ~GPUParticlesCollisionSDF3DEditorPlugin();
};
#endif // GPU_PARTICLES_COLLISION_SDF_EDITOR_PLUGIN_H
diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp
index 1f5d68929a..32355735cc 100644
--- a/editor/plugins/node_3d_editor_gizmos.cpp
+++ b/editor/plugins/node_3d_editor_gizmos.cpp
@@ -2767,11 +2767,11 @@ int GPUParticlesCollision3DGizmoPlugin::get_priority() const {
String GPUParticlesCollision3DGizmoPlugin::get_handle_name(const EditorNode3DGizmo *p_gizmo, int p_id) const {
const Node3D *cs = p_gizmo->get_spatial_node();
- if (Object::cast_to<GPUParticlesCollisionSphere>(cs) || Object::cast_to<GPUParticlesAttractorSphere>(cs)) {
+ if (Object::cast_to<GPUParticlesCollisionSphere3D>(cs) || Object::cast_to<GPUParticlesAttractorSphere3D>(cs)) {
return "Radius";
}
- if (Object::cast_to<GPUParticlesCollisionBox>(cs) || Object::cast_to<GPUParticlesAttractorBox>(cs) || Object::cast_to<GPUParticlesAttractorVectorField>(cs) || Object::cast_to<GPUParticlesCollisionSDF>(cs) || Object::cast_to<GPUParticlesCollisionHeightField>(cs)) {
+ if (Object::cast_to<GPUParticlesCollisionBox3D>(cs) || Object::cast_to<GPUParticlesAttractorBox3D>(cs) || Object::cast_to<GPUParticlesAttractorVectorField3D>(cs) || Object::cast_to<GPUParticlesCollisionSDF3D>(cs) || Object::cast_to<GPUParticlesCollisionHeightField3D>(cs)) {
return "Extents";
}
@@ -2781,11 +2781,11 @@ String GPUParticlesCollision3DGizmoPlugin::get_handle_name(const EditorNode3DGiz
Variant GPUParticlesCollision3DGizmoPlugin::get_handle_value(const EditorNode3DGizmo *p_gizmo, int p_id) const {
const Node3D *cs = p_gizmo->get_spatial_node();
- if (Object::cast_to<GPUParticlesCollisionSphere>(cs) || Object::cast_to<GPUParticlesAttractorSphere>(cs)) {
+ if (Object::cast_to<GPUParticlesCollisionSphere3D>(cs) || Object::cast_to<GPUParticlesAttractorSphere3D>(cs)) {
return p_gizmo->get_spatial_node()->call("get_radius");
}
- if (Object::cast_to<GPUParticlesCollisionBox>(cs) || Object::cast_to<GPUParticlesAttractorBox>(cs) || Object::cast_to<GPUParticlesAttractorVectorField>(cs) || Object::cast_to<GPUParticlesCollisionSDF>(cs) || Object::cast_to<GPUParticlesCollisionHeightField>(cs)) {
+ if (Object::cast_to<GPUParticlesCollisionBox3D>(cs) || Object::cast_to<GPUParticlesAttractorBox3D>(cs) || Object::cast_to<GPUParticlesAttractorVectorField3D>(cs) || Object::cast_to<GPUParticlesCollisionSDF3D>(cs) || Object::cast_to<GPUParticlesCollisionHeightField3D>(cs)) {
return Vector3(p_gizmo->get_spatial_node()->call("get_extents"));
}
@@ -2803,7 +2803,7 @@ void GPUParticlesCollision3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_g
Vector3 sg[2] = { gi.xform(ray_from), gi.xform(ray_from + ray_dir * 4096) };
- if (Object::cast_to<GPUParticlesCollisionSphere>(sn) || Object::cast_to<GPUParticlesAttractorSphere>(sn)) {
+ if (Object::cast_to<GPUParticlesCollisionSphere3D>(sn) || Object::cast_to<GPUParticlesAttractorSphere3D>(sn)) {
Vector3 ra, rb;
Geometry3D::get_closest_points_between_segments(Vector3(), Vector3(4096, 0, 0), sg[0], sg[1], ra, rb);
float d = ra.x;
@@ -2818,7 +2818,7 @@ void GPUParticlesCollision3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_g
sn->call("set_radius", d);
}
- if (Object::cast_to<GPUParticlesCollisionBox>(sn) || Object::cast_to<GPUParticlesAttractorBox>(sn) || Object::cast_to<GPUParticlesAttractorVectorField>(sn) || Object::cast_to<GPUParticlesCollisionSDF>(sn) || Object::cast_to<GPUParticlesCollisionHeightField>(sn)) {
+ if (Object::cast_to<GPUParticlesCollisionBox3D>(sn) || Object::cast_to<GPUParticlesAttractorBox3D>(sn) || Object::cast_to<GPUParticlesAttractorVectorField3D>(sn) || Object::cast_to<GPUParticlesCollisionSDF3D>(sn) || Object::cast_to<GPUParticlesCollisionHeightField3D>(sn)) {
Vector3 axis;
axis[p_id] = 1.0;
Vector3 ra, rb;
@@ -2841,7 +2841,7 @@ void GPUParticlesCollision3DGizmoPlugin::set_handle(const EditorNode3DGizmo *p_g
void GPUParticlesCollision3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *p_gizmo, int p_id, const Variant &p_restore, bool p_cancel) {
Node3D *sn = p_gizmo->get_spatial_node();
- if (Object::cast_to<GPUParticlesCollisionSphere>(sn) || Object::cast_to<GPUParticlesAttractorSphere>(sn)) {
+ if (Object::cast_to<GPUParticlesCollisionSphere3D>(sn) || Object::cast_to<GPUParticlesAttractorSphere3D>(sn)) {
if (p_cancel) {
sn->call("set_radius", p_restore);
return;
@@ -2854,7 +2854,7 @@ void GPUParticlesCollision3DGizmoPlugin::commit_handle(const EditorNode3DGizmo *
ur->commit_action();
}
- if (Object::cast_to<GPUParticlesCollisionBox>(sn) || Object::cast_to<GPUParticlesAttractorBox>(sn) || Object::cast_to<GPUParticlesAttractorVectorField>(sn) || Object::cast_to<GPUParticlesCollisionSDF>(sn) || Object::cast_to<GPUParticlesCollisionHeightField>(sn)) {
+ if (Object::cast_to<GPUParticlesCollisionBox3D>(sn) || Object::cast_to<GPUParticlesAttractorBox3D>(sn) || Object::cast_to<GPUParticlesAttractorVectorField3D>(sn) || Object::cast_to<GPUParticlesCollisionSDF3D>(sn) || Object::cast_to<GPUParticlesCollisionHeightField3D>(sn)) {
if (p_cancel) {
sn->call("set_extents", p_restore);
return;
@@ -2880,7 +2880,7 @@ void GPUParticlesCollision3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
Ref<Material> handles_material = get_material("handles");
- if (Object::cast_to<GPUParticlesCollisionSphere>(cs) || Object::cast_to<GPUParticlesAttractorSphere>(cs)) {
+ if (Object::cast_to<GPUParticlesCollisionSphere3D>(cs) || Object::cast_to<GPUParticlesAttractorSphere3D>(cs)) {
float r = cs->call("get_radius");
Vector<Vector3> points;
@@ -2922,7 +2922,7 @@ void GPUParticlesCollision3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_handles(handles, handles_material);
}
- if (Object::cast_to<GPUParticlesCollisionBox>(cs) || Object::cast_to<GPUParticlesAttractorBox>(cs) || Object::cast_to<GPUParticlesAttractorVectorField>(cs) || Object::cast_to<GPUParticlesCollisionSDF>(cs) || Object::cast_to<GPUParticlesCollisionHeightField>(cs)) {
+ if (Object::cast_to<GPUParticlesCollisionBox3D>(cs) || Object::cast_to<GPUParticlesAttractorBox3D>(cs) || Object::cast_to<GPUParticlesAttractorVectorField3D>(cs) || Object::cast_to<GPUParticlesCollisionSDF3D>(cs) || Object::cast_to<GPUParticlesCollisionHeightField3D>(cs)) {
Vector<Vector3> lines;
AABB aabb;
aabb.position = -cs->call("get_extents").operator Vector3();
@@ -2947,9 +2947,9 @@ void GPUParticlesCollision3DGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->add_collision_segments(lines);
p_gizmo->add_handles(handles, handles_material);
- GPUParticlesCollisionSDF *col_sdf = Object::cast_to<GPUParticlesCollisionSDF>(cs);
+ GPUParticlesCollisionSDF3D *col_sdf = Object::cast_to<GPUParticlesCollisionSDF3D>(cs);
if (col_sdf) {
- static const int subdivs[GPUParticlesCollisionSDF::RESOLUTION_MAX] = { 16, 32, 64, 128, 256, 512 };
+ static const int subdivs[GPUParticlesCollisionSDF3D::RESOLUTION_MAX] = { 16, 32, 64, 128, 256, 512 };
int subdiv = subdivs[col_sdf->get_resolution()];
float cell_size = aabb.get_longest_axis_size() / subdiv;
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 5d14590797..fa23ccf200 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -204,7 +204,13 @@ void ShaderTextEditor::_code_complete_script(const String &p_code, List<ScriptCo
ShaderLanguage sl;
String calltip;
- sl.complete(p_code, ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode())), ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader->get_mode())), ShaderLanguage::VaryingFunctionNames(), ShaderTypes::get_singleton()->get_types(), _get_global_variable_type, r_options, calltip);
+ ShaderLanguage::ShaderCompileInfo info;
+ info.functions = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode()));
+ info.render_modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader->get_mode()));
+ info.shader_types = ShaderTypes::get_singleton()->get_types();
+ info.global_variable_type_func = _get_global_variable_type;
+
+ sl.complete(p_code, info, r_options, calltip);
get_text_editor()->set_code_hint(calltip);
}
@@ -216,12 +222,18 @@ void ShaderTextEditor::_validate_script() {
//List<StringName> params;
//shader->get_param_list(&params);
+ ShaderLanguage::ShaderCompileInfo info;
+ info.functions = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode()));
+ info.render_modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader->get_mode()));
+ info.shader_types = ShaderTypes::get_singleton()->get_types();
+ info.global_variable_type_func = _get_global_variable_type;
+
ShaderLanguage sl;
sl.enable_warning_checking(saved_warnings_enabled);
sl.set_warning_flags(saved_warning_flags);
- Error err = sl.compile(code, ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(shader->get_mode())), ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(shader->get_mode())), ShaderLanguage::VaryingFunctionNames(), ShaderTypes::get_singleton()->get_types(), _get_global_variable_type);
+ Error err = sl.compile(code, info);
if (err != OK) {
String error_text = "error(" + itos(sl.get_error_line()) + "): " + sl.get_error_text();
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index eb5e527640..48b10d5a8b 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -526,8 +526,6 @@ Sprite2DEditor::Sprite2DEditor() {
debug_uv_dialog->add_child(vb);
ScrollContainer *scroll = memnew(ScrollContainer);
scroll->set_custom_minimum_size(Size2(800, 500) * EDSCALE);
- scroll->set_enable_h_scroll(true);
- scroll->set_enable_v_scroll(true);
vb->add_margin_child(TTR("Preview:"), scroll, true);
debug_uv = memnew(Control);
debug_uv->connect("draw", callable_mp(this, &Sprite2DEditor::_debug_uv_draw));
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index d455f4618b..316ef7b195 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -1238,8 +1238,6 @@ SpriteFramesEditor::SpriteFramesEditor() {
split_sheet_preview->connect("gui_input", callable_mp(this, &SpriteFramesEditor::_sheet_preview_input));
split_sheet_scroll = memnew(ScrollContainer);
- split_sheet_scroll->set_enable_h_scroll(true);
- split_sheet_scroll->set_enable_v_scroll(true);
split_sheet_scroll->connect("gui_input", callable_mp(this, &SpriteFramesEditor::_sheet_scroll_input));
split_sheet_panel->add_child(split_sheet_scroll);
CenterContainer *cc = memnew(CenterContainer);
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index f62dbfc2cc..a13cbfa515 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -941,7 +941,7 @@ ThemeItemImportTree::ThemeItemImportTree() {
ScrollContainer *import_bulk_sc = memnew(ScrollContainer);
import_bulk_sc->set_custom_minimum_size(Size2(260.0, 0.0) * EDSCALE);
- import_bulk_sc->set_enable_h_scroll(false);
+ import_bulk_sc->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
import_main_hb->add_child(import_bulk_sc);
VBoxContainer *import_bulk_vb = memnew(VBoxContainer);
import_bulk_vb->set_h_size_flags(Control::SIZE_EXPAND_FILL);
@@ -2113,7 +2113,7 @@ VBoxContainer *ThemeTypeEditor::_create_item_list(Theme::DataType p_data_type) {
ScrollContainer *items_sc = memnew(ScrollContainer);
items_sc->set_v_size_flags(SIZE_EXPAND_FILL);
- items_sc->set_enable_h_scroll(false);
+ items_sc->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
items_tab->add_child(items_sc);
VBoxContainer *items_list = memnew(VBoxContainer);
items_list->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -3102,7 +3102,7 @@ ThemeTypeEditor::ThemeTypeEditor() {
ScrollContainer *type_settings_sc = memnew(ScrollContainer);
type_settings_sc->set_v_size_flags(SIZE_EXPAND_FILL);
- type_settings_sc->set_enable_h_scroll(false);
+ type_settings_sc->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
type_settings_tab->add_child(type_settings_sc);
VBoxContainer *type_settings_list = memnew(VBoxContainer);
type_settings_list->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/plugins/theme_editor_preview.cpp b/editor/plugins/theme_editor_preview.cpp
index 7340c17b6e..52155a7136 100644
--- a/editor/plugins/theme_editor_preview.cpp
+++ b/editor/plugins/theme_editor_preview.cpp
@@ -228,8 +228,6 @@ ThemeEditorPreview::ThemeEditorPreview() {
add_child(preview_body);
preview_container = memnew(ScrollContainer);
- preview_container->set_enable_v_scroll(true);
- preview_container->set_enable_h_scroll(true);
preview_body->add_child(preview_container);
MarginContainer *preview_root = memnew(MarginContainer);
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index a48c0e795c..9a70349a42 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -2321,7 +2321,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
// Middle panel.
ScrollContainer *middle_panel = memnew(ScrollContainer);
- middle_panel->set_enable_h_scroll(false);
+ middle_panel->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
middle_panel->set_custom_minimum_size(Size2i(200, 0) * EDSCALE);
split_container_right_side->add_child(middle_panel);
@@ -2339,7 +2339,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
tile_inspector = memnew(EditorInspector);
tile_inspector->set_undo_redo(undo_redo);
- tile_inspector->set_enable_v_scroll(false);
+ tile_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
tile_inspector->edit(tile_proxy_object);
tile_inspector->set_use_folding(true);
tile_inspector->connect("property_selected", callable_mp(this, &TileSetAtlasSourceEditor::_inspector_property_selected));
@@ -2385,7 +2385,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
atlas_source_inspector = memnew(EditorInspector);
atlas_source_inspector->set_undo_redo(undo_redo);
- atlas_source_inspector->set_enable_v_scroll(false);
+ atlas_source_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
atlas_source_inspector->edit(atlas_source_proxy_object);
middle_vbox_container->add_child(atlas_source_inspector);
diff --git a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
index d687d9651d..035fe57d95 100644
--- a/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_scenes_collection_source_editor.cpp
@@ -459,7 +459,7 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
// Middle panel.
ScrollContainer *middle_panel = memnew(ScrollContainer);
- middle_panel->set_enable_h_scroll(false);
+ middle_panel->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
middle_panel->set_custom_minimum_size(Size2i(200, 0) * EDSCALE);
split_container_right_side->add_child(middle_panel);
@@ -477,7 +477,7 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
scenes_collection_source_inspector = memnew(EditorInspector);
scenes_collection_source_inspector->set_undo_redo(undo_redo);
- scenes_collection_source_inspector->set_enable_v_scroll(false);
+ scenes_collection_source_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
scenes_collection_source_inspector->edit(scenes_collection_source_proxy_object);
middle_vbox_container->add_child(scenes_collection_source_inspector);
@@ -493,7 +493,7 @@ TileSetScenesCollectionSourceEditor::TileSetScenesCollectionSourceEditor() {
tile_inspector = memnew(EditorInspector);
tile_inspector->set_undo_redo(undo_redo);
- tile_inspector->set_enable_v_scroll(false);
+ tile_inspector->set_vertical_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
tile_inspector->edit(tile_proxy_object);
tile_inspector->set_use_folding(true);
middle_vbox_container->add_child(tile_inspector);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index a71a8b33cb..ca84fa1cf0 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -3943,9 +3943,15 @@ void VisualShaderEditor::_update_preview() {
preview_text->set_text(code);
+ ShaderLanguage::ShaderCompileInfo info;
+ info.functions = ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(visual_shader->get_mode()));
+ info.render_modes = ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(visual_shader->get_mode()));
+ info.shader_types = ShaderTypes::get_singleton()->get_types();
+ info.global_variable_type_func = _get_global_variable_type;
+
ShaderLanguage sl;
- Error err = sl.compile(code, ShaderTypes::get_singleton()->get_functions(RenderingServer::ShaderMode(visual_shader->get_mode())), ShaderTypes::get_singleton()->get_modes(RenderingServer::ShaderMode(visual_shader->get_mode())), ShaderLanguage::VaryingFunctionNames(), ShaderTypes::get_singleton()->get_types(), _get_global_variable_type);
+ Error err = sl.compile(code, info);
for (int i = 0; i < preview_text->get_line_count(); i++) {
preview_text->set_line_background_color(i, Color(0, 0, 0, 0));
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 7ae03b3072..341b59779d 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -2595,7 +2595,7 @@ ProjectManager::ProjectManager() {
_project_list = memnew(ProjectList);
_project_list->connect(ProjectList::SIGNAL_SELECTION_CHANGED, callable_mp(this, &ProjectManager::_update_project_buttons));
_project_list->connect(ProjectList::SIGNAL_PROJECT_ASK_OPEN, callable_mp(this, &ProjectManager::_open_selected_projects_ask));
- _project_list->set_enable_h_scroll(false);
+ _project_list->set_horizontal_scroll_mode(ScrollContainer::SCROLL_MODE_DISABLED);
pc->add_child(_project_list);
}