summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/config/project_settings.cpp5
-rw-r--r--core/config/project_settings.h2
-rw-r--r--core/input/input_map.cpp4
-rw-r--r--doc/classes/Control.xml1
-rw-r--r--doc/classes/Node2D.xml1
-rw-r--r--doc/classes/Node3D.xml1
-rw-r--r--doc/classes/ProjectSettings.xml3
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp16
-rw-r--r--drivers/gles3/rasterizer_gles3.h2
-rw-r--r--drivers/gles3/shaders/sky.glsl10
-rw-r--r--editor/editor_file_dialog.cpp5
-rw-r--r--editor/editor_node.cpp11
-rw-r--r--editor/editor_paths.cpp2
-rw-r--r--editor/editor_settings.cpp15
-rw-r--r--editor/editor_settings.h1
-rw-r--r--editor/plugins/script_editor_plugin.cpp1
-rw-r--r--editor/plugins/script_text_editor.cpp1
-rw-r--r--editor/plugins/tiles/atlas_merging_dialog.cpp4
-rw-r--r--modules/gdscript/gdscript_editor.cpp39
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd16
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/const_class_reference.out1
-rw-r--r--modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd2
-rw-r--r--modules/gltf/doc_classes/GLTFNode.xml2
-rw-r--r--modules/gltf/editor/editor_scene_importer_fbx.cpp2
-rw-r--r--modules/gltf/structures/gltf_node.cpp11
-rw-r--r--modules/gltf/structures/gltf_node.h3
-rw-r--r--modules/mono/csharp_script.cpp1
-rw-r--r--platform/macos/display_server_macos.mm2
28 files changed, 120 insertions, 44 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index f0de22f2ef..56e9057a2a 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -656,6 +656,7 @@ Error ProjectSettings::setup(const String &p_path, const String &p_main_pack, bo
Compression::gzip_level = GLOBAL_GET("compression/formats/gzip/compression_level");
+ project_loaded = err == OK;
return err;
}
@@ -1106,6 +1107,10 @@ bool ProjectSettings::is_using_datapack() const {
return using_datapack;
}
+bool ProjectSettings::is_project_loaded() const {
+ return project_loaded;
+}
+
bool ProjectSettings::_property_can_revert(const StringName &p_name) const {
if (!props.has(p_name)) {
return false;
diff --git a/core/config/project_settings.h b/core/config/project_settings.h
index 50cb274831..a0249ef267 100644
--- a/core/config/project_settings.h
+++ b/core/config/project_settings.h
@@ -95,6 +95,7 @@ protected:
String resource_path;
HashMap<StringName, PropertyInfo> custom_prop_info;
bool using_datapack = false;
+ bool project_loaded = false;
List<String> input_presets;
HashSet<String> custom_features;
@@ -190,6 +191,7 @@ public:
Variant get_setting_with_override(const StringName &p_name) const;
bool is_using_datapack() const;
+ bool is_project_loaded() const;
bool has_custom_feature(const String &p_feature) const;
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp
index b2e6b57eb6..910778324c 100644
--- a/core/input/input_map.cpp
+++ b/core/input/input_map.cpp
@@ -669,6 +669,10 @@ const HashMap<String, List<Ref<InputEvent>>> &InputMap::get_builtins() {
default_builtin_cache.insert("ui_text_select_word_under_caret", inputs);
inputs = List<Ref<InputEvent>>();
+ inputs.push_back(InputEventKey::create_reference(Key::G | KeyModifierMask::CTRL | KeyModifierMask::META));
+ default_builtin_cache.insert("ui_text_select_word_under_caret.macos", inputs);
+
+ inputs = List<Ref<InputEvent>>();
inputs.push_back(InputEventKey::create_reference(Key::D | KeyModifierMask::CMD_OR_CTRL));
default_builtin_cache.insert("ui_text_add_selection_for_next_occurrence", inputs);
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index f45ddf2738..5693876194 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1001,6 +1001,7 @@
</member>
<member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
The node's rotation around its pivot, in radians. See [member pivot_offset] to change the pivot's position.
+ [b]Note:[/b] This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees].
</member>
<member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees">
Helper property to access [member rotation] in degrees instead of radians.
diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml
index 9d224f09b1..3b2c52c5bf 100644
--- a/doc/classes/Node2D.xml
+++ b/doc/classes/Node2D.xml
@@ -116,6 +116,7 @@
</member>
<member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0">
Rotation in radians, relative to the node's parent.
+ [b]Note:[/b] This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees].
</member>
<member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees">
Helper property to access [member rotation] in degrees instead of radians.
diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml
index c199c1aae6..61e5c44251 100644
--- a/doc/classes/Node3D.xml
+++ b/doc/classes/Node3D.xml
@@ -289,6 +289,7 @@
<member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation" default="Vector3(0, 0, 0)">
Rotation part of the local transformation in radians, specified in terms of Euler angles. The angles construct a rotaton in the order specified by the [member rotation_order] property.
[b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful.
+ [b]Note:[/b] This property is edited in the inspector in degrees. If you want to use degrees in a script, use [member rotation_degrees].
</member>
<member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees">
Helper property to access [member rotation] in degrees instead of radians.
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 3177780a26..5f6a679b30 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -1112,6 +1112,9 @@
If no selection is currently active, selects the word currently under the caret in text fields. If a selection is currently active, deselects the current selection.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
</member>
+ <member name="input/ui_text_select_word_under_caret.macos" type="Dictionary" setter="" getter="">
+ macOS specific override for the shortcut to select the word currently under the caret.
+ </member>
<member name="input/ui_text_submit" type="Dictionary" setter="" getter="">
Default [InputEventAction] to submit a text field.
[b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified.
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index 600aa908cc..a9ec48fcd5 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -281,7 +281,7 @@ void RasterizerGLES3::prepare_for_blitting_render_targets() {
utils->capture_timestamps_end();
}
-void RasterizerGLES3::_blit_render_target_to_screen(RID p_render_target, DisplayServer::WindowID p_screen, const Rect2 &p_screen_rect, uint32_t p_layer) {
+void RasterizerGLES3::_blit_render_target_to_screen(RID p_render_target, DisplayServer::WindowID p_screen, const Rect2 &p_screen_rect, uint32_t p_layer, bool p_first) {
GLES3::RenderTarget *rt = GLES3::TextureStorage::get_singleton()->get_render_target(p_render_target);
ERR_FAIL_COND(!rt);
@@ -307,12 +307,14 @@ void RasterizerGLES3::_blit_render_target_to_screen(RID p_render_target, Display
glReadBuffer(GL_COLOR_ATTACHMENT0);
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, GLES3::TextureStorage::system_fbo);
- if (p_screen_rect.position != Vector2()) {
- // Viewport doesn't cover entire window so clear window to black before blitting.
+ if (p_first) {
Size2i win_size = DisplayServer::get_singleton()->window_get_size();
- glViewport(0, 0, win_size.width, win_size.height);
- glClearColor(0.0, 0.0, 0.0, 1.0);
- glClear(GL_COLOR_BUFFER_BIT);
+ if (p_screen_rect.position != Vector2() || p_screen_rect.size != rt->size) {
+ // Viewport doesn't cover entire window so clear window to black before blitting.
+ glViewport(0, 0, win_size.width, win_size.height);
+ glClearColor(0.0, 0.0, 0.0, 1.0);
+ glClear(GL_COLOR_BUFFER_BIT);
+ }
}
Vector2i screen_rect_end = p_screen_rect.get_end();
@@ -334,7 +336,7 @@ void RasterizerGLES3::blit_render_targets_to_screen(DisplayServer::WindowID p_sc
RID rid_rt = blit.render_target;
Rect2 dst_rect = blit.dst_rect;
- _blit_render_target_to_screen(rid_rt, p_screen, dst_rect, blit.multi_view.use_layer ? blit.multi_view.layer : 0);
+ _blit_render_target_to_screen(rid_rt, p_screen, dst_rect, blit.multi_view.use_layer ? blit.multi_view.layer : 0, i == 0);
}
}
diff --git a/drivers/gles3/rasterizer_gles3.h b/drivers/gles3/rasterizer_gles3.h
index 446c6af338..0ba84ce412 100644
--- a/drivers/gles3/rasterizer_gles3.h
+++ b/drivers/gles3/rasterizer_gles3.h
@@ -68,7 +68,7 @@ protected:
RasterizerCanvasGLES3 *canvas = nullptr;
RasterizerSceneGLES3 *scene = nullptr;
- void _blit_render_target_to_screen(RID p_render_target, DisplayServer::WindowID p_screen, const Rect2 &p_screen_rect, uint32_t p_layer);
+ void _blit_render_target_to_screen(RID p_render_target, DisplayServer::WindowID p_screen, const Rect2 &p_screen_rect, uint32_t p_layer, bool p_first = true);
public:
RendererUtilities *get_utilities() { return utilities; }
diff --git a/drivers/gles3/shaders/sky.glsl b/drivers/gles3/shaders/sky.glsl
index e59bca8b07..2455ffb8e2 100644
--- a/drivers/gles3/shaders/sky.glsl
+++ b/drivers/gles3/shaders/sky.glsl
@@ -21,12 +21,13 @@ out vec2 uv_interp;
/* clang-format on */
void main() {
- uv_interp = vertex_attrib;
#ifdef USE_INVERTED_Y
- gl_Position = vec4(uv_interp, 1.0, 1.0);
+ uv_interp = vertex_attrib;
#else
- gl_Position = vec4(uv_interp.x, uv_interp.y * -1.0, 1.0, 1.0);
+ // We're doing clockwise culling so flip the order
+ uv_interp = vec2(vertex_attrib.x, vertex_attrib.y * -1.0);
#endif
+ gl_Position = vec4(uv_interp, 1.0, 1.0);
}
/* clang-format off */
@@ -145,9 +146,6 @@ void main() {
cube_normal.x = (uv_interp.x + projection.x) / projection.y;
cube_normal.y = (-uv_interp.y - projection.z) / projection.w;
#endif
-#ifndef USE_INVERTED_Y
- cube_normal.y *= -1.0;
-#endif
cube_normal = mat3(orientation) * cube_normal;
cube_normal = normalize(cube_normal);
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index 3de4379c5d..50826f572a 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -1705,6 +1705,11 @@ EditorFileDialog::EditorFileDialog() {
ED_SHORTCUT("file_dialog/move_favorite_up", TTR("Move Favorite Up"), KeyModifierMask::CMD_OR_CTRL | Key::UP);
ED_SHORTCUT("file_dialog/move_favorite_down", TTR("Move Favorite Down"), KeyModifierMask::CMD_OR_CTRL | Key::DOWN);
+ if (EditorSettings::get_singleton()) {
+ ED_SHORTCUT_OVERRIDE("file_dialog/toggle_favorite", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::F);
+ ED_SHORTCUT_OVERRIDE("file_dialog/toggle_mode", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::V);
+ }
+
HBoxContainer *pathhb = memnew(HBoxContainer);
dir_prev = memnew(Button);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index b854da8e4f..3555caac8a 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -7203,6 +7203,7 @@ EditorNode::EditorNode() {
file_menu->add_separator();
file_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quick_open", TTR("Quick Open..."), KeyModifierMask::SHIFT + KeyModifierMask::ALT + Key::O), FILE_QUICK_OPEN);
+ ED_SHORTCUT_OVERRIDE("editor/quick_open", "macos", KeyModifierMask::META + KeyModifierMask::CTRL + Key::O);
file_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quick_open_scene", TTR("Quick Open Scene..."), KeyModifierMask::CMD_OR_CTRL + KeyModifierMask::SHIFT + Key::O), FILE_QUICK_OPEN_SCENE);
file_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/quick_open_script", TTR("Quick Open Script..."), KeyModifierMask::CMD_OR_CTRL + KeyModifierMask::ALT + Key::O), FILE_QUICK_OPEN_SCRIPT);
@@ -7274,7 +7275,7 @@ EditorNode::EditorNode() {
project_menu->add_separator();
project_menu->add_shortcut(ED_SHORTCUT("editor/reload_current_project", TTR("Reload Current Project")), RELOAD_CURRENT_PROJECT);
ED_SHORTCUT_AND_COMMAND("editor/quit_to_project_list", TTR("Quit to Project List"), KeyModifierMask::CTRL + KeyModifierMask::SHIFT + Key::Q);
- ED_SHORTCUT_OVERRIDE("editor/quit_to_project_list", "macos", KeyModifierMask::SHIFT + KeyModifierMask::ALT + Key::Q);
+ ED_SHORTCUT_OVERRIDE("editor/quit_to_project_list", "macos", KeyModifierMask::META + KeyModifierMask::CTRL + KeyModifierMask::ALT + Key::Q);
project_menu->add_shortcut(ED_GET_SHORTCUT("editor/quit_to_project_list"), RUN_PROJECT_MANAGER, true);
// Spacer to center 2D / 3D / Script buttons.
@@ -7996,10 +7997,10 @@ EditorNode::EditorNode() {
ED_SHORTCUT_AND_COMMAND("editor/editor_script", TTR("Open Script Editor"), KeyModifierMask::CTRL | Key::F3);
ED_SHORTCUT_AND_COMMAND("editor/editor_assetlib", TTR("Open Asset Library"), KeyModifierMask::CTRL | Key::F4);
- ED_SHORTCUT_OVERRIDE("editor/editor_2d", "macos", KeyModifierMask::ALT | Key::KEY_1);
- ED_SHORTCUT_OVERRIDE("editor/editor_3d", "macos", KeyModifierMask::ALT | Key::KEY_2);
- ED_SHORTCUT_OVERRIDE("editor/editor_script", "macos", KeyModifierMask::ALT | Key::KEY_3);
- ED_SHORTCUT_OVERRIDE("editor/editor_assetlib", "macos", KeyModifierMask::ALT | Key::KEY_4);
+ ED_SHORTCUT_OVERRIDE("editor/editor_2d", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::KEY_1);
+ ED_SHORTCUT_OVERRIDE("editor/editor_3d", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::KEY_2);
+ ED_SHORTCUT_OVERRIDE("editor/editor_script", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::KEY_3);
+ ED_SHORTCUT_OVERRIDE("editor/editor_assetlib", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::KEY_4);
ED_SHORTCUT_AND_COMMAND("editor/editor_next", TTR("Open the next Editor"));
ED_SHORTCUT_AND_COMMAND("editor/editor_prev", TTR("Open the previous Editor"));
diff --git a/editor/editor_paths.cpp b/editor/editor_paths.cpp
index 36ebeb8c33..389c16fd66 100644
--- a/editor/editor_paths.cpp
+++ b/editor/editor_paths.cpp
@@ -218,7 +218,7 @@ EditorPaths::EditorPaths() {
// Validate or create project-specific editor data dir,
// including shader cache subdir.
- if (Engine::get_singleton()->is_project_manager_hint() || Main::is_cmdline_tool()) {
+ if (Engine::get_singleton()->is_project_manager_hint() || (Main::is_cmdline_tool() && !ProjectSettings::get_singleton()->is_project_loaded())) {
// Nothing to create, use shared editor data dir for shader cache.
Engine::get_singleton()->set_shader_cache_path(data_dir);
} else {
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index c90f8e9bf0..b4f5eeda84 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -1384,8 +1384,13 @@ float EditorSettings::get_auto_display_scale() const {
// Shortcuts
+void EditorSettings::_add_shortcut_default(const String &p_name, const Ref<Shortcut> &p_shortcut) {
+ shortcuts[p_name] = p_shortcut;
+}
+
void EditorSettings::add_shortcut(const String &p_name, const Ref<Shortcut> &p_shortcut) {
shortcuts[p_name] = p_shortcut;
+ shortcuts[p_name]->set_meta("customized", true);
}
bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const {
@@ -1489,12 +1494,12 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c
}
}
- // Override the existing shortcut only if it wasn't customized by the user (i.e. still "original").
- sc->set_meta("original", events.duplicate(true));
-
- if (Shortcut::is_event_array_equal(sc->get_events(), sc->get_meta("original"))) {
+ // Override the existing shortcut only if it wasn't customized by the user.
+ if (!sc->has_meta("customized")) {
sc->set_events(events);
}
+
+ sc->set_meta("original", events.duplicate(true));
}
Ref<Shortcut> ED_SHORTCUT(const String &p_path, const String &p_name, Key p_keycode) {
@@ -1543,7 +1548,7 @@ Ref<Shortcut> ED_SHORTCUT_ARRAY(const String &p_path, const String &p_name, cons
sc->set_name(p_name);
sc->set_events(events);
sc->set_meta("original", events.duplicate(true)); //to compare against changes
- EditorSettings::get_singleton()->add_shortcut(p_path, sc);
+ EditorSettings::get_singleton()->_add_shortcut_default(p_path, sc);
return sc;
}
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index e8775636a3..e1d3e757e0 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -170,6 +170,7 @@ public:
String get_editor_layouts_config() const;
float get_auto_display_scale() const;
+ void _add_shortcut_default(const String &p_name, const Ref<Shortcut> &p_shortcut);
void add_shortcut(const String &p_name, const Ref<Shortcut> &p_shortcut);
bool is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const;
Ref<Shortcut> get_shortcut(const String &p_name) const;
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index ccbc7c3d74..a584d357cd 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -3814,6 +3814,7 @@ ScriptEditor::ScriptEditor() {
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save", TTR("Save"), KeyModifierMask::ALT | KeyModifierMask::CMD_OR_CTRL | Key::S), FILE_SAVE);
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_as", TTR("Save As...")), FILE_SAVE_AS);
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/save_all", TTR("Save All"), KeyModifierMask::SHIFT | KeyModifierMask::ALT | Key::S), FILE_SAVE_ALL);
+ ED_SHORTCUT_OVERRIDE("script_editor/save_all", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::S);
file_menu->get_popup()->add_separator();
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reload_script_soft", TTR("Soft Reload Tool Script"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::ALT | Key::R), FILE_TOOL_RELOAD_SOFT);
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/copy_path", TTR("Copy Script Path")), FILE_COPY_PATH);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 9fe1d8af99..5e70a407dd 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -2270,6 +2270,7 @@ void ScriptTextEditor::register_editor() {
ED_SHORTCUT("script_text_editor/unindent", TTR("Unindent"), KeyModifierMask::SHIFT | Key::TAB);
ED_SHORTCUT("script_text_editor/toggle_comment", TTR("Toggle Comment"), KeyModifierMask::CMD_OR_CTRL | Key::K);
ED_SHORTCUT("script_text_editor/toggle_fold_line", TTR("Fold/Unfold Line"), KeyModifierMask::ALT | Key::F);
+ ED_SHORTCUT_OVERRIDE("script_text_editor/toggle_fold_line", "macos", KeyModifierMask::CTRL | KeyModifierMask::META | Key::F);
ED_SHORTCUT("script_text_editor/fold_all_lines", TTR("Fold All Lines"), Key::NONE);
ED_SHORTCUT("script_text_editor/unfold_all_lines", TTR("Unfold All Lines"), Key::NONE);
ED_SHORTCUT("script_text_editor/duplicate_selection", TTR("Duplicate Selection"), KeyModifierMask::SHIFT | KeyModifierMask::CTRL | Key::D);
diff --git a/editor/plugins/tiles/atlas_merging_dialog.cpp b/editor/plugins/tiles/atlas_merging_dialog.cpp
index eaf72d36ba..8404ea0969 100644
--- a/editor/plugins/tiles/atlas_merging_dialog.cpp
+++ b/editor/plugins/tiles/atlas_merging_dialog.cpp
@@ -245,7 +245,9 @@ bool AtlasMergingDialog::_get(const StringName &p_name, Variant &r_ret) const {
void AtlasMergingDialog::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_VISIBILITY_CHANGED: {
- _update_texture();
+ if (is_visible()) {
+ _update_texture();
+ }
} break;
}
}
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index f79ba40e71..63dfd4d27c 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -1353,6 +1353,21 @@ static GDScriptCompletionIdentifier _type_from_property(const PropertyInfo &p_pr
return ci;
}
+#define MAX_COMPLETION_RECURSION 100
+struct RecursionCheck {
+ int *counter;
+ _FORCE_INLINE_ bool check() {
+ return (*counter) > MAX_COMPLETION_RECURSION;
+ }
+ RecursionCheck(int *p_counter) :
+ counter(p_counter) {
+ (*counter)++;
+ }
+ ~RecursionCheck() {
+ (*counter)--;
+ }
+};
+
static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type);
static bool _guess_identifier_type_from_base(GDScriptParser::CompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type);
static bool _guess_method_return_type_from_base(GDScriptParser::CompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_method, GDScriptCompletionIdentifier &r_type);
@@ -1385,6 +1400,12 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
return false;
}
+ static int recursion_depth = 0;
+ RecursionCheck recursion(&recursion_depth);
+ if (unlikely(recursion.check())) {
+ ERR_FAIL_V_MSG(false, "Reached recursion limit while trying to guess type.");
+ }
+
if (p_expression->is_constant) {
// Already has a value, so just use that.
r_type = _type_from_variant(p_expression->reduced_value);
@@ -1855,6 +1876,12 @@ static bool _guess_expression_type(GDScriptParser::CompletionContext &p_context,
}
static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type) {
+ static int recursion_depth = 0;
+ RecursionCheck recursion(&recursion_depth);
+ if (unlikely(recursion.check())) {
+ ERR_FAIL_V_MSG(false, "Reached recursion limit while trying to guess type.");
+ }
+
// Look in blocks first.
int last_assign_line = -1;
const GDScriptParser::ExpressionNode *last_assigned_expression = nullptr;
@@ -2072,6 +2099,12 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
}
static bool _guess_identifier_type_from_base(GDScriptParser::CompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_identifier, GDScriptCompletionIdentifier &r_type) {
+ static int recursion_depth = 0;
+ RecursionCheck recursion(&recursion_depth);
+ if (unlikely(recursion.check())) {
+ ERR_FAIL_V_MSG(false, "Reached recursion limit while trying to guess type.");
+ }
+
GDScriptParser::DataType base_type = p_base.type;
bool is_static = base_type.is_meta_type;
while (base_type.is_set()) {
@@ -2285,6 +2318,12 @@ static void _find_last_return_in_block(GDScriptParser::CompletionContext &p_cont
}
static bool _guess_method_return_type_from_base(GDScriptParser::CompletionContext &p_context, const GDScriptCompletionIdentifier &p_base, const StringName &p_method, GDScriptCompletionIdentifier &r_type) {
+ static int recursion_depth = 0;
+ RecursionCheck recursion(&recursion_depth);
+ if (unlikely(recursion.check())) {
+ ERR_FAIL_V_MSG(false, "Reached recursion limit while trying to guess type.");
+ }
+
GDScriptParser::DataType base_type = p_base.type;
bool is_static = base_type.is_meta_type;
diff --git a/modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd
new file mode 100644
index 0000000000..c7553769da
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.gd
@@ -0,0 +1,16 @@
+# https://github.com/godotengine/godot/issues/61636
+
+const External := preload("const_class_reference_external.notest.gd")
+
+class Class1:
+ class Class2:
+ pass
+
+const Class1Alias = Class1
+const Class1Class2Alias = Class1.Class2
+
+const ExternalAlias = External
+const ExternalClassAlias = External.Class
+
+func test():
+ pass
diff --git a/modules/gdscript/tests/scripts/runtime/features/const_class_reference.out b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.out
new file mode 100644
index 0000000000..d73c5eb7cd
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/const_class_reference.out
@@ -0,0 +1 @@
+GDTEST_OK
diff --git a/modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd b/modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd
new file mode 100644
index 0000000000..050e8a0960
--- /dev/null
+++ b/modules/gdscript/tests/scripts/runtime/features/const_class_reference_external.notest.gd
@@ -0,0 +1,2 @@
+class Class:
+ pass
diff --git a/modules/gltf/doc_classes/GLTFNode.xml b/modules/gltf/doc_classes/GLTFNode.xml
index 8e48066623..f3b3e61501 100644
--- a/modules/gltf/doc_classes/GLTFNode.xml
+++ b/modules/gltf/doc_classes/GLTFNode.xml
@@ -35,8 +35,6 @@
</member>
<member name="height" type="int" setter="set_height" getter="get_height" default="-1">
</member>
- <member name="joint" type="bool" setter="set_joint" getter="get_joint" default="false">
- </member>
<member name="light" type="int" setter="set_light" getter="get_light" default="-1">
</member>
<member name="mesh" type="int" setter="set_mesh" getter="get_mesh" default="-1">
diff --git a/modules/gltf/editor/editor_scene_importer_fbx.cpp b/modules/gltf/editor/editor_scene_importer_fbx.cpp
index f8f458fcc7..5e7a8f4e69 100644
--- a/modules/gltf/editor/editor_scene_importer_fbx.cpp
+++ b/modules/gltf/editor/editor_scene_importer_fbx.cpp
@@ -93,7 +93,7 @@ Node *EditorSceneFormatImporterFBX::import_scene(const String &p_path, uint32_t
Ref<GLTFState> state;
state.instantiate();
print_verbose(vformat("glTF path: %s", sink));
- Error err = gltf->append_from_file(sink, state, p_flags);
+ Error err = gltf->append_from_file(sink, state, p_flags, p_path.get_base_dir());
if (err != OK) {
if (r_err) {
*r_err = FAILED;
diff --git a/modules/gltf/structures/gltf_node.cpp b/modules/gltf/structures/gltf_node.cpp
index 66d1eaad51..30895034a9 100644
--- a/modules/gltf/structures/gltf_node.cpp
+++ b/modules/gltf/structures/gltf_node.cpp
@@ -45,8 +45,6 @@ void GLTFNode::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_skin", "skin"), &GLTFNode::set_skin);
ClassDB::bind_method(D_METHOD("get_skeleton"), &GLTFNode::get_skeleton);
ClassDB::bind_method(D_METHOD("set_skeleton", "skeleton"), &GLTFNode::set_skeleton);
- ClassDB::bind_method(D_METHOD("get_joint"), &GLTFNode::get_joint);
- ClassDB::bind_method(D_METHOD("set_joint", "joint"), &GLTFNode::set_joint);
ClassDB::bind_method(D_METHOD("get_position"), &GLTFNode::get_position);
ClassDB::bind_method(D_METHOD("set_position", "position"), &GLTFNode::set_position);
ClassDB::bind_method(D_METHOD("get_rotation"), &GLTFNode::get_rotation);
@@ -67,7 +65,6 @@ void GLTFNode::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::INT, "camera"), "set_camera", "get_camera"); // GLTFCameraIndex
ADD_PROPERTY(PropertyInfo(Variant::INT, "skin"), "set_skin", "get_skin"); // GLTFSkinIndex
ADD_PROPERTY(PropertyInfo(Variant::INT, "skeleton"), "set_skeleton", "get_skeleton"); // GLTFSkeletonIndex
- ADD_PROPERTY(PropertyInfo(Variant::BOOL, "joint"), "set_joint", "get_joint"); // bool
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "position"), "set_position", "get_position"); // Vector3
ADD_PROPERTY(PropertyInfo(Variant::QUATERNION, "rotation"), "set_rotation", "get_rotation"); // Quaternion
ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "scale"), "set_scale", "get_scale"); // Vector3
@@ -131,14 +128,6 @@ void GLTFNode::set_skeleton(GLTFSkeletonIndex p_skeleton) {
skeleton = p_skeleton;
}
-bool GLTFNode::get_joint() {
- return joint;
-}
-
-void GLTFNode::set_joint(bool p_joint) {
- joint = p_joint;
-}
-
Vector3 GLTFNode::get_position() {
return position;
}
diff --git a/modules/gltf/structures/gltf_node.h b/modules/gltf/structures/gltf_node.h
index d801a4cc2c..95c80861de 100644
--- a/modules/gltf/structures/gltf_node.h
+++ b/modules/gltf/structures/gltf_node.h
@@ -80,9 +80,6 @@ public:
GLTFSkeletonIndex get_skeleton();
void set_skeleton(GLTFSkeletonIndex p_skeleton);
- bool get_joint();
- void set_joint(bool p_joint);
-
Vector3 get_position();
void set_position(Vector3 p_position);
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index fe0f4aae81..43d2779e41 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1147,6 +1147,7 @@ void CSharpLanguage::_editor_init_callback() {
// Add plugin to EditorNode and enable it
EditorNode::add_editor_plugin(godotsharp_editor);
ED_SHORTCUT("mono/build_solution", TTR("Build Solution"), KeyModifierMask::ALT | Key::B);
+ ED_SHORTCUT_OVERRIDE("mono/build_solution", "macos", KeyModifierMask::META | KeyModifierMask::CTRL | Key::B);
godotsharp_editor->enable_plugin();
get_singleton()->godotsharp_editor = godotsharp_editor;
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm
index 14778b5f03..e8eb5b419b 100644
--- a/platform/macos/display_server_macos.mm
+++ b/platform/macos/display_server_macos.mm
@@ -2024,7 +2024,7 @@ void DisplayServerMacOS::warp_mouse(const Point2i &p_position) {
// Local point in window coords.
const NSRect contentRect = [wd.window_view frame];
const float scale = screen_get_max_scale();
- NSRect pointInWindowRect = NSMakeRect(p_position.x / scale, contentRect.size.height - (p_position.y / scale - 1), 0, 0);
+ NSRect pointInWindowRect = NSMakeRect(p_position.x / scale, contentRect.size.height - (p_position.y / scale), scale, scale);
NSPoint pointOnScreen = [[wd.window_view window] convertRectToScreen:pointInWindowRect].origin;
// Point in scren coords.