feat: updated engine

This commit is contained in:
Sara Gerretsen 2026-07-10 17:04:34 +02:00
parent cbe99774ff
commit f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions

View file

@ -30,10 +30,16 @@
#include "node_3d.h"
#include "core/config/engine.h"
#include "core/math/transform_interpolator.h"
#include "core/object/callable_mp.h"
#include "core/object/class_db.h"
#include "scene/3d/visual_instance_3d.h"
#include "scene/main/scene_tree.h"
#include "scene/main/viewport.h"
#include "scene/property_utils.h"
#include "servers/display/accessibility_server.h"
#include "servers/rendering/rendering_server.h"
/*
@ -122,10 +128,11 @@ void Node3D::_propagate_transform_changed(Node3D *p_origin) {
#else
if (data.notify_transform && !data.ignore_notification && !xform_change.in_list()) {
#endif
if (likely(is_accessible_from_caller_thread())) {
// SceneTree::xform_change_list is not thread safe to modify, and is read by the main thread when processings are done.
if (Thread::is_main_thread()) {
get_tree()->xform_change_list.add(&xform_change);
} else {
// This should very rarely happen, but if it does at least make sure the notification is received eventually.
// For any threaded-processed node, add it to xform_change_list on the main thread in a deferred manner.
callable_mp(this, &Node3D::_propagate_transform_changed_deferred).call_deferred();
}
}
@ -138,7 +145,7 @@ void Node3D::_notification(int p_what) {
RID ae = get_accessibility_element();
ERR_FAIL_COND(ae.is_null());
DisplayServer::get_singleton()->accessibility_update_set_role(ae, DisplayServer::AccessibilityRole::ROLE_CONTAINER);
AccessibilityServer::get_singleton()->update_set_role(ae, AccessibilityServerEnums::AccessibilityRole::ROLE_CONTAINER);
} break;
case NOTIFICATION_ENTER_TREE: {
@ -245,10 +252,6 @@ void Node3D::_notification(int p_what) {
ERR_FAIL_NULL(data.viewport);
if (get_script_instance()) {
get_script_instance()->call(SNAME("_enter_world"));
}
#ifdef TOOLS_ENABLED
if (is_part_of_edited_scene() && !data.gizmos_requested) {
data.gizmos_requested = true;
@ -264,10 +267,6 @@ void Node3D::_notification(int p_what) {
clear_gizmos();
#endif
if (get_script_instance()) {
get_script_instance()->call(SNAME("_exit_world"));
}
data.viewport = nullptr;
data.inside_world = false;
} break;
@ -1349,19 +1348,15 @@ NodePath Node3D::get_visibility_parent() const {
void Node3D::_validate_property(PropertyInfo &p_property) const {
if (data.rotation_edit_mode != ROTATION_EDIT_MODE_BASIS && p_property.name == "basis") {
p_property.usage = 0;
}
if (data.rotation_edit_mode == ROTATION_EDIT_MODE_BASIS && p_property.name == "scale") {
p_property.usage = 0;
}
if (data.rotation_edit_mode != ROTATION_EDIT_MODE_QUATERNION && p_property.name == "quaternion") {
p_property.usage = 0;
}
if (data.rotation_edit_mode != ROTATION_EDIT_MODE_EULER && p_property.name == "rotation") {
p_property.usage = 0;
}
if (data.rotation_edit_mode != ROTATION_EDIT_MODE_EULER && p_property.name == "rotation_order") {
p_property.usage = 0;
p_property.usage = PROPERTY_USAGE_NONE;
} else if (data.rotation_edit_mode == ROTATION_EDIT_MODE_BASIS && p_property.name == "scale") {
p_property.usage = PROPERTY_USAGE_NONE;
} else if (data.rotation_edit_mode != ROTATION_EDIT_MODE_QUATERNION && p_property.name == "quaternion") {
p_property.usage = PROPERTY_USAGE_NONE;
} else if (data.rotation_edit_mode != ROTATION_EDIT_MODE_EULER && p_property.name == "rotation") {
p_property.usage = PROPERTY_USAGE_NONE;
} else if (data.rotation_edit_mode != ROTATION_EDIT_MODE_EULER && p_property.name == "rotation_order") {
p_property.usage = PROPERTY_USAGE_NONE;
}
}