summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/classes/GraphEdit.xml1
-rw-r--r--editor/editor_quick_open.cpp3
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp2
-rw-r--r--editor/plugins/gradient_texture_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp27
-rw-r--r--editor/plugins/node_3d_editor_plugin.h1
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp4
-rw-r--r--modules/gltf/gltf_document.cpp25
-rw-r--r--modules/navigation/nav_map.cpp20
-rw-r--r--scene/2d/animated_sprite_2d.cpp2
-rw-r--r--scene/2d/sprite_2d.cpp4
-rw-r--r--scene/gui/rich_text_label.cpp2
-rw-r--r--servers/rendering/renderer_canvas_cull.cpp4
-rw-r--r--tests/core/math/test_vector2.h4
-rw-r--r--tests/core/math/test_vector3.h4
-rw-r--r--tests/core/object/test_class_db.h2
-rw-r--r--tests/core/os/test_os.h2
-rw-r--r--tests/scene/test_instance_placeholder.h2
-rw-r--r--tests/scene/test_node.h2
19 files changed, 79 insertions, 34 deletions
diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml
index 001839d745..670df10a89 100644
--- a/doc/classes/GraphEdit.xml
+++ b/doc/classes/GraphEdit.xml
@@ -7,6 +7,7 @@
[GraphEdit] provides tools for creation, manipulation, and display of various graphs. Its main purpose in the engine is to power the visual programming systems, such as visual shaders, but it is also available for use in user projects.
[GraphEdit] by itself is only an empty container, representing an infinite grid where [GraphNode]s can be placed. Each [GraphNode] represents a node in the graph, a single unit of data in the connected scheme. [GraphEdit], in turn, helps to control various interactions with nodes and between nodes. When the user attempts to connect, disconnect, or delete a [GraphNode], a signal is emitted in the [GraphEdit], but no action is taken by default. It is the responsibility of the programmer utilizing this control to implement the necessary logic to determine how each request should be handled.
[b]Performance:[/b] It is greatly advised to enable low-processor usage mode (see [member OS.low_processor_usage_mode]) when using GraphEdits.
+ [b]Note:[/b] Keep in mind that [method Node.get_children] will also return the connection layer node named [code]_connection_layer[/code] due to technical limitations. This behavior may change in future releases.
</description>
<tutorials>
</tutorials>
diff --git a/editor/editor_quick_open.cpp b/editor/editor_quick_open.cpp
index 0621e5f8d1..dfb87f43da 100644
--- a/editor/editor_quick_open.cpp
+++ b/editor/editor_quick_open.cpp
@@ -32,6 +32,7 @@
#include "core/os/keyboard.h"
#include "editor/editor_node.h"
+#include "editor/editor_string_names.h"
#include "editor/themes/editor_scale.h"
Rect2i EditorQuickOpen::prev_rect = Rect2i();
@@ -119,10 +120,12 @@ void EditorQuickOpen::_update_search() {
sorter.sort(entries.ptrw(), entries.size());
}
+ const int class_icon_size = search_options->get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor));
const int entry_limit = MIN(entries.size(), 300);
for (int i = 0; i < entry_limit; i++) {
TreeItem *ti = search_options->create_item(root);
ti->set_text(0, entries[i].path);
+ ti->set_icon_max_width(0, class_icon_size);
ti->set_icon(0, *icons.lookup_ptr(entries[i].path.get_extension()));
}
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 97f628c4a4..f73c494b25 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -570,7 +570,7 @@ void AbstractPolygon2DEditor::forward_canvas_draw_over_viewport(Control *p_overl
const Vector2 p = (vertex == edited_point) ? edited_point.pos : (points[i] + offset);
const Vector2 point = xform.xform(p);
- const Color overlay_modulate = vertex == active_point ? Color(0.5, 1, 2) : Color(1, 1, 1);
+ const Color overlay_modulate = vertex == active_point ? Color(0.4, 1, 1) : Color(1, 1, 1);
p_overlay->draw_texture(handle, point - handle->get_size() * 0.5, overlay_modulate);
if (vertex == hover_point) {
diff --git a/editor/plugins/gradient_texture_2d_editor_plugin.cpp b/editor/plugins/gradient_texture_2d_editor_plugin.cpp
index 9ccbea4c3c..7e22e1209c 100644
--- a/editor/plugins/gradient_texture_2d_editor_plugin.cpp
+++ b/editor/plugins/gradient_texture_2d_editor_plugin.cpp
@@ -213,7 +213,7 @@ void GradientTexture2DEdit::_draw() {
}
// Draw handles.
- const Color focus_modulate = Color(0.5, 1, 2);
+ const Color focus_modulate = Color(0.4, 1, 1);
bool modulate_handle_from = grabbed == HANDLE_FROM || hovered == HANDLE_FROM;
bool modulate_handle_to = grabbed == HANDLE_TO || hovered == HANDLE_TO;
draw_texture(fill_from_icon, (_get_handle_pos(HANDLE_FROM) - handle_size / 2).round(), modulate_handle_from ? focus_modulate : Color(1, 1, 1));
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 54526d28df..c6a0dfb888 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -2903,8 +2903,8 @@ void Node3DEditorViewport::_notification(int p_what) {
}
bool show_info = view_menu->get_popup()->is_item_checked(view_menu->get_popup()->get_item_index(VIEW_INFORMATION));
- if (show_info != info_label->is_visible()) {
- info_label->set_visible(show_info);
+ if (show_info != info_panel->is_visible()) {
+ info_panel->set_visible(show_info);
}
Camera3D *current_camera;
@@ -3087,7 +3087,7 @@ void Node3DEditorViewport::_notification(int p_what) {
frame_time_gradient->set_color(1, get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
frame_time_gradient->set_color(2, get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
- info_label->add_theme_style_override(CoreStringName(normal), information_3d_stylebox);
+ info_panel->add_theme_style_override(SceneStringName(panel), information_3d_stylebox);
frame_time_panel->add_theme_style_override(SceneStringName(panel), information_3d_stylebox);
// Set a minimum width to prevent the width from changing all the time
@@ -5382,15 +5382,19 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
bottom_center_vbox->set_v_grow_direction(GROW_DIRECTION_BEGIN);
surface->add_child(bottom_center_vbox);
+ info_panel = memnew(PanelContainer);
+ info_panel->set_anchor_and_offset(SIDE_LEFT, ANCHOR_END, -90 * EDSCALE);
+ info_panel->set_anchor_and_offset(SIDE_TOP, ANCHOR_END, -90 * EDSCALE);
+ info_panel->set_anchor_and_offset(SIDE_RIGHT, ANCHOR_END, -10 * EDSCALE);
+ info_panel->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, -10 * EDSCALE);
+ info_panel->set_h_grow_direction(GROW_DIRECTION_BEGIN);
+ info_panel->set_v_grow_direction(GROW_DIRECTION_BEGIN);
+ info_panel->set_mouse_filter(MOUSE_FILTER_IGNORE);
+ surface->add_child(info_panel);
+ info_panel->hide();
+
info_label = memnew(Label);
- info_label->set_anchor_and_offset(SIDE_LEFT, ANCHOR_END, -90 * EDSCALE);
- info_label->set_anchor_and_offset(SIDE_TOP, ANCHOR_END, -90 * EDSCALE);
- info_label->set_anchor_and_offset(SIDE_RIGHT, ANCHOR_END, -10 * EDSCALE);
- info_label->set_anchor_and_offset(SIDE_BOTTOM, ANCHOR_END, -10 * EDSCALE);
- info_label->set_h_grow_direction(GROW_DIRECTION_BEGIN);
- info_label->set_v_grow_direction(GROW_DIRECTION_BEGIN);
- surface->add_child(info_label);
- info_label->hide();
+ info_panel->add_child(info_label);
cinema_label = memnew(Label);
cinema_label->set_anchor_and_offset(SIDE_TOP, ANCHOR_BEGIN, 10 * EDSCALE);
@@ -5475,6 +5479,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
top_right_vbox->add_child(rotation_control);
frame_time_panel = memnew(PanelContainer);
+ frame_time_panel->set_mouse_filter(MOUSE_FILTER_IGNORE);
top_right_vbox->add_child(frame_time_panel);
frame_time_panel->hide();
diff --git a/editor/plugins/node_3d_editor_plugin.h b/editor/plugins/node_3d_editor_plugin.h
index 580c001238..5bd14748c0 100644
--- a/editor/plugins/node_3d_editor_plugin.h
+++ b/editor/plugins/node_3d_editor_plugin.h
@@ -241,6 +241,7 @@ private:
real_t freelook_speed;
Vector2 previous_mouse_position;
+ PanelContainer *info_panel = nullptr;
Label *info_label = nullptr;
Label *cinema_label = nullptr;
Label *locked_label = nullptr;
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index 7fe22f7a5e..e8a7b3b514 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -249,7 +249,7 @@ void GenericTilePolygonEditor::_base_control_draw() {
for (int i = 0; i < (int)polygons.size(); i++) {
const Vector<Vector2> &polygon = polygons[i];
for (int j = 0; j < polygon.size(); j++) {
- const Color poly_modulate = (tinted_polygon_index == i && tinted_point_index == j) ? Color(0.5, 1, 2) : Color(1, 1, 1);
+ const Color poly_modulate = (tinted_polygon_index == i && tinted_point_index == j) ? Color(0.4, 1, 1) : Color(1, 1, 1);
base_control->draw_texture(handle, xform.xform(polygon[j]) - handle->get_size() / 2, poly_modulate);
}
}
@@ -265,7 +265,7 @@ void GenericTilePolygonEditor::_base_control_draw() {
}
if (drag_type == DRAG_TYPE_CREATE_POINT) {
- base_control->draw_texture(handle, xform.xform(in_creation_point) - handle->get_size() / 2, Color(0.5, 1, 2));
+ base_control->draw_texture(handle, xform.xform(in_creation_point) - handle->get_size() / 2, Color(0.4, 1, 1));
}
// Draw the point creation preview in edit mode.
diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp
index 32fe37d9af..e0bdd4cf33 100644
--- a/modules/gltf/gltf_document.cpp
+++ b/modules/gltf/gltf_document.cpp
@@ -5785,15 +5785,17 @@ struct SceneFormatImporterGLTFInterpolate {
return 0.5f * ((2.0f * p1) + (-p0 + p2) * t + (2.0f * p0 - 5.0f * p1 + 4.0f * p2 - p3) * t2 + (-p0 + 3.0f * p1 - 3.0f * p2 + p3) * t3);
}
- T bezier(T start, T control_1, T control_2, T end, float t) {
- /* Formula from Wikipedia article on Bezier curves. */
- const real_t omt = (1.0 - t);
- const real_t omt2 = omt * omt;
- const real_t omt3 = omt2 * omt;
+ T hermite(T start, T tan_start, T end, T tan_end, float t) {
+ /* Formula from the glTF 2.0 specification. */
const real_t t2 = t * t;
const real_t t3 = t2 * t;
- return start * omt3 + control_1 * omt2 * t * 3.0 + control_2 * omt * t2 * 3.0 + end * t3;
+ const real_t h00 = 2.0 * t3 - 3.0 * t2 + 1.0;
+ const real_t h10 = t3 - 2.0 * t2 + t;
+ const real_t h01 = -2.0 * t3 + 3.0 * t2;
+ const real_t h11 = t3 - t2;
+
+ return start * h00 + tan_start * h10 + end * h01 + tan_end * h11;
}
};
@@ -5814,7 +5816,7 @@ struct SceneFormatImporterGLTFInterpolate<Quaternion> {
return p1.slerp(p2, c).normalized();
}
- Quaternion bezier(const Quaternion start, const Quaternion control_1, const Quaternion control_2, const Quaternion end, const float t) {
+ Quaternion hermite(const Quaternion start, const Quaternion tan_start, const Quaternion end, const Quaternion tan_end, const float t) {
ERR_FAIL_COND_V_MSG(!start.is_normalized(), Quaternion(), vformat("The start quaternion %s must be normalized.", start));
ERR_FAIL_COND_V_MSG(!end.is_normalized(), Quaternion(), vformat("The end quaternion %s must be normalized.", end));
@@ -5879,14 +5881,15 @@ T GLTFDocument::_interpolate_track(const Vector<real_t> &p_times, const Vector<T
return p_values[(p_times.size() - 1) * 3 + 1];
}
- const float c = (p_time - p_times[idx]) / (p_times[idx + 1] - p_times[idx]);
+ const float td = (p_times[idx + 1] - p_times[idx]);
+ const float c = (p_time - p_times[idx]) / td;
const T &from = p_values[idx * 3 + 1];
- const T c1 = from + p_values[idx * 3 + 2];
+ const T tan_from = td * p_values[idx * 3 + 2];
const T &to = p_values[idx * 3 + 4];
- const T c2 = to + p_values[idx * 3 + 3];
+ const T tan_to = td * p_values[idx * 3 + 3];
- return interp.bezier(from, c1, c2, to, c);
+ return interp.hermite(from, tan_from, to, tan_to, c);
} break;
}
diff --git a/modules/navigation/nav_map.cpp b/modules/navigation/nav_map.cpp
index 8a7da64eb5..f917c988ea 100644
--- a/modules/navigation/nav_map.cpp
+++ b/modules/navigation/nav_map.cpp
@@ -644,6 +644,26 @@ Vector3 NavMap::get_closest_point_to_segment(const Vector3 &p_from, const Vector
}
}
}
+ // Finally, check for a case when shortest distance is between some point located on a face's edge and some point located on a line segment.
+ if (!use_collision) {
+ for (size_t point_id = 0; point_id < p.points.size(); point_id += 1) {
+ Vector3 a, b;
+
+ Geometry3D::get_closest_points_between_segments(
+ p_from,
+ p_to,
+ p.points[point_id].pos,
+ p.points[(point_id + 1) % p.points.size()].pos,
+ a,
+ b);
+
+ const real_t d = a.distance_to(b);
+ if (d < closest_point_d) {
+ closest_point_d = d;
+ closest_point = b;
+ }
+ }
+ }
}
return closest_point;
diff --git a/scene/2d/animated_sprite_2d.cpp b/scene/2d/animated_sprite_2d.cpp
index 3506a0df2b..b3f735e044 100644
--- a/scene/2d/animated_sprite_2d.cpp
+++ b/scene/2d/animated_sprite_2d.cpp
@@ -267,7 +267,7 @@ void AnimatedSprite2D::_notification(int p_what) {
}
if (get_viewport() && get_viewport()->is_snap_2d_transforms_to_pixel_enabled()) {
- ofs = ofs.round();
+ ofs = (ofs + Point2(0.5, 0.5)).floor();
}
Rect2 dst_rect(ofs, s);
diff --git a/scene/2d/sprite_2d.cpp b/scene/2d/sprite_2d.cpp
index efb5029ac4..2b5c40f212 100644
--- a/scene/2d/sprite_2d.cpp
+++ b/scene/2d/sprite_2d.cpp
@@ -98,7 +98,7 @@ void Sprite2D::_get_rects(Rect2 &r_src_rect, Rect2 &r_dst_rect, bool &r_filter_c
}
if (get_viewport() && get_viewport()->is_snap_2d_transforms_to_pixel_enabled()) {
- dest_offset = dest_offset.round();
+ dest_offset = (dest_offset + Point2(0.5, 0.5)).floor();
}
r_dst_rect = Rect2(dest_offset, frame_size);
@@ -400,7 +400,7 @@ Rect2 Sprite2D::get_rect() const {
}
if (get_viewport() && get_viewport()->is_snap_2d_transforms_to_pixel_enabled()) {
- ofs = ofs.round();
+ ofs = (ofs + Point2(0.5, 0.5)).floor();
}
if (s == Size2(0, 0)) {
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 416a7fafb6..8ffa0f8c63 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -1249,7 +1249,7 @@ int RichTextLabel::_draw_line(ItemFrame *p_frame, int p_line, const Vector2 &p_o
}
if (is_inside_tree() && get_viewport()->is_snap_2d_transforms_to_pixel_enabled()) {
- fx_offset = fx_offset.round();
+ fx_offset = (fx_offset + Point2(0.5, 0.5)).floor();
}
Vector2 char_off = char_xform.get_origin();
diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp
index e92050a323..c4286dcc0c 100644
--- a/servers/rendering/renderer_canvas_cull.cpp
+++ b/servers/rendering/renderer_canvas_cull.cpp
@@ -284,8 +284,8 @@ void RendererCanvasCull::_cull_canvas_item(Item *p_canvas_item, const Transform2
}
if (snapping_2d_transforms_to_pixel) {
- final_xform.columns[2] = final_xform.columns[2].round();
- parent_xform.columns[2] = parent_xform.columns[2].round();
+ final_xform.columns[2] = (final_xform.columns[2] + Point2(0.5, 0.5)).floor();
+ parent_xform.columns[2] = (parent_xform.columns[2] + Point2(0.5, 0.5)).floor();
}
final_xform = parent_xform * final_xform;
diff --git a/tests/core/math/test_vector2.h b/tests/core/math/test_vector2.h
index fc3fd6a87d..7bd494ec80 100644
--- a/tests/core/math/test_vector2.h
+++ b/tests/core/math/test_vector2.h
@@ -353,7 +353,6 @@ TEST_CASE("[Vector2] Plane methods") {
const Vector2 vector = Vector2(1.2, 3.4);
const Vector2 vector_y = Vector2(0, 1);
const Vector2 vector_normal = Vector2(0.95879811270838721622267, 0.2840883296913739899919);
- const Vector2 vector_non_normal = Vector2(5.4, 1.6);
const real_t p_d = 99.1;
CHECK_MESSAGE(
vector.bounce(vector_y) == Vector2(1.2, -3.4),
@@ -383,6 +382,8 @@ TEST_CASE("[Vector2] Plane methods") {
vector.slide(vector_normal).is_equal_approx(Vector2(-0.8292559899117276166456, 2.798738965952080706179)),
"Vector2 slide with normal should return expected value.");
// There's probably a better way to test these ones?
+#ifdef MATH_CHECKS
+ const Vector2 vector_non_normal = Vector2(5.4, 1.6);
ERR_PRINT_OFF;
CHECK_MESSAGE(
vector.bounce(vector_non_normal).is_equal_approx(Vector2()),
@@ -394,6 +395,7 @@ TEST_CASE("[Vector2] Plane methods") {
vector.slide(vector_non_normal).is_equal_approx(Vector2()),
"Vector2 slide should return empty Vector2 with non-normalized input.");
ERR_PRINT_ON;
+#endif // MATH_CHECKS
}
TEST_CASE("[Vector2] Rounding methods") {
diff --git a/tests/core/math/test_vector3.h b/tests/core/math/test_vector3.h
index ca0aa02882..4cab753d6f 100644
--- a/tests/core/math/test_vector3.h
+++ b/tests/core/math/test_vector3.h
@@ -368,7 +368,6 @@ TEST_CASE("[Vector3] Plane methods") {
const Vector3 vector = Vector3(1.2, 3.4, 5.6);
const Vector3 vector_y = Vector3(0, 1, 0);
const Vector3 vector_normal = Vector3(0.88763458893247992491, 0.26300284116517923701, 0.37806658417494515320);
- const Vector3 vector_non_normal = Vector3(5.4, 1.6, 2.3);
CHECK_MESSAGE(
vector.bounce(vector_y) == Vector3(1.2, -3.4, 5.6),
"Vector3 bounce on a plane with normal of the Y axis should.");
@@ -394,6 +393,8 @@ TEST_CASE("[Vector3] Plane methods") {
vector.slide(vector_normal).is_equal_approx(Vector3(-2.41848149148878681437, 2.32785733585517427722237, 4.0587949202918130235)),
"Vector3 slide with normal should return expected value.");
// There's probably a better way to test these ones?
+#ifdef MATH_CHECKS
+ const Vector3 vector_non_normal = Vector3(5.4, 1.6, 2.3);
ERR_PRINT_OFF;
CHECK_MESSAGE(
vector.bounce(vector_non_normal).is_equal_approx(Vector3()),
@@ -405,6 +406,7 @@ TEST_CASE("[Vector3] Plane methods") {
vector.slide(vector_non_normal).is_equal_approx(Vector3()),
"Vector3 slide should return empty Vector3 with non-normalized input.");
ERR_PRINT_ON;
+#endif // MATH_CHECKS
}
TEST_CASE("[Vector3] Rounding methods") {
diff --git a/tests/core/object/test_class_db.h b/tests/core/object/test_class_db.h
index 381d759e5b..358bbc08a3 100644
--- a/tests/core/object/test_class_db.h
+++ b/tests/core/object/test_class_db.h
@@ -375,8 +375,10 @@ void validate_property(const Context &p_context, const ExposedClass &p_class, co
}
void validate_argument(const Context &p_context, const ExposedClass &p_class, const String &p_owner_name, const String &p_owner_type, const ArgumentData &p_arg) {
+#ifdef DEBUG_METHODS_ENABLED
TEST_COND((p_arg.name.is_empty() || p_arg.name.begins_with("_unnamed_arg")),
vformat("Unnamed argument in position %d of %s '%s.%s'.", p_arg.position, p_owner_type, p_class.name, p_owner_name));
+#endif // DEBUG_METHODS_ENABLED
const ExposedClass *arg_class = p_context.find_exposed_class(p_arg.type);
if (arg_class) {
diff --git a/tests/core/os/test_os.h b/tests/core/os/test_os.h
index 6ee0ff82e7..1e2f5e222b 100644
--- a/tests/core/os/test_os.h
+++ b/tests/core/os/test_os.h
@@ -163,12 +163,14 @@ TEST_CASE("[OS] Processor count and memory information") {
CHECK_MESSAGE(
OS::get_singleton()->get_processor_count() >= 1,
"The returned processor count should be greater than zero.");
+#ifdef DEBUG_ENABLED
CHECK_MESSAGE(
OS::get_singleton()->get_static_memory_usage() >= 1,
"The returned static memory usage should be greater than zero.");
CHECK_MESSAGE(
OS::get_singleton()->get_static_memory_peak_usage() >= 1,
"The returned static memory peak usage should be greater than zero.");
+#endif // DEBUG_ENABLED
}
TEST_CASE("[OS] Execute") {
diff --git a/tests/scene/test_instance_placeholder.h b/tests/scene/test_instance_placeholder.h
index d915c5d961..17f2151d54 100644
--- a/tests/scene/test_instance_placeholder.h
+++ b/tests/scene/test_instance_placeholder.h
@@ -333,6 +333,7 @@ TEST_CASE("[SceneTree][InstancePlaceholder] Instantiate from placeholder with ov
}
}
+#ifdef TOOLS_ENABLED
TEST_CASE("[SceneTree][InstancePlaceholder] Instance a PackedScene containing an InstancePlaceholder with no overrides") {
GDREGISTER_CLASS(_TestInstancePlaceholderNode);
@@ -526,6 +527,7 @@ TEST_CASE("[SceneTree][InstancePlaceholder] Instance a PackedScene containing an
DirAccess::remove_file_or_error(internal_path);
DirAccess::remove_file_or_error(main_path);
}
+#endif // TOOLS_ENABLED
} //namespace TestInstancePlaceholder
diff --git a/tests/scene/test_node.h b/tests/scene/test_node.h
index 05764d8f29..e387c73f9f 100644
--- a/tests/scene/test_node.h
+++ b/tests/scene/test_node.h
@@ -529,6 +529,7 @@ TEST_CASE("[SceneTree][Node]Exported node checks") {
memdelete(dup);
}
+#ifdef TOOLS_ENABLED
SUBCASE("Saving instance with exported nodes should not store the unchanged property") {
Ref<PackedScene> ps;
ps.instantiate();
@@ -602,6 +603,7 @@ TEST_CASE("[SceneTree][Node]Exported node checks") {
}
CHECK_EQ(stored_properties, 2);
}
+#endif // TOOLS_ENABLED
memdelete(node);
}