summaryrefslogtreecommitdiffstats
path: root/scene/main
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main')
-rw-r--r--scene/main/canvas_item.compat.inc6
-rw-r--r--scene/main/canvas_item.cpp6
-rw-r--r--scene/main/canvas_item.h6
-rw-r--r--scene/main/canvas_layer.cpp6
-rw-r--r--scene/main/canvas_layer.h6
-rw-r--r--scene/main/http_request.cpp6
-rw-r--r--scene/main/http_request.h6
-rw-r--r--scene/main/instance_placeholder.cpp6
-rw-r--r--scene/main/instance_placeholder.h6
-rw-r--r--scene/main/missing_node.cpp6
-rw-r--r--scene/main/missing_node.h6
-rw-r--r--scene/main/multiplayer_api.cpp6
-rw-r--r--scene/main/multiplayer_api.h6
-rw-r--r--scene/main/multiplayer_peer.cpp6
-rw-r--r--scene/main/multiplayer_peer.h6
-rw-r--r--scene/main/node.cpp113
-rw-r--r--scene/main/node.h17
-rw-r--r--scene/main/resource_preloader.cpp6
-rw-r--r--scene/main/resource_preloader.h6
-rw-r--r--scene/main/scene_tree.cpp9
-rw-r--r--scene/main/scene_tree.h7
-rw-r--r--scene/main/shader_globals_override.cpp6
-rw-r--r--scene/main/shader_globals_override.h6
-rw-r--r--scene/main/status_indicator.cpp6
-rw-r--r--scene/main/status_indicator.h6
-rw-r--r--scene/main/timer.cpp6
-rw-r--r--scene/main/timer.h6
-rw-r--r--scene/main/viewport.cpp12
-rw-r--r--scene/main/viewport.h7
-rw-r--r--scene/main/window.cpp6
-rw-r--r--scene/main/window.h6
31 files changed, 233 insertions, 82 deletions
diff --git a/scene/main/canvas_item.compat.inc b/scene/main/canvas_item.compat.inc
index 9bc3d01a69..c759ea5b97 100644
--- a/scene/main/canvas_item.compat.inc
+++ b/scene/main/canvas_item.compat.inc
@@ -2,9 +2,11 @@
/* canvas_item.compat.inc */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index f87dad1889..be2b694f67 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -2,9 +2,11 @@
/* canvas_item.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/canvas_item.h b/scene/main/canvas_item.h
index c74f8238e3..76dd6092a2 100644
--- a/scene/main/canvas_item.h
+++ b/scene/main/canvas_item.h
@@ -2,9 +2,11 @@
/* canvas_item.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/canvas_layer.cpp b/scene/main/canvas_layer.cpp
index 11d074f014..568e77fe0d 100644
--- a/scene/main/canvas_layer.cpp
+++ b/scene/main/canvas_layer.cpp
@@ -2,9 +2,11 @@
/* canvas_layer.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/canvas_layer.h b/scene/main/canvas_layer.h
index be1a377a14..7455367ffe 100644
--- a/scene/main/canvas_layer.h
+++ b/scene/main/canvas_layer.h
@@ -2,9 +2,11 @@
/* canvas_layer.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/http_request.cpp b/scene/main/http_request.cpp
index 8526611093..a641ee9863 100644
--- a/scene/main/http_request.cpp
+++ b/scene/main/http_request.cpp
@@ -2,9 +2,11 @@
/* http_request.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/http_request.h b/scene/main/http_request.h
index 9a91171eaf..0c76624829 100644
--- a/scene/main/http_request.h
+++ b/scene/main/http_request.h
@@ -2,9 +2,11 @@
/* http_request.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/instance_placeholder.cpp b/scene/main/instance_placeholder.cpp
index 9222ce6df3..bcaed88fb3 100644
--- a/scene/main/instance_placeholder.cpp
+++ b/scene/main/instance_placeholder.cpp
@@ -2,9 +2,11 @@
/* instance_placeholder.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/instance_placeholder.h b/scene/main/instance_placeholder.h
index ccf1e63a16..c7d4a81dcb 100644
--- a/scene/main/instance_placeholder.h
+++ b/scene/main/instance_placeholder.h
@@ -2,9 +2,11 @@
/* instance_placeholder.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/missing_node.cpp b/scene/main/missing_node.cpp
index 83672ae5e0..3d4222202b 100644
--- a/scene/main/missing_node.cpp
+++ b/scene/main/missing_node.cpp
@@ -2,9 +2,11 @@
/* missing_node.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/missing_node.h b/scene/main/missing_node.h
index fb1c957988..ee6baa4f40 100644
--- a/scene/main/missing_node.h
+++ b/scene/main/missing_node.h
@@ -2,9 +2,11 @@
/* missing_node.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/multiplayer_api.cpp b/scene/main/multiplayer_api.cpp
index bd097ec2d0..54603a2ef4 100644
--- a/scene/main/multiplayer_api.cpp
+++ b/scene/main/multiplayer_api.cpp
@@ -2,9 +2,11 @@
/* multiplayer_api.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/multiplayer_api.h b/scene/main/multiplayer_api.h
index a578e6f2f1..6d67234174 100644
--- a/scene/main/multiplayer_api.h
+++ b/scene/main/multiplayer_api.h
@@ -2,9 +2,11 @@
/* multiplayer_api.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/multiplayer_peer.cpp b/scene/main/multiplayer_peer.cpp
index 8c9eeea027..394b9eae8c 100644
--- a/scene/main/multiplayer_peer.cpp
+++ b/scene/main/multiplayer_peer.cpp
@@ -2,9 +2,11 @@
/* multiplayer_peer.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/multiplayer_peer.h b/scene/main/multiplayer_peer.h
index ed1d56839f..6dab6a64c2 100644
--- a/scene/main/multiplayer_peer.h
+++ b/scene/main/multiplayer_peer.h
@@ -2,9 +2,11 @@
/* multiplayer_peer.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/node.cpp b/scene/main/node.cpp
index 8dc7b4a87c..c4abae298a 100644
--- a/scene/main/node.cpp
+++ b/scene/main/node.cpp
@@ -2,9 +2,11 @@
/* node.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -215,6 +217,10 @@ void Node::_notification(int p_notification) {
set_process_unhandled_key_input(true);
}
+ if (GDVIRTUAL_IS_OVERRIDDEN(_unhandled_picking_input)) {
+ set_process_unhandled_picking_input(true);
+ }
+
if (GDVIRTUAL_IS_OVERRIDDEN(_process)) {
set_process(true);
}
@@ -1289,6 +1295,27 @@ bool Node::is_processing_unhandled_key_input() const {
return data.unhandled_key_input;
}
+void Node::set_process_unhandled_picking_input(bool p_enable) {
+ ERR_THREAD_GUARD
+ if (p_enable == data.unhandled_picking_input) {
+ return;
+ }
+ data.unhandled_picking_input = p_enable;
+ if (!is_inside_tree()) {
+ return;
+ }
+
+ if (p_enable) {
+ add_to_group("_vp_unhandled_picking_input" + itos(get_viewport()->get_instance_id()));
+ } else {
+ remove_from_group("_vp_unhandled_picking_input" + itos(get_viewport()->get_instance_id()));
+ }
+}
+
+bool Node::is_processing_unhandled_picking_input() const {
+ return data.unhandled_picking_input;
+}
+
void Node::set_auto_translate_mode(AutoTranslateMode p_mode) {
ERR_THREAD_GUARD
if (data.auto_translate_mode == p_mode) {
@@ -1915,24 +1942,52 @@ Node *Node::find_child(const String &p_pattern, bool p_recursive, bool p_owned)
// Can be recursive or not, and limited to owned nodes.
TypedArray<Node> Node::find_children(const String &p_pattern, const String &p_type, bool p_recursive, bool p_owned) const {
ERR_THREAD_GUARD_V(TypedArray<Node>());
- TypedArray<Node> ret;
- ERR_FAIL_COND_V(p_pattern.is_empty() && p_type.is_empty(), ret);
- _update_children_cache();
- Node *const *cptr = data.children_cache.ptr();
- int ccount = data.children_cache.size();
- for (int i = 0; i < ccount; i++) {
- if (p_owned && !cptr[i]->data.owner) {
- continue;
+ TypedArray<Node> matches;
+ ERR_FAIL_COND_V(p_pattern.is_empty() && p_type.is_empty(), matches);
+
+ // Save basic pattern and type info for faster lookup
+ bool is_pattern_empty = p_pattern.is_empty();
+ bool is_type_empty = p_type.is_empty();
+ bool is_type_global_class = !is_type_empty && ScriptServer::is_global_class(p_type);
+ String type_global_path = is_type_global_class ? ScriptServer::get_global_class_path(p_type) : "";
+
+ LocalVector<Node *> to_search;
+ to_search.push_back((Node *)this);
+ bool is_adding_children = true;
+ while (!to_search.is_empty()) {
+ // Pop the next entry off the search stack
+ Node *entry = Object::cast_to<Node>(to_search[0]);
+ to_search.remove_at(0);
+
+ // Add all the children to the list to search
+ entry->_update_children_cache();
+ if (is_adding_children) {
+ Node *const *cptr = entry->data.children_cache.ptr();
+ int ccount = entry->data.children_cache.size();
+ for (int i = 0; i < ccount; i++) {
+ if (p_owned && !cptr[i]->data.owner) {
+ continue;
+ }
+
+ to_search.push_back(cptr[i]);
+ }
+
+ // Stop further child adding if we don't want recursive
+ if (!p_recursive) {
+ is_adding_children = false;
+ }
}
- if (p_pattern.is_empty() || cptr[i]->data.name.operator String().match(p_pattern)) {
- if (p_type.is_empty() || cptr[i]->is_class(p_type)) {
- ret.append(cptr[i]);
- } else if (cptr[i]->get_script_instance()) {
- Ref<Script> scr = cptr[i]->get_script_instance()->get_script();
+ // Check if the entry matches
+ bool is_pattern_match = is_pattern_empty || entry->data.name.operator String().match(p_pattern);
+ bool is_type_match = is_type_empty || entry->is_class(p_type);
+ bool is_script_type_match = false;
+ if (!is_type_match) {
+ if (ScriptInstance *script_inst = entry->get_script_instance()) {
+ Ref<Script> scr = script_inst->get_script();
while (scr.is_valid()) {
- if ((ScriptServer::is_global_class(p_type) && ScriptServer::get_global_class_path(p_type) == scr->get_path()) || p_type == scr->get_path()) {
- ret.append(cptr[i]);
+ if ((is_type_global_class && type_global_path == scr->get_path()) || p_type == scr->get_path()) {
+ is_script_type_match = true;
break;
}
@@ -1941,12 +1996,13 @@ TypedArray<Node> Node::find_children(const String &p_pattern, const String &p_ty
}
}
- if (p_recursive) {
- ret.append_array(cptr[i]->find_children(p_pattern, p_type, true, p_owned));
+ // Save it if it matches the pattern and at least one type
+ if (is_pattern_match && (is_type_match || is_script_type_match)) {
+ matches.append(entry);
}
}
- return ret;
+ return matches;
}
void Node::reparent(Node *p_parent, bool p_keep_global_transform) {
@@ -3466,6 +3522,16 @@ void Node::_call_unhandled_key_input(const Ref<InputEvent> &p_event) {
unhandled_key_input(p_event);
}
+void Node::_call_unhandled_picking_input(const Ref<InputEvent> &p_event) {
+ if (p_event->get_device() != InputEvent::DEVICE_ID_INTERNAL) {
+ GDVIRTUAL_CALL(_unhandled_picking_input, p_event);
+ }
+ if (!is_inside_tree() || !get_viewport() || get_viewport()->is_input_handled()) {
+ return;
+ }
+ unhandled_key_input(p_event);
+}
+
void Node::_validate_property(PropertyInfo &p_property) const {
if ((p_property.name == "process_thread_group_order" || p_property.name == "process_thread_messages") && data.process_thread_group == PROCESS_THREAD_GROUP_INHERIT) {
p_property.usage = 0;
@@ -3484,6 +3550,9 @@ void Node::unhandled_input(const Ref<InputEvent> &p_event) {
void Node::unhandled_key_input(const Ref<InputEvent> &p_key_event) {
}
+void Node::unhandled_picking_input(const Ref<InputEvent> &p_picking_event) {
+}
+
Variant Node::_call_deferred_thread_group_bind(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
if (p_argcount < 1) {
r_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
@@ -3637,6 +3706,8 @@ void Node::_bind_methods() {
ClassDB::bind_method(D_METHOD("is_processing_unhandled_input"), &Node::is_processing_unhandled_input);
ClassDB::bind_method(D_METHOD("set_process_unhandled_key_input", "enable"), &Node::set_process_unhandled_key_input);
ClassDB::bind_method(D_METHOD("is_processing_unhandled_key_input"), &Node::is_processing_unhandled_key_input);
+ ClassDB::bind_method(D_METHOD("set_process_unhandled_picking_input", "enable"), &Node::set_process_unhandled_picking_input);
+ ClassDB::bind_method(D_METHOD("is_processing_unhandled_picking_input"), &Node::is_processing_unhandled_picking_input);
ClassDB::bind_method(D_METHOD("set_process_mode", "mode"), &Node::set_process_mode);
ClassDB::bind_method(D_METHOD("get_process_mode"), &Node::get_process_mode);
ClassDB::bind_method(D_METHOD("can_process"), &Node::can_process);
@@ -3876,6 +3947,7 @@ void Node::_bind_methods() {
GDVIRTUAL_BIND(_shortcut_input, "event");
GDVIRTUAL_BIND(_unhandled_input, "event");
GDVIRTUAL_BIND(_unhandled_key_input, "event");
+ GDVIRTUAL_BIND(_unhandled_picking_input, "event");
}
String Node::_get_name_num_separator() {
@@ -3910,6 +3982,7 @@ Node::Node() {
data.shortcut_input = false;
data.unhandled_input = false;
data.unhandled_key_input = false;
+ data.unhandled_picking_input = false;
data.physics_interpolated = true;
data.physics_interpolation_reset_requested = false;
diff --git a/scene/main/node.h b/scene/main/node.h
index e2f3ce9b78..8b42e9ec6e 100644
--- a/scene/main/node.h
+++ b/scene/main/node.h
@@ -2,9 +2,11 @@
/* node.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -219,6 +221,7 @@ private:
bool shortcut_input : 1;
bool unhandled_input : 1;
bool unhandled_key_input : 1;
+ bool unhandled_picking_input : 1;
// Physics interpolation can be turned on and off on a per node basis.
// This only takes effect when the SceneTree (or project setting) physics interpolation
@@ -369,6 +372,7 @@ protected:
void _call_shortcut_input(const Ref<InputEvent> &p_event);
void _call_unhandled_input(const Ref<InputEvent> &p_event);
void _call_unhandled_key_input(const Ref<InputEvent> &p_event);
+ void _call_unhandled_picking_input(const Ref<InputEvent> &p_event);
void _validate_property(PropertyInfo &p_property) const;
@@ -377,6 +381,7 @@ protected:
virtual void shortcut_input(const Ref<InputEvent> &p_key_event);
virtual void unhandled_input(const Ref<InputEvent> &p_event);
virtual void unhandled_key_input(const Ref<InputEvent> &p_key_event);
+ virtual void unhandled_picking_input(const Ref<InputEvent> &p_picking_event);
GDVIRTUAL1(_process, double)
GDVIRTUAL1(_physics_process, double)
@@ -389,6 +394,7 @@ protected:
GDVIRTUAL1(_shortcut_input, Ref<InputEvent>)
GDVIRTUAL1(_unhandled_input, Ref<InputEvent>)
GDVIRTUAL1(_unhandled_key_input, Ref<InputEvent>)
+ GDVIRTUAL1(_unhandled_picking_input, Ref<InputEvent>)
public:
enum {
@@ -413,7 +419,7 @@ public:
NOTIFICATION_POST_ENTER_TREE = 27,
NOTIFICATION_DISABLED = 28,
NOTIFICATION_ENABLED = 29,
- NOTIFICATION_RESET_PHYSICS_INTERPOLATION = 2001, // A GodotSpace Odyssey.
+ NOTIFICATION_RESET_PHYSICS_INTERPOLATION = 2001, // I cannot do that Redot.
// Keep these linked to Node.
NOTIFICATION_WM_MOUSE_ENTER = 1002,
NOTIFICATION_WM_MOUSE_EXIT = 1003,
@@ -608,6 +614,9 @@ public:
void set_process_unhandled_key_input(bool p_enable);
bool is_processing_unhandled_key_input() const;
+ void set_process_unhandled_picking_input(bool p_enable);
+ bool is_processing_unhandled_picking_input() const;
+
_FORCE_INLINE_ bool _is_any_processing() const {
return data.process || data.process_internal || data.physics_process || data.physics_process_internal;
}
@@ -856,7 +865,7 @@ Error Node::rpc_id(int p_peer_id, const StringName &p_method, VarArgs... p_args)
#endif
// Add these macro to your class's 'get_configuration_warnings' function to have warnings show up in the scene tree inspector.
-#define DEPRECATED_NODE_WARNING warnings.push_back(RTR("This node is marked as deprecated and will be removed in future versions.\nPlease check the Godot documentation for information about migration."));
+#define DEPRECATED_NODE_WARNING warnings.push_back(RTR("This node is marked as deprecated and will be removed in future versions.\nPlease check the Redot documentation for information about migration."));
#define EXPERIMENTAL_NODE_WARNING warnings.push_back(RTR("This node is marked as experimental and may be subject to removal or major changes in future versions."));
#endif // NODE_H
diff --git a/scene/main/resource_preloader.cpp b/scene/main/resource_preloader.cpp
index fe0e82370a..013b05f52b 100644
--- a/scene/main/resource_preloader.cpp
+++ b/scene/main/resource_preloader.cpp
@@ -2,9 +2,11 @@
/* resource_preloader.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/resource_preloader.h b/scene/main/resource_preloader.h
index 3ce538c60e..4ac6f9761b 100644
--- a/scene/main/resource_preloader.h
+++ b/scene/main/resource_preloader.h
@@ -2,9 +2,11 @@
/* resource_preloader.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 60cecfcfe7..5d6aa13a9b 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -2,9 +2,11 @@
/* scene_tree.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -1323,6 +1325,9 @@ void SceneTree::_call_input_pause(const StringName &p_group, CallInputType p_cal
case CALL_INPUT_TYPE_UNHANDLED_KEY_INPUT:
n->_call_unhandled_key_input(p_input);
break;
+ case CALL_INPUT_TYPE_UNHANDLED_PICKING_INPUT:
+ n->_call_unhandled_picking_input(p_input);
+ break;
}
}
diff --git a/scene/main/scene_tree.h b/scene/main/scene_tree.h
index 291e4a5a0c..6fbdd4e234 100644
--- a/scene/main/scene_tree.h
+++ b/scene/main/scene_tree.h
@@ -2,9 +2,11 @@
/* scene_tree.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -266,6 +268,7 @@ private:
CALL_INPUT_TYPE_SHORTCUT_INPUT,
CALL_INPUT_TYPE_UNHANDLED_INPUT,
CALL_INPUT_TYPE_UNHANDLED_KEY_INPUT,
+ CALL_INPUT_TYPE_UNHANDLED_PICKING_INPUT,
};
//used by viewport
diff --git a/scene/main/shader_globals_override.cpp b/scene/main/shader_globals_override.cpp
index 41e0aa739e..c05efb418a 100644
--- a/scene/main/shader_globals_override.cpp
+++ b/scene/main/shader_globals_override.cpp
@@ -2,9 +2,11 @@
/* shader_globals_override.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/shader_globals_override.h b/scene/main/shader_globals_override.h
index d8557ecf6a..e12a540b5a 100644
--- a/scene/main/shader_globals_override.h
+++ b/scene/main/shader_globals_override.h
@@ -2,9 +2,11 @@
/* shader_globals_override.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/status_indicator.cpp b/scene/main/status_indicator.cpp
index f0ba5db1a0..e308cc004a 100644
--- a/scene/main/status_indicator.cpp
+++ b/scene/main/status_indicator.cpp
@@ -2,9 +2,11 @@
/* status_indicator.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/status_indicator.h b/scene/main/status_indicator.h
index cd38da6e6c..507bdf289f 100644
--- a/scene/main/status_indicator.h
+++ b/scene/main/status_indicator.h
@@ -2,9 +2,11 @@
/* status_indicator.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/timer.cpp b/scene/main/timer.cpp
index 0f4f18b495..cc2bc8757a 100644
--- a/scene/main/timer.cpp
+++ b/scene/main/timer.cpp
@@ -2,9 +2,11 @@
/* timer.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/timer.h b/scene/main/timer.h
index d16e49793d..3282ab57d8 100644
--- a/scene/main/timer.h
+++ b/scene/main/timer.h
@@ -2,9 +2,11 @@
/* timer.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index 5a90eb8f3e..9734b1c260 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -2,9 +2,11 @@
/* viewport.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -962,6 +964,11 @@ void Viewport::_process_picking() {
}
}
#endif // _3D_DISABLED
+
+ if (!local_input_handled) {
+ ERR_FAIL_COND(!is_inside_tree());
+ get_tree()->_call_input_pause(unhandled_picking_input_group, SceneTree::CALL_INPUT_TYPE_UNHANDLED_PICKING_INPUT, ev, this);
+ }
}
}
@@ -4993,6 +5000,7 @@ Viewport::Viewport() {
unhandled_input_group = "_vp_unhandled_input" + id;
shortcut_input_group = "_vp_shortcut_input" + id;
unhandled_key_input_group = "_vp_unhandled_key_input" + id;
+ unhandled_picking_input_group = "_vp_unhandled_picking_input" + id;
// Window tooltip.
gui.tooltip_delay = GLOBAL_GET("gui/timers/tooltip_delay_sec");
diff --git a/scene/main/viewport.h b/scene/main/viewport.h
index 92691ccbec..31fbefe841 100644
--- a/scene/main/viewport.h
+++ b/scene/main/viewport.h
@@ -2,9 +2,11 @@
/* viewport.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
@@ -277,6 +279,7 @@ private:
StringName shortcut_input_group;
StringName unhandled_input_group;
StringName unhandled_key_input_group;
+ StringName unhandled_picking_input_group;
void _update_audio_listener_2d();
diff --git a/scene/main/window.cpp b/scene/main/window.cpp
index 045c3ae02d..c25c317654 100644
--- a/scene/main/window.cpp
+++ b/scene/main/window.cpp
@@ -2,9 +2,11 @@
/* window.cpp */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
diff --git a/scene/main/window.h b/scene/main/window.h
index 0994fc6012..d0f9cd11b9 100644
--- a/scene/main/window.h
+++ b/scene/main/window.h
@@ -2,9 +2,11 @@
/* window.h */
/**************************************************************************/
/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
+/* REDOT ENGINE */
+/* https://redotengine.org */
/**************************************************************************/
+/* Copyright (c) 2024-present Redot Engine contributors */
+/* (see REDOT_AUTHORS.md) */
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */