From 7e74568709532181be3e803d64d22b8a03a45a9a Mon Sep 17 00:00:00 2001 From: Rémi Verschelde Date: Fri, 3 Mar 2023 13:10:06 +0100 Subject: FBX: Disable importer when canceling FBX2glTF setup Pretty hacky solution but it's better than an infinite loop. All this import setup needs to be redone, it's very difficult to properly bail out from an invalid import without triggering reimport loops. Also fix underline not visible at default editor scale in LinkButton. Fixes #73319. (cherry picked from commit d81e6ee024a8c64b80ac25c96b33c749ba1db79d) --- scene/gui/link_button.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scene') diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp index e6c3ca3b5f..b579791990 100644 --- a/scene/gui/link_button.cpp +++ b/scene/gui/link_button.cpp @@ -243,11 +243,12 @@ void LinkButton::_notification(int p_what) { if (do_underline) { int underline_spacing = theme_cache.underline_spacing + text_buf->get_line_underline_position(); int y = text_buf->get_line_ascent() + underline_spacing; + int underline_thickness = MAX(1, text_buf->get_line_underline_thickness()); if (is_layout_rtl()) { - draw_line(Vector2(size.width - width, y), Vector2(size.width, y), color, text_buf->get_line_underline_thickness()); + draw_line(Vector2(size.width - width, y), Vector2(size.width, y), color, underline_thickness); } else { - draw_line(Vector2(0, y), Vector2(width, y), color, text_buf->get_line_underline_thickness()); + draw_line(Vector2(0, y), Vector2(width, y), color, underline_thickness); } } } break; -- cgit v1.2.3 From d229ca2f27334856695e7e9230894b408284dfdd Mon Sep 17 00:00:00 2001 From: Johan Aires Rastén Date: Sat, 4 Mar 2023 10:45:43 +0100 Subject: Fixed incorrect ERROR message when setting new PrimitiveMesh If calling set_mesh with a PrimitiveMesh that has pending update, the _mesh_changed function would be called twice. The first time before set_base had been called, which could lead to an ERROR message about trying to set an invalid surface override material. (cherry picked from commit 007b488a5c23b33c6e0b741b55a482e5229f2b90) --- scene/3d/mesh_instance_3d.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scene') diff --git a/scene/3d/mesh_instance_3d.cpp b/scene/3d/mesh_instance_3d.cpp index 10a7a4e78b..86301ee53f 100644 --- a/scene/3d/mesh_instance_3d.cpp +++ b/scene/3d/mesh_instance_3d.cpp @@ -117,8 +117,10 @@ void MeshInstance3D::set_mesh(const Ref &p_mesh) { mesh = p_mesh; if (mesh.is_valid()) { - mesh->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &MeshInstance3D::_mesh_changed)); + // If mesh is a PrimitiveMesh, calling get_rid on it can trigger a changed callback + // so do this before connecting _mesh_changed. set_base(mesh->get_rid()); + mesh->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &MeshInstance3D::_mesh_changed)); _mesh_changed(); } else { blend_shape_tracks.clear(); -- cgit v1.2.3 From f9bb1d3174e7ab88b738b48967972d13f53da627 Mon Sep 17 00:00:00 2001 From: RedworkDE <10944644+RedworkDE@users.noreply.github.com> Date: Tue, 7 Mar 2023 15:36:57 +0100 Subject: Fix buffer overrun in CPUParticles3D (cherry picked from commit 89980dd9c98a01b6d353a9a087f5a4caec2dd1aa) --- scene/3d/cpu_particles_3d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene') diff --git a/scene/3d/cpu_particles_3d.cpp b/scene/3d/cpu_particles_3d.cpp index c88eb033de..23855b2d8e 100644 --- a/scene/3d/cpu_particles_3d.cpp +++ b/scene/3d/cpu_particles_3d.cpp @@ -1207,7 +1207,7 @@ void CPUParticles3D::_update_particle_data_buffer() { ptr[10] = t.basis.rows[2][2]; ptr[11] = t.origin.z; } else { - memset(ptr, 0, sizeof(Transform3D)); + memset(ptr, 0, sizeof(float) * 12); } Color c = r[idx].color; -- cgit v1.2.3 From 59a78ecf5af2f3677d6895eab9054825020f85f7 Mon Sep 17 00:00:00 2001 From: justchen1369 Date: Fri, 10 Mar 2023 11:42:09 -0500 Subject: Fix exported type for Menubar start_index (cherry picked from commit dbfecdb3b04956db58ee199fdbd9f7c03794e269) --- scene/gui/menu_bar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene') diff --git a/scene/gui/menu_bar.cpp b/scene/gui/menu_bar.cpp index 5b27983851..0c12b98ad7 100644 --- a/scene/gui/menu_bar.cpp +++ b/scene/gui/menu_bar.cpp @@ -666,7 +666,7 @@ void MenuBar::_bind_methods() { ClassDB::bind_method(D_METHOD("get_menu_popup", "menu"), &MenuBar::get_menu_popup); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "flat"), "set_flat", "is_flat"); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "start_index"), "set_start_index", "get_start_index"); + ADD_PROPERTY(PropertyInfo(Variant::INT, "start_index"), "set_start_index", "get_start_index"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "switch_on_hover"), "set_switch_on_hover", "is_switch_on_hover"); ADD_PROPERTY(PropertyInfo(Variant::BOOL, "prefer_global_menu"), "set_prefer_global_menu", "is_prefer_global_menu"); -- cgit v1.2.3 From 5f6a53456987fbffd9b6d12714485c337b0c17ac Mon Sep 17 00:00:00 2001 From: clayjohn Date: Fri, 10 Mar 2023 10:48:45 -0800 Subject: Use linear filtering without mipmaps for ProceduralSkyMaterial and PhysicalSkyMaterial (cherry picked from commit 572ac915145e7ccb6d32ab5c356076820e964433) --- scene/resources/sky_material.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scene') diff --git a/scene/resources/sky_material.cpp b/scene/resources/sky_material.cpp index 9528b23e32..065132516b 100644 --- a/scene/resources/sky_material.cpp +++ b/scene/resources/sky_material.cpp @@ -269,7 +269,7 @@ uniform vec4 sky_top_color : source_color = vec4(0.385, 0.454, 0.55, 1.0); uniform vec4 sky_horizon_color : source_color = vec4(0.646, 0.656, 0.67, 1.0); uniform float sky_curve : hint_range(0, 1) = 0.15; uniform float sky_energy = 1.0; // In Lux. -uniform sampler2D sky_cover : source_color, hint_default_black; +uniform sampler2D sky_cover : filter_linear, source_color, hint_default_black; uniform vec4 sky_cover_modulate : source_color = vec4(1.0, 1.0, 1.0, 1.0); uniform vec4 ground_bottom_color : source_color = vec4(0.2, 0.169, 0.133, 1.0); uniform vec4 ground_horizon_color : source_color = vec4(0.646, 0.656, 0.67, 1.0); @@ -676,7 +676,7 @@ uniform float sun_disk_scale : hint_range(0, 360) = 1.0; uniform vec4 ground_color : source_color = vec4(0.1, 0.07, 0.034, 1.0); uniform float exposure : hint_range(0, 128) = 1.0; -uniform sampler2D night_sky : source_color, hint_default_black; +uniform sampler2D night_sky : filter_linear, source_color, hint_default_black; const vec3 UP = vec3( 0.0, 1.0, 0.0 ); -- cgit v1.2.3