diff options
author | Juan Linietsky <reduzio@gmail.com> | 2023-04-10 18:45:53 +0200 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2023-05-09 19:17:51 +0200 |
commit | 98c655ec8db17e50afa58284b1dcad754034db4b (patch) | |
tree | 8ff8126e58e15a2c52724f783ca4ba194cf11ebb /core/object/object.cpp | |
parent | cf8ad12b56df4ae7bba4c73070dd035693a880e4 (diff) | |
download | redot-engine-98c655ec8db17e50afa58284b1dcad754034db4b.tar.gz |
Refactor Node Processing
* Node processing works on the concept of process groups.
* A node group can be inherited, run on main thread, or a sub-thread.
* Groups can be ordered.
* Process priority is now present for physics.
This is the first steps towards implementing https://github.com/godotengine/godot-proposals/issues/6424.
No threading or thread guards exist yet in most of the scene code other than Node. That will have to be added later.
Diffstat (limited to 'core/object/object.cpp')
-rw-r--r-- | core/object/object.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/object/object.cpp b/core/object/object.cpp index 8ec385c0eb..1d63809fb1 100644 --- a/core/object/object.cpp +++ b/core/object/object.cpp @@ -201,6 +201,10 @@ bool Object::_predelete() { return _predelete_ok; } +void Object::cancel_free() { + _predelete_ok = false; +} + void Object::_postinitialize() { _class_name_ptr = _get_class_namev(); // Set the direct pointer, which is much faster to obtain, but can only happen after postinitialize. _initialize_classv(); @@ -1561,6 +1565,7 @@ void Object::_bind_methods() { ClassDB::bind_method(D_METHOD("tr_n", "message", "plural_message", "n", "context"), &Object::tr_n, DEFVAL("")); ClassDB::bind_method(D_METHOD("is_queued_for_deletion"), &Object::is_queued_for_deletion); + ClassDB::bind_method(D_METHOD("cancel_free"), &Object::cancel_free); ClassDB::add_virtual_method("Object", MethodInfo("free"), false); |