diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index ce08b3f7541..3e289eeaf33 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -180,8 +180,8 @@ int _OS::get_mouse_button_state() const { return OS::get_singleton()->get_mouse_button_state(); } -String _OS::get_unique_ID() const { - return OS::get_singleton()->get_unique_ID(); +String _OS::get_unique_id() const { + return OS::get_singleton()->get_unique_id(); } bool _OS::has_touchscreen_ui_hint() const { @@ -369,9 +369,9 @@ Error _OS::kill(int p_pid) { return OS::get_singleton()->kill(p_pid); } -int _OS::get_process_ID() const { +int _OS::get_process_id() const { - return OS::get_singleton()->get_process_ID(); + return OS::get_singleton()->get_process_id(); }; bool _OS::has_environment(const String &p_var) const { @@ -800,7 +800,7 @@ void _OS::print_all_textures_by_size() { img.fmt = fmt; img.path = E->get()->get_path(); img.vram = Image::get_image_data_size(img.size.width, img.size.height, Image::Format(img.fmt)); - img.id = E->get()->get_instance_ID(); + img.id = E->get()->get_instance_id(); total += img.vram; imgs.push_back(img); } @@ -1019,7 +1019,7 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "blocking", "output"), &_OS::execute, DEFVAL(Array())); ClassDB::bind_method(D_METHOD("kill", "pid"), &_OS::kill); ClassDB::bind_method(D_METHOD("shell_open", "uri"), &_OS::shell_open); - ClassDB::bind_method(D_METHOD("get_process_ID"), &_OS::get_process_ID); + ClassDB::bind_method(D_METHOD("get_process_id"), &_OS::get_process_id); ClassDB::bind_method(D_METHOD("get_environment", "environment"), &_OS::get_environment); ClassDB::bind_method(D_METHOD("has_environment", "environment"), &_OS::has_environment); @@ -1074,7 +1074,7 @@ void _OS::_bind_methods() { ClassDB::bind_method(D_METHOD("get_data_dir"), &_OS::get_data_dir); ClassDB::bind_method(D_METHOD("get_system_dir", "dir"), &_OS::get_system_dir); - ClassDB::bind_method(D_METHOD("get_unique_ID"), &_OS::get_unique_ID); + ClassDB::bind_method(D_METHOD("get_unique_id"), &_OS::get_unique_id); ClassDB::bind_method(D_METHOD("is_ok_left_and_cancel_right"), &_OS::is_ok_left_and_cancel_right); @@ -2256,7 +2256,7 @@ String _Thread::get_id() const { if (!thread) return String(); - return itos(thread->get_ID()); + return itos(thread->get_id()); } bool _Thread::is_active() const { diff --git a/core/bind/core_bind.h b/core/bind/core_bind.h index ec4fd3f476b..e18d663d853 100644 --- a/core/bind/core_bind.h +++ b/core/bind/core_bind.h @@ -175,7 +175,7 @@ public: Error kill(int p_pid); Error shell_open(String p_uri); - int get_process_ID() const; + int get_process_id() const; bool has_environment(const String &p_var) const; String get_environment(const String &p_var) const; @@ -204,7 +204,7 @@ public: bool is_debug_build() const; - String get_unique_ID() const; + String get_unique_id() const; String get_scancode_string(uint32_t p_code) const; bool is_scancode_unicode(uint32_t p_unicode) const; diff --git a/core/func_ref.cpp b/core/func_ref.cpp index 1121c6d3e4a..2d74efd8221 100644 --- a/core/func_ref.cpp +++ b/core/func_ref.cpp @@ -48,7 +48,7 @@ Variant FuncRef::call_func(const Variant **p_args, int p_argcount, Variant::Call void FuncRef::set_instance(Object *p_obj) { ERR_FAIL_NULL(p_obj); - id = p_obj->get_instance_ID(); + id = p_obj->get_instance_id(); } void FuncRef::set_function(const StringName &p_func) { diff --git a/core/message_queue.cpp b/core/message_queue.cpp index 93d0b0730af..564069d8bb4 100644 --- a/core/message_queue.cpp +++ b/core/message_queue.cpp @@ -153,16 +153,16 @@ Error MessageQueue::push_notification(ObjectID p_id, int p_notification) { Error MessageQueue::push_call(Object *p_object, const StringName &p_method, VARIANT_ARG_DECLARE) { - return push_call(p_object->get_instance_ID(), p_method, VARIANT_ARG_PASS); + return push_call(p_object->get_instance_id(), p_method, VARIANT_ARG_PASS); } Error MessageQueue::push_notification(Object *p_object, int p_notification) { - return push_notification(p_object->get_instance_ID(), p_notification); + return push_notification(p_object->get_instance_id(), p_notification); } Error MessageQueue::push_set(Object *p_object, const StringName &p_prop, const Variant &p_value) { - return push_set(p_object->get_instance_ID(), p_prop, p_value); + return push_set(p_object->get_instance_id(), p_prop, p_value); } void MessageQueue::statistics() { diff --git a/core/object.cpp b/core/object.cpp index 5824084151e..de75257ede0 100644 --- a/core/object.cpp +++ b/core/object.cpp @@ -599,7 +599,7 @@ Variant Object::_call_deferred_bind(const Variant **p_args, int p_argcount, Vari StringName method = *p_args[0]; - MessageQueue::get_singleton()->push_call(get_instance_ID(), method, &p_args[1], p_argcount - 1); + MessageQueue::get_singleton()->push_call(get_instance_id(), method, &p_args[1], p_argcount - 1); return Variant(); } @@ -1247,7 +1247,7 @@ Error Object::emit_signal(const StringName &p_name, const Variant **p_args, int } if (c.flags & CONNECT_DEFERRED) { - MessageQueue::get_singleton()->push_call(target->get_instance_ID(), c.method, args, argc, true); + MessageQueue::get_singleton()->push_call(target->get_instance_id(), c.method, args, argc, true); } else { Variant::CallError ce; target->call(c.method, args, argc, ce); @@ -1478,7 +1478,7 @@ Error Object::connect(const StringName &p_signal, Object *p_to_object, const Str s = &signal_map[p_signal]; } - Signal::Target target(p_to_object->get_instance_ID(), p_to_method); + Signal::Target target(p_to_object->get_instance_id(), p_to_method); if (s->slot_map.has(target)) { ERR_EXPLAIN("Signal '" + p_signal + "'' already connected to given method '" + p_to_method + "' in that object."); ERR_FAIL_COND_V(s->slot_map.has(target), ERR_INVALID_PARAMETER); @@ -1516,7 +1516,7 @@ bool Object::is_connected(const StringName &p_signal, Object *p_to_object, const ERR_FAIL_COND_V(!s, false); } - Signal::Target target(p_to_object->get_instance_ID(), p_to_method); + Signal::Target target(p_to_object->get_instance_id(), p_to_method); return s->slot_map.has(target); //const Map::Element *E = s->slot_map.find(target); @@ -1536,7 +1536,7 @@ void Object::disconnect(const StringName &p_signal, Object *p_to_object, const S ERR_FAIL_COND(s->lock > 0); } - Signal::Target target(p_to_object->get_instance_ID(), p_to_method); + Signal::Target target(p_to_object->get_instance_id(), p_to_method); if (!s->slot_map.has(target)) { ERR_EXPLAIN("Disconnecting nonexistent signal '" + p_signal + "', slot: " + itos(target._id) + ":" + target.method); @@ -1667,7 +1667,7 @@ void Object::_bind_methods() { ClassDB::bind_method(D_METHOD("get_property_list"), &Object::_get_property_list_bind); ClassDB::bind_method(D_METHOD("get_method_list"), &Object::_get_method_list_bind); ClassDB::bind_method(D_METHOD("notification", "what", "reversed"), &Object::notification, DEFVAL(false)); - ClassDB::bind_method(D_METHOD("get_instance_ID"), &Object::get_instance_ID); + ClassDB::bind_method(D_METHOD("get_instance_id"), &Object::get_instance_id); ClassDB::bind_method(D_METHOD("set_script", "script:Script"), &Object::set_script); ClassDB::bind_method(D_METHOD("get_script:Script"), &Object::get_script); @@ -1936,7 +1936,7 @@ ObjectID ObjectDB::instance_counter = 1; HashMap ObjectDB::instance_checks; ObjectID ObjectDB::add_instance(Object *p_object) { - ERR_FAIL_COND_V(p_object->get_instance_ID() != 0, 0); + ERR_FAIL_COND_V(p_object->get_instance_id() != 0, 0); rw_lock->write_lock(); instances[++instance_counter] = p_object; @@ -1952,7 +1952,7 @@ void ObjectDB::remove_instance(Object *p_object) { rw_lock->write_lock(); - instances.erase(p_object->get_instance_ID()); + instances.erase(p_object->get_instance_id()); #ifdef DEBUG_ENABLED instance_checks.erase(p_object); #endif diff --git a/core/object.h b/core/object.h index fd3bb624ec9..f0147080b4d 100644 --- a/core/object.h +++ b/core/object.h @@ -534,7 +534,7 @@ public: bool _is_gpl_reversed() const { return false; } - _FORCE_INLINE_ ObjectID get_instance_ID() const { return _instance_ID; } + _FORCE_INLINE_ ObjectID get_instance_id() const { return _instance_ID; } // this is used for editors void add_change_receptor(Object *p_receptor); diff --git a/core/os/os.cpp b/core/os/os.cpp index 8e4c3571959..3a06a3fa8fa 100644 --- a/core/os/os.cpp +++ b/core/os/os.cpp @@ -129,7 +129,7 @@ String OS::get_executable_path() const { return _execpath; } -int OS::get_process_ID() const { +int OS::get_process_id() const { return -1; }; @@ -175,7 +175,7 @@ static void _OS_printres(Object *p_obj) { if (!res) return; - String str = itos(res->get_instance_ID()) + String(res->get_class()) + ":" + String(res->get_name()) + " - " + res->get_path(); + String str = itos(res->get_instance_id()) + String(res->get_class()) + ":" + String(res->get_name()) + " - " + res->get_path(); if (_OSPRF) _OSPRF->store_line(str); else @@ -412,7 +412,7 @@ void OS::make_rendering_thread() { void OS::swap_buffers() { } -String OS::get_unique_ID() const { +String OS::get_unique_id() const { ERR_FAIL_V(""); } diff --git a/core/os/os.h b/core/os/os.h index 703c6a6bcda..8e2257a0e42 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -197,7 +197,7 @@ public: virtual String get_executable_path() const; virtual Error execute(const String &p_path, const List &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL) = 0; virtual Error kill(const ProcessID &p_pid) = 0; - virtual int get_process_ID() const; + virtual int get_process_id() const; virtual Error shell_open(String p_uri); virtual Error set_cwd(const String &p_cwd); @@ -370,7 +370,7 @@ public: virtual int get_processor_count() const; - virtual String get_unique_ID() const; + virtual String get_unique_id() const; virtual Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track); virtual bool native_video_is_playing() const; diff --git a/core/os/thread.cpp b/core/os/thread.cpp index 98f19686291..bd565334c3a 100644 --- a/core/os/thread.cpp +++ b/core/os/thread.cpp @@ -30,16 +30,16 @@ #include "thread.h" Thread *(*Thread::create_func)(ThreadCreateCallback, void *, const Settings &) = NULL; -Thread::ID (*Thread::get_thread_ID_func)() = NULL; +Thread::ID (*Thread::get_thread_id_func)() = NULL; void (*Thread::wait_to_finish_func)(Thread *) = NULL; Error (*Thread::set_name_func)(const String &) = NULL; Thread::ID Thread::_main_thread_id = 0; -Thread::ID Thread::get_caller_ID() { +Thread::ID Thread::get_caller_id() { - if (get_thread_ID_func) - return get_thread_ID_func(); + if (get_thread_id_func) + return get_thread_id_func(); return 0; } diff --git a/core/os/thread.h b/core/os/thread.h index 3ad5d4bf2c6..1103f67ff26 100644 --- a/core/os/thread.h +++ b/core/os/thread.h @@ -58,7 +58,7 @@ public: protected: static Thread *(*create_func)(ThreadCreateCallback p_callback, void *, const Settings &); - static ID (*get_thread_ID_func)(); + static ID (*get_thread_id_func)(); static void (*wait_to_finish_func)(Thread *); static Error (*set_name_func)(const String &); @@ -69,11 +69,11 @@ protected: Thread(); public: - virtual ID get_ID() const = 0; + virtual ID get_id() const = 0; static Error set_name(const String &p_name); - _FORCE_INLINE_ static ID get_main_ID() { return _main_thread_id; } ///< get the ID of the main thread - static ID get_caller_ID(); ///< get the ID of the caller function ID + _FORCE_INLINE_ static ID get_main_id() { return _main_thread_id; } ///< get the ID of the main thread + static ID get_caller_id(); ///< get the ID of the caller function ID static void wait_to_finish(Thread *p_thread); ///< waits until thread is finished, and deallocates it. static Thread *create(ThreadCreateCallback p_callback, void *p_user, const Settings &p_settings = Settings()); ///< Static function to create a thread, will call p_callback diff --git a/core/os/thread_dummy.h b/core/os/thread_dummy.h index 4155103bbf5..64941a71f82 100644 --- a/core/os/thread_dummy.h +++ b/core/os/thread_dummy.h @@ -39,7 +39,7 @@ class ThreadDummy : public Thread { static Thread *create(ThreadCreateCallback p_callback, void *p_user, const Settings &p_settings = Settings()); public: - virtual ID get_ID() const { return 0; }; + virtual ID get_id() const { return 0; }; static void make_default(); }; diff --git a/core/reference.cpp b/core/reference.cpp index 060608eacb2..066dc8059eb 100644 --- a/core/reference.cpp +++ b/core/reference.cpp @@ -108,12 +108,12 @@ Variant WeakRef::get_ref() const { } void WeakRef::set_obj(Object *p_object) { - ref = p_object ? p_object->get_instance_ID() : 0; + ref = p_object ? p_object->get_instance_id() : 0; } void WeakRef::set_ref(const REF &p_ref) { - ref = p_ref.is_valid() ? p_ref->get_instance_ID() : 0; + ref = p_ref.is_valid() ? p_ref->get_instance_id() : 0; } WeakRef::WeakRef() { diff --git a/core/resource.cpp b/core/resource.cpp index 86069bf2e90..9bce343cbab 100644 --- a/core/resource.cpp +++ b/core/resource.cpp @@ -228,12 +228,12 @@ RID Resource::get_rid() const { void Resource::register_owner(Object *p_owner) { - owners.insert(p_owner->get_instance_ID()); + owners.insert(p_owner->get_instance_id()); } void Resource::unregister_owner(Object *p_owner) { - owners.erase(p_owner->get_instance_ID()); + owners.erase(p_owner->get_instance_id()); } void Resource::notify_change_to_owners() { diff --git a/core/script_debugger_remote.cpp b/core/script_debugger_remote.cpp index d19fe213f6b..fdde08bb32a 100644 --- a/core/script_debugger_remote.cpp +++ b/core/script_debugger_remote.cpp @@ -95,7 +95,7 @@ static Object *_ScriptDebuggerRemote_find = NULL; static void _ScriptDebuggerRemote_debug_func(Object *p_obj) { if (_ScriptDebuggerRemote_find == p_obj) { - _ScriptDebuggerRemote_found_id = p_obj->get_instance_ID(); + _ScriptDebuggerRemote_found_id = p_obj->get_instance_id(); } } @@ -109,7 +109,7 @@ static ObjectID safe_get_instance_id(const Variant &p_v) { REF r = p_v; if (r.is_valid()) { - return r->get_instance_ID(); + return r->get_instance_id(); } else { _ScriptDebuggerRemote_found_id = 0; @@ -572,7 +572,7 @@ void ScriptDebuggerRemote::_send_object_id(ObjectID p_id) { ObjectID id2; Object *obj = var; if (obj) { - id2 = obj->get_instance_ID(); + id2 = obj->get_instance_id(); } else { id2 = 0; } diff --git a/core/undo_redo.cpp b/core/undo_redo.cpp index b3ac9d274ef..637fcd91d45 100644 --- a/core/undo_redo.cpp +++ b/core/undo_redo.cpp @@ -110,7 +110,7 @@ void UndoRedo::add_do_method(Object *p_object, const String &p_method, VARIANT_A ERR_FAIL_COND(action_level <= 0); ERR_FAIL_COND((current_action + 1) >= actions.size()); Operation do_op; - do_op.object = p_object->get_instance_ID(); + do_op.object = p_object->get_instance_id(); if (p_object->cast_to()) do_op.resref = Ref(p_object->cast_to()); @@ -134,7 +134,7 @@ void UndoRedo::add_undo_method(Object *p_object, const String &p_method, VARIANT return; Operation undo_op; - undo_op.object = p_object->get_instance_ID(); + undo_op.object = p_object->get_instance_id(); if (p_object->cast_to()) undo_op.resref = Ref(p_object->cast_to()); @@ -151,7 +151,7 @@ void UndoRedo::add_do_property(Object *p_object, const String &p_property, const ERR_FAIL_COND(action_level <= 0); ERR_FAIL_COND((current_action + 1) >= actions.size()); Operation do_op; - do_op.object = p_object->get_instance_ID(); + do_op.object = p_object->get_instance_id(); if (p_object->cast_to()) do_op.resref = Ref(p_object->cast_to()); @@ -170,7 +170,7 @@ void UndoRedo::add_undo_property(Object *p_object, const String &p_property, con return; Operation undo_op; - undo_op.object = p_object->get_instance_ID(); + undo_op.object = p_object->get_instance_id(); if (p_object->cast_to()) undo_op.resref = Ref(p_object->cast_to()); @@ -184,7 +184,7 @@ void UndoRedo::add_do_reference(Object *p_object) { ERR_FAIL_COND(action_level <= 0); ERR_FAIL_COND((current_action + 1) >= actions.size()); Operation do_op; - do_op.object = p_object->get_instance_ID(); + do_op.object = p_object->get_instance_id(); if (p_object->cast_to()) do_op.resref = Ref(p_object->cast_to()); @@ -201,7 +201,7 @@ void UndoRedo::add_undo_reference(Object *p_object) { return; Operation undo_op; - undo_op.object = p_object->get_instance_ID(); + undo_op.object = p_object->get_instance_id(); if (p_object->cast_to()) undo_op.resref = Ref(p_object->cast_to()); diff --git a/core/variant.cpp b/core/variant.cpp index 0807a337882..51c4b70bdc7 100644 --- a/core/variant.cpp +++ b/core/variant.cpp @@ -1600,7 +1600,7 @@ Variant::operator String() const { }; }; #endif - return "[" + _get_obj().obj->get_class() + ":" + itos(_get_obj().obj->get_instance_ID()) + "]"; + return "[" + _get_obj().obj->get_class() + ":" + itos(_get_obj().obj->get_instance_id()) + "]"; } else return "[Object:null]"; diff --git a/doc/base/classes.xml b/doc/base/classes.xml index cd5b950f57e..7dd22d7cb06 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -27432,7 +27432,7 @@ - + @@ -27558,7 +27558,7 @@ - + @@ -28150,7 +28150,7 @@ - "method_name" is a name of method to which signal is connected. - + @@ -28498,7 +28498,7 @@ Clear all the items in the [OptionButton]. - + @@ -28547,7 +28547,7 @@ Return the current item index - + @@ -28580,7 +28580,7 @@ Select an item by index and make it the current item. - + @@ -30915,7 +30915,7 @@ Add a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. - + @@ -30938,7 +30938,7 @@ Create an [Area2D]. - + @@ -31169,7 +31169,7 @@ Add a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. - + @@ -31241,7 +31241,7 @@ Return the body mode. - + @@ -32659,7 +32659,7 @@ - + @@ -32679,7 +32679,7 @@ - + @@ -32887,7 +32887,7 @@ - + @@ -32951,7 +32951,7 @@ - + @@ -33401,7 +33401,7 @@ - + @@ -33409,7 +33409,7 @@ - + @@ -33427,7 +33427,7 @@ - + @@ -33435,7 +33435,7 @@ - + @@ -35378,7 +35378,7 @@ Clear the popup menu, in effect removing all items. - + @@ -35535,7 +35535,7 @@ Sets whether or not the PopupMenu will hide on item selection. - + diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp index e424590881b..0f4e8f757c3 100644 --- a/drivers/unix/os_unix.cpp +++ b/drivers/unix/os_unix.cpp @@ -415,7 +415,7 @@ Error OS_Unix::kill(const ProcessID &p_pid) { return ret ? ERR_INVALID_PARAMETER : OK; } -int OS_Unix::get_process_ID() const { +int OS_Unix::get_process_id() const { return getpid(); }; diff --git a/drivers/unix/os_unix.h b/drivers/unix/os_unix.h index fdc6d6e28f0..6cd0016bb03 100644 --- a/drivers/unix/os_unix.h +++ b/drivers/unix/os_unix.h @@ -103,7 +103,7 @@ public: virtual Error execute(const String &p_path, const List &p_arguments, bool p_blocking, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL); virtual Error kill(const ProcessID &p_pid); - virtual int get_process_ID() const; + virtual int get_process_id() const; virtual bool has_environment(const String &p_var) const; virtual String get_environment(const String &p_var) const; diff --git a/drivers/unix/thread_posix.cpp b/drivers/unix/thread_posix.cpp index c1559619d77..3b895ff9c15 100644 --- a/drivers/unix/thread_posix.cpp +++ b/drivers/unix/thread_posix.cpp @@ -38,7 +38,7 @@ #include "os/memory.h" -Thread::ID ThreadPosix::get_ID() const { +Thread::ID ThreadPosix::get_id() const { return id; } @@ -75,7 +75,7 @@ Thread *ThreadPosix::create_func_posix(ThreadCreateCallback p_callback, void *p_ return tr; } -Thread::ID ThreadPosix::get_thread_ID_func_posix() { +Thread::ID ThreadPosix::get_thread_id_func_posix() { return (ID)pthread_self(); } @@ -122,7 +122,7 @@ Error ThreadPosix::set_name_func_posix(const String &p_name) { void ThreadPosix::make_default() { create_func = create_func_posix; - get_thread_ID_func = get_thread_ID_func_posix; + get_thread_id_func = get_thread_id_func_posix; wait_to_finish_func = wait_to_finish_func_posix; set_name_func = set_name_func_posix; } diff --git a/drivers/unix/thread_posix.h b/drivers/unix/thread_posix.h index c0c3e578bba..21e1d290a94 100644 --- a/drivers/unix/thread_posix.h +++ b/drivers/unix/thread_posix.h @@ -53,7 +53,7 @@ class ThreadPosix : public Thread { static void *thread_callback(void *userdata); static Thread *create_func_posix(ThreadCreateCallback p_callback, void *, const Settings &); - static ID get_thread_ID_func_posix(); + static ID get_thread_id_func_posix(); static void wait_to_finish_func_posix(Thread *p_thread); static Error set_name_func_posix(const String &p_name); @@ -61,7 +61,7 @@ class ThreadPosix : public Thread { ThreadPosix(); public: - virtual ID get_ID() const; + virtual ID get_id() const; static void make_default(); diff --git a/drivers/windows/thread_windows.cpp b/drivers/windows/thread_windows.cpp index 79077a54c86..01ddf42649a 100644 --- a/drivers/windows/thread_windows.cpp +++ b/drivers/windows/thread_windows.cpp @@ -33,7 +33,7 @@ #include "os/memory.h" -Thread::ID ThreadWindows::get_ID() const { +Thread::ID ThreadWindows::get_id() const { return id; } @@ -72,7 +72,7 @@ Thread *ThreadWindows::create_func_windows(ThreadCreateCallback p_callback, void return tr; } -Thread::ID ThreadWindows::get_thread_ID_func_windows() { +Thread::ID ThreadWindows::get_thread_id_func_windows() { return (ID)GetCurrentThreadId(); //must implement } @@ -88,7 +88,7 @@ void ThreadWindows::wait_to_finish_func_windows(Thread *p_thread) { void ThreadWindows::make_default() { create_func = create_func_windows; - get_thread_ID_func = get_thread_ID_func_windows; + get_thread_id_func = get_thread_id_func_windows; wait_to_finish_func = wait_to_finish_func_windows; } diff --git a/drivers/windows/thread_windows.h b/drivers/windows/thread_windows.h index 162df089752..143825039c1 100644 --- a/drivers/windows/thread_windows.h +++ b/drivers/windows/thread_windows.h @@ -52,13 +52,13 @@ class ThreadWindows : public Thread { static DWORD WINAPI thread_callback(LPVOID userdata); static Thread *create_func_windows(ThreadCreateCallback p_callback, void *, const Settings &); - static ID get_thread_ID_func_windows(); + static ID get_thread_id_func_windows(); static void wait_to_finish_func_windows(Thread *p_thread); ThreadWindows(); public: - virtual ID get_ID() const; + virtual ID get_id() const; static void make_default(); diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp index 81d53097123..06d7d5fdc80 100644 --- a/editor/array_property_edit.cpp +++ b/editor/array_property_edit.cpp @@ -251,7 +251,7 @@ void ArrayPropertyEdit::edit(Object *p_obj, const StringName &p_prop, const Stri page = 0; property = p_prop; - obj = p_obj->get_instance_ID(); + obj = p_obj->get_instance_id(); default_type = p_deftype; if (!p_hint_string.empty()) { diff --git a/editor/asset_library_editor_plugin.cpp b/editor/asset_library_editor_plugin.cpp index f92b70d0c09..2a22cde2fb9 100644 --- a/editor/asset_library_editor_plugin.cpp +++ b/editor/asset_library_editor_plugin.cpp @@ -1136,7 +1136,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const item->connect("category_selected", this, "_select_category"); if (r.has("icon_url") && r["icon_url"] != "") { - _request_image(item->get_instance_ID(), r["icon_url"], IMAGE_QUEUE_ICON, 0); + _request_image(item->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0); } } } break; @@ -1173,7 +1173,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const item->connect("category_selected",this,"_category_selected");*/ if (r.has("icon_url") && r["icon_url"] != "") { - _request_image(description->get_instance_ID(), r["icon_url"], IMAGE_QUEUE_ICON, 0); + _request_image(description->get_instance_id(), r["icon_url"], IMAGE_QUEUE_ICON, 0); } if (d.has("previews")) { @@ -1195,12 +1195,12 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const description->add_preview(i, is_video, video_url); if (p.has("thumbnail")) { - _request_image(description->get_instance_ID(), p["thumbnail"], IMAGE_QUEUE_THUMBNAIL, i); + _request_image(description->get_instance_id(), p["thumbnail"], IMAGE_QUEUE_THUMBNAIL, i); } if (is_video) { - //_request_image(description->get_instance_ID(),p["link"],IMAGE_QUEUE_SCREENSHOT,i); + //_request_image(description->get_instance_id(),p["link"],IMAGE_QUEUE_SCREENSHOT,i); } else { - _request_image(description->get_instance_ID(), p["link"], IMAGE_QUEUE_SCREENSHOT, i); + _request_image(description->get_instance_id(), p["link"], IMAGE_QUEUE_SCREENSHOT, i); } } } diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp index 9762bd20004..47c2cb5536e 100644 --- a/editor/connections_dialog.cpp +++ b/editor/connections_dialog.cpp @@ -220,7 +220,7 @@ void ConnectDialog::_add_bind() { if (cdbinds->params.size() >= VARIANT_ARG_MAX) return; - Variant::Type vt = (Variant::Type)type_list->get_item_ID(type_list->get_selected()); + Variant::Type vt = (Variant::Type)type_list->get_item_id(type_list->get_selected()); Variant value; diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp index c82e8f1226e..c3c3f0d3cad 100644 --- a/editor/editor_data.cpp +++ b/editor/editor_data.cpp @@ -183,7 +183,7 @@ ObjectID EditorHistory::get_current() { if (!obj) return 0; - return obj->get_instance_ID(); + return obj->get_instance_id(); } int EditorHistory::get_path_size() const { @@ -208,7 +208,7 @@ ObjectID EditorHistory::get_path_object(int p_index) const { if (!obj) return 0; - return obj->get_instance_ID(); + return obj->get_instance_id(); } String EditorHistory::get_path_property(int p_index) const { diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp index 5d13c7c2544..addffd6ea33 100644 --- a/editor/editor_log.cpp +++ b/editor/editor_log.cpp @@ -36,7 +36,7 @@ void EditorLog::_error_handler(void *p_self, const char *p_func, const char *p_file, int p_line, const char *p_error, const char *p_errorexp, ErrorHandlerType p_type) { EditorLog *self = (EditorLog *)p_self; - if (self->current != Thread::get_caller_ID()) + if (self->current != Thread::get_caller_id()) return; String err_str; @@ -204,7 +204,7 @@ EditorLog::EditorLog() { eh.userdata = this; add_error_handler(&eh); - current = Thread::get_caller_ID(); + current = Thread::get_caller_id(); EditorNode::get_undo_redo()->set_commit_notify_callback(_undo_redo_cbk, this); } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 4d5dd141723..730ba3cacc7 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -1358,7 +1358,7 @@ void EditorNode::push_item(Object *p_object, const String &p_property) { return; } - uint32_t id = p_object->get_instance_ID(); + uint32_t id = p_object->get_instance_id(); if (id != editor_history.get_current()) { if (p_property == "") diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp index 8ce4f88590b..fdac68ea1fd 100644 --- a/editor/editor_path.cpp +++ b/editor/editor_path.cpp @@ -63,7 +63,7 @@ void EditorPath::_add_children_to_popup(Object *p_obj, int p_depth) { int index = popup->get_item_count(); popup->add_icon_item(icon, E->get().name.capitalize(), objects.size()); popup->set_item_h_offset(index, p_depth * 10 * EDSCALE); - objects.push_back(obj->get_instance_ID()); + objects.push_back(obj->get_instance_id()); _add_children_to_popup(obj, p_depth + 1); } diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp index 89fa004eb14..3d761d72894 100644 --- a/editor/editor_resource_preview.cpp +++ b/editor/editor_resource_preview.cpp @@ -295,7 +295,7 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref &p preview_mutex->lock(); - String path_id = "ID:" + itos(p_res->get_instance_ID()); + String path_id = "ID:" + itos(p_res->get_instance_id()); if (cache.has(path_id) && cache[path_id].last_hash == p_res->hash_edited_version()) { @@ -310,7 +310,7 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref &p //print_line("send to thread "+p_path); QueueItem item; item.function = p_receiver_func; - item.id = p_receiver->get_instance_ID(); + item.id = p_receiver->get_instance_id(); item.resource = p_res; item.path = path_id; item.userdata = p_userdata; @@ -334,7 +334,7 @@ void EditorResourcePreview::queue_resource_preview(const String &p_path, Object //print_line("send to thread "+p_path); QueueItem item; item.function = p_receiver_func; - item.id = p_receiver->get_instance_ID(); + item.id = p_receiver->get_instance_id(); item.path = p_path; item.userdata = p_userdata; diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp index aa97dd237be..4954b1f7417 100644 --- a/editor/editor_run.cpp +++ b/editor/editor_run.cpp @@ -55,7 +55,7 @@ Error EditorRun::run(const String &p_scene, const String p_custom_args, const Li } args.push_back("-epid"); - args.push_back(String::num(OS::get_singleton()->get_process_ID())); + args.push_back(String::num(OS::get_singleton()->get_process_id())); if (debug_collisions) { args.push_back("-debugcol"); diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index a809a68c235..f5d9da195a3 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -385,7 +385,7 @@ void CanvasItemEditor::_add_canvas_item(CanvasItem *p_canvas_item) { return; canvas_items.insert(p_canvas_item,p_info); - p_canvas_item->connect("hide",this,"_visibility_changed",varray(p_canvas_item->get_instance_ID()),CONNECT_ONESHOT); + p_canvas_item->connect("hide",this,"_visibility_changed",varray(p_canvas_item->get_instance_id()),CONNECT_ONESHOT); #endif } @@ -2204,7 +2204,7 @@ void CanvasItemEditor::_find_canvas_items_span(Node *p_node, Rect2 &r_rect, cons if (c->has_meta("_edit_bone_")) { - ObjectID id = c->get_instance_ID(); + ObjectID id = c->get_instance_id(); if (!bone_list.has(id)) { BoneList bone; bone.bone = id; @@ -2769,7 +2769,7 @@ void CanvasItemEditor::_popup_callback(int p_op) { pc.pos = n2d->get_position(); pc.rot = n2d->get_rotation(); pc.scale = n2d->get_scale(); - pc.id = n2d->get_instance_ID(); + pc.id = n2d->get_instance_id(); pose_clipboard.push_back(pc); } } diff --git a/editor/plugins/item_list_editor_plugin.h b/editor/plugins/item_list_editor_plugin.h index 4fed8e49f58..bc009b3d7a8 100644 --- a/editor/plugins/item_list_editor_plugin.h +++ b/editor/plugins/item_list_editor_plugin.h @@ -116,8 +116,8 @@ public: virtual void set_item_enabled(int p_idx, int p_enabled) { ob->set_item_disabled(p_idx, !p_enabled); } virtual bool is_item_enabled(int p_idx) const { return !ob->is_item_disabled(p_idx); } - virtual void set_item_id(int p_idx, int p_id) { ob->set_item_ID(p_idx, p_id); } - virtual int get_item_id(int p_idx) const { return ob->get_item_ID(p_idx); } + virtual void set_item_id(int p_idx, int p_id) { ob->set_item_id(p_idx, p_id); } + virtual int get_item_id(int p_idx) const { return ob->get_item_id(p_idx); } virtual void add_item(); virtual int get_item_count() const; @@ -152,8 +152,8 @@ public: virtual void set_item_enabled(int p_idx, int p_enabled) { pp->set_item_disabled(p_idx, !p_enabled); } virtual bool is_item_enabled(int p_idx) const { return !pp->is_item_disabled(p_idx); } - virtual void set_item_id(int p_idx, int p_id) { pp->set_item_ID(p_idx, p_idx); } - virtual int get_item_id(int p_idx) const { return pp->get_item_ID(p_idx); } + virtual void set_item_id(int p_idx, int p_id) { pp->set_item_id(p_idx, p_idx); } + virtual int get_item_id(int p_idx) const { return pp->get_item_id(p_idx); } virtual void set_item_separator(int p_idx, bool p_separator) { pp->set_item_as_separator(p_idx, p_separator); } virtual bool is_item_separator(int p_idx) const { return pp->is_item_separator(p_idx); } diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index e3184a028e7..62fcc4b4895 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -456,7 +456,7 @@ String ScriptTextEditor::get_name() { } else if (script->get_name() != "") name = script->get_name(); else - name = script->get_class() + "(" + itos(script->get_instance_ID()) + ")"; + name = script->get_class() + "(" + itos(script->get_instance_id()) + ")"; return name; } diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index 2d77bfb2c1d..0bdcb839920 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -665,7 +665,7 @@ void SpatialEditorViewport::_list_select(Ref b) { if (selection_results.size() == 1) { - clicked = selection_results[0].item->get_instance_ID(); + clicked = selection_results[0].item->get_instance_id(); selection_results.clear(); if (clicked) { @@ -2166,7 +2166,7 @@ void SpatialEditorViewport::_selection_result_pressed(int p_result) { if (selection_results.size() <= p_result) return; - clicked = selection_results[p_result].item->get_instance_ID(); + clicked = selection_results[p_result].item->get_instance_id(); if (clicked) { _select_clicked(clicked_wants_append, true); @@ -3039,9 +3039,9 @@ void SpatialEditor::edit(Spatial *p_spatial) { /* if (p_spatial) { _validate_selection(); - if (selected.has(p_spatial->get_instance_ID()) && selected.size()==1) + if (selected.has(p_spatial->get_instance_id()) && selected.size()==1) return; - _select(p_spatial->get_instance_ID(),false,true); + _select(p_spatial->get_instance_id(),false,true); // should become the selection } diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp index f5bb9d4a357..d45a3b1312d 100644 --- a/editor/plugins/theme_editor_plugin.cpp +++ b/editor/plugins/theme_editor_plugin.cpp @@ -104,7 +104,7 @@ struct _TECategory { Ref item; StringName name; - bool operator<(const RefItem &p) const { return item->get_instance_ID() < p.item->get_instance_ID(); } + bool operator<(const RefItem &p) const { return item->get_instance_id() < p.item->get_instance_id(); } }; template diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp index 6b02afe0c1e..a3a10c6c5a7 100644 --- a/editor/property_editor.cpp +++ b/editor/property_editor.cpp @@ -2370,7 +2370,7 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String &p p_item->set_text(1, res->get_path().get_file()); } else if (!res->is_class("Texture")) { //texture already previews via itself - EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res, this, "_resource_preview_done", p_item->get_instance_ID()); + EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res, this, "_resource_preview_done", p_item->get_instance_id()); } } @@ -3630,7 +3630,7 @@ void PropertyEditor::update_tree() { item->set_text(1, res->get_path().get_file()); } else if (!res->is_class("Texture")) { //texture already previews via itself - EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res, this, "_resource_preview_done", item->get_instance_ID()); + EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res, this, "_resource_preview_done", item->get_instance_id()); } } @@ -4586,7 +4586,7 @@ void SectionedPropertyEditor::edit(Object *p_object) { return; } - ObjectID id = p_object->get_instance_ID(); + ObjectID id = p_object->get_instance_id(); if (obj != id) { diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp index c6af9936767..bd68eac9f24 100644 --- a/editor/property_selector.cpp +++ b/editor/property_selector.cpp @@ -418,7 +418,7 @@ void PropertySelector::select_method_from_script(const Ref