From 3c31863f7860432029b0f6d98e55bf2a4af0893e Mon Sep 17 00:00:00 2001 From: Aaron Franke Date: Mon, 9 Dec 2024 14:29:05 -0800 Subject: [PATCH] Capitalize PRINT_VERBOSE macro to avoid a conflict with UtilityFunctions --- core/debugger/remote_debugger_peer.cpp | 4 +- core/input/input.cpp | 4 +- core/io/file_access_pack.cpp | 4 +- core/io/remote_filesystem_client.cpp | 16 +-- core/io/resource_loader.cpp | 10 +- core/object/worker_thread_pool.cpp | 2 +- core/string/print_string.h | 2 +- core/string/string_name.cpp | 2 +- core/variant/variant_utility.cpp | 2 - core/variant/variant_utility.h | 1 - drivers/alsa/audio_driver_alsa.cpp | 6 +- drivers/coreaudio/audio_driver_coreaudio.mm | 10 +- .../d3d12/rendering_device_driver_d3d12.cpp | 44 +++---- drivers/egl/egl_manager.cpp | 6 +- drivers/gles3/shader_gles3.cpp | 2 +- .../metal/rendering_device_driver_metal.mm | 8 +- .../pulseaudio/audio_driver_pulseaudio.cpp | 24 ++-- drivers/unix/ip_unix.cpp | 4 +- drivers/unix/net_socket_unix.cpp | 18 +-- .../rendering_context_driver_vulkan.cpp | 6 +- .../vulkan/rendering_device_driver_vulkan.cpp | 44 +++---- drivers/wasapi/audio_driver_wasapi.cpp | 52 ++++---- drivers/windows/file_access_windows.cpp | 2 +- drivers/windows/ip_windows.cpp | 4 +- drivers/windows/net_socket_winsock.cpp | 20 +-- editor/debugger/editor_file_server.cpp | 20 +-- editor/dependency_editor.cpp | 4 +- editor/doc_tools.cpp | 2 +- editor/editor_file_system.cpp | 4 +- editor/editor_help.cpp | 2 +- editor/editor_node.cpp | 6 +- editor/editor_settings.cpp | 4 +- editor/export/codesign.cpp | 40 +++--- editor/export/editor_export_platform.cpp | 4 +- editor/filesystem_dock.cpp | 12 +- editor/find_in_files.cpp | 12 +- editor/import/3d/resource_importer_obj.cpp | 6 +- editor/import/3d/resource_importer_scene.cpp | 8 +- .../import/dynamic_font_import_settings.cpp | 4 +- editor/import/resource_importer_bmfont.cpp | 6 +- .../import/resource_importer_dynamic_font.cpp | 6 +- editor/import/resource_importer_imagefont.cpp | 6 +- editor/localization_editor.cpp | 8 +- editor/project_converter_3_to_4.cpp | 2 +- editor/project_manager/project_list.cpp | 6 +- editor/surface_upgrade_tool.cpp | 2 +- editor/themes/editor_theme_manager.cpp | 10 +- main/main.cpp | 6 +- main/steam_tracker.cpp | 2 +- modules/astcenc/image_compress_astcenc.cpp | 6 +- .../basis_universal/image_compress_basisu.cpp | 4 +- modules/bcdec/image_decompress_bcdec.cpp | 4 +- modules/betsy/image_compress_betsy.cpp | 2 +- modules/camera/camera_feed_linux.cpp | 2 +- modules/csg/csg_shape.cpp | 2 +- modules/cvtt/image_compress_cvtt.cpp | 2 +- modules/etcpak/image_compress_etcpak.cpp | 2 +- .../editor/editor_scene_importer_fbx2gltf.cpp | 6 +- .../fbx/editor/editor_scene_importer_ufbx.cpp | 2 +- modules/fbx/fbx_document.cpp | 30 ++--- modules/gdscript/gdscript.cpp | 6 +- .../gltf_document_extension_physics.cpp | 2 +- modules/gltf/gltf_document.cpp | 70 +++++------ modules/jolt_physics/jolt_globals.cpp | 2 +- modules/lightmapper_rd/lightmapper_rd.cpp | 2 +- modules/mbedtls/crypto_mbedtls.cpp | 10 +- modules/mono/csharp_script.cpp | 6 +- modules/mono/editor/code_completion.cpp | 2 +- modules/mono/mono_gd/gd_mono.cpp | 14 +-- .../openxr_debug_utils_extension.cpp | 2 +- .../openxr_htc_vive_tracker_extension.cpp | 2 +- .../openxr_visibility_mask_extension.cpp | 2 +- modules/openxr/openxr_api.cpp | 98 +++++++-------- modules/openxr/openxr_interface.cpp | 4 +- .../vorbis/resource_importer_ogg_vorbis.cpp | 2 +- .../websocket/websocket_multiplayer_peer.cpp | 4 +- modules/websocket/wsl_peer.cpp | 12 +- platform/android/export/export_plugin.cpp | 118 +++++++++--------- .../android/export/gradle_export_util.cpp | 6 +- platform/android/os_android.cpp | 12 +- platform/ios/export/export_plugin.cpp | 2 +- platform/ios/godot_view.mm | 6 +- platform/ios/ios.mm | 2 +- platform/ios/joypad_ios.mm | 6 +- platform/ios/os_ios.mm | 2 +- platform/ios/tts_ios.mm | 2 +- platform/ios/view_controller.mm | 6 +- .../linuxbsd/freedesktop_portal_desktop.cpp | 4 +- platform/linuxbsd/freedesktop_screensaver.cpp | 8 +- platform/linuxbsd/joypad_linux.cpp | 12 +- platform/linuxbsd/os_linuxbsd.cpp | 2 +- platform/linuxbsd/tts_linux.cpp | 8 +- .../linuxbsd/wayland/detect_prime_egl.cpp | 18 +-- .../wayland/display_server_wayland.cpp | 18 +-- platform/linuxbsd/wayland/wayland_thread.cpp | 14 +-- platform/linuxbsd/x11/detect_prime_x11.cpp | 18 +-- platform/linuxbsd/x11/display_server_x11.cpp | 58 ++++----- platform/macos/export/export_plugin.cpp | 42 +++---- platform/macos/joypad_macos.mm | 10 +- platform/macos/tts_macos.mm | 4 +- platform/web/display_server_web.cpp | 2 +- platform/windows/display_server_windows.cpp | 4 +- .../windows/gl_manager_windows_native.cpp | 18 +-- platform/windows/joypad_windows.cpp | 2 +- platform/windows/os_windows.cpp | 6 +- platform/windows/tts_windows.cpp | 4 +- platform/windows/wgl_detect_version.cpp | 2 +- platform/windows/windows_utils.cpp | 4 +- scene/resources/2d/polygon_path_finder.cpp | 2 +- scene/resources/3d/importer_mesh.cpp | 2 +- scene/resources/bit_map.cpp | 2 +- scene/resources/mesh.cpp | 6 +- servers/audio/audio_stream.cpp | 2 +- servers/camera_server.cpp | 4 +- servers/rendering/renderer_rd/shader_rd.cpp | 2 +- servers/rendering/rendering_device.cpp | 8 +- .../rendering/rendering_server_default.cpp | 2 +- servers/text_server.cpp | 8 +- servers/xr_server.cpp | 6 +- tests/core/math/test_astar.h | 12 +- 120 files changed, 627 insertions(+), 630 deletions(-) diff --git a/core/debugger/remote_debugger_peer.cpp b/core/debugger/remote_debugger_peer.cpp index 499b221ce6a7..7c0b7f4a1772 100644 --- a/core/debugger/remote_debugger_peer.cpp +++ b/core/debugger/remote_debugger_peer.cpp @@ -168,12 +168,12 @@ Error RemoteDebuggerPeerTCP::connect_to_host(const String &p_host, uint16_t p_po for (int i = 0; i < tries; i++) { tcp_client->poll(); if (tcp_client->get_status() == StreamPeerTCP::STATUS_CONNECTED) { - print_verbose("Remote Debugger: Connected!"); + PRINT_VERBOSE("Remote Debugger: Connected!"); break; } else { const int ms = waits[i]; OS::get_singleton()->delay_usec(ms * 1000); - print_verbose("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec."); + PRINT_VERBOSE("Remote Debugger: Connection failed with status: '" + String::num(tcp_client->get_status()) + "', retrying in " + String::num(ms) + " msec."); } } diff --git a/core/input/input.cpp b/core/input/input.cpp index c50e8b0163cc..6dfa9c6a8a0c 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -1653,7 +1653,7 @@ void Input::parse_mapping(const String &p_mapping) { JoyButton output_button = _get_output_button(output); JoyAxis output_axis = _get_output_axis(output); if (output_button == JoyButton::INVALID && output_axis == JoyAxis::INVALID) { - print_verbose(vformat("Unrecognized output string \"%s\" in mapping:\n%s", output, p_mapping)); + PRINT_VERBOSE(vformat("Unrecognized output string \"%s\" in mapping:\n%s", output, p_mapping)); continue; } ERR_CONTINUE_MSG(output_button != JoyButton::INVALID && output_axis != JoyAxis::INVALID, @@ -1833,7 +1833,7 @@ Input::Input() { continue; } - print_verbose(vformat("Device Ignored -- Vendor: %s Product: %s", vid_pid[0], vid_pid[1])); + PRINT_VERBOSE(vformat("Device Ignored -- Vendor: %s Product: %s", vid_pid[0], vid_pid[1])); const uint16_t vid_unswapped = vid_pid[0].hex_to_int(); const uint16_t pid_unswapped = vid_pid[1].hex_to_int(); const uint16_t vid = BSWAP16(vid_unswapped); diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index 5ccd8a8fb758..effd5227fa48 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -219,7 +219,7 @@ bool PackedSourcePCK::try_open_pack(const String &p_path, bool p_replace_files, magic = f->get_32(); if (magic == PACK_HEADER_MAGIC) { #ifdef DEBUG_ENABLED - print_verbose("PCK header found in executable pck section, loading from offset 0x" + String::num_int64(pck_off - 4, 16)); + PRINT_VERBOSE("PCK header found in executable pck section, loading from offset 0x" + String::num_int64(pck_off - 4, 16)); #endif pck_header_found = true; break; @@ -247,7 +247,7 @@ bool PackedSourcePCK::try_open_pack(const String &p_path, bool p_replace_files, magic = f->get_32(); if (magic == PACK_HEADER_MAGIC) { #ifdef DEBUG_ENABLED - print_verbose("PCK header found at the end of executable, loading from offset 0x" + String::num_int64(f->get_position() - 4, 16)); + PRINT_VERBOSE("PCK header found at the end of executable, loading from offset 0x" + String::num_int64(f->get_position() - 4, 16)); #endif pck_header_found = true; } diff --git a/core/io/remote_filesystem_client.cpp b/core/io/remote_filesystem_client.cpp index c3f9a0016cd2..08ad8fd319f7 100644 --- a/core/io/remote_filesystem_client.cpp +++ b/core/io/remote_filesystem_client.cpp @@ -152,7 +152,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int IPAddress ip = p_host.is_valid_ip_address() ? IPAddress(p_host) : IP::get_singleton()->resolve_hostname(p_host); ERR_FAIL_COND_V_MSG(!ip.is_valid(), ERR_INVALID_PARAMETER, vformat("Unable to resolve remote filesystem server hostname: '%s'.", p_host)); - print_verbose(vformat("Remote Filesystem: Connecting to host %s, port %d.", ip, p_port)); + PRINT_VERBOSE(vformat("Remote Filesystem: Connecting to host %s, port %d.", ip, p_port)); Error err = tcp_client->connect_to_host(ip, p_port); ERR_FAIL_COND_V_MSG(err != OK, err, vformat("Unable to open connection to remote file server (%s, port %d) failed.", String(p_host), p_port)); @@ -166,17 +166,17 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int } // Connection OK, now send the current file state. - print_verbose("Remote Filesystem: Connection OK."); + PRINT_VERBOSE("Remote Filesystem: Connection OK."); // Header (GRFS) - Godot Remote File System - print_verbose("Remote Filesystem: Sending header"); + PRINT_VERBOSE("Remote Filesystem: Sending header"); tcp_client->put_u8('G'); tcp_client->put_u8('R'); tcp_client->put_u8('F'); tcp_client->put_u8('S'); // Protocol version tcp_client->put_32(FILESYSTEM_PROTOCOL_VERSION); - print_verbose("Remote Filesystem: Sending password"); + PRINT_VERBOSE("Remote Filesystem: Sending password"); uint8_t password[PASSWORD_LENGTH]; // Send fixed size password, since it's easier and safe to validate. for (int i = 0; i < PASSWORD_LENGTH; i++) { if (i < p_password.length()) { @@ -186,7 +186,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int } } tcp_client->put_data(password, PASSWORD_LENGTH); - print_verbose("Remote Filesystem: Tags."); + PRINT_VERBOSE("Remote Filesystem: Tags."); Vector tags; { tags.push_back(OS::get_singleton()->get_identifier()); @@ -207,7 +207,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int tcp_client->put_utf8_string(tags[i]); } // Size of compressed list of files - print_verbose("Remote Filesystem: Sending file list"); + PRINT_VERBOSE("Remote Filesystem: Sending file list"); Vector file_cache = _load_cache_file(); @@ -306,7 +306,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int new_file_cache.push_back(fc); } - print_verbose("Remote Filesystem: Updating the cache file."); + PRINT_VERBOSE("Remote Filesystem: Updating the cache file."); // Go through the list of local files read initially (file_cache) and see which ones are // unchanged (not sent again from the server). @@ -322,7 +322,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int err = _store_cache_file(new_file_cache); ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_CANT_OPEN, "Error writing the remote filesystem file cache."); - print_verbose("Remote Filesystem: Update success."); + PRINT_VERBOSE("Remote Filesystem: Update success."); _update_cache_path(r_cache_path); return OK; diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index ffab8f1f4ff0..8a9a3cababf7 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -361,7 +361,7 @@ void ResourceLoader::_run_load_task(void *p_userdata) { bool xl_remapped = false; const String &remapped_path = _path_remap(load_task.local_path, &xl_remapped); - print_verbose("Loading resource: " + remapped_path); + PRINT_VERBOSE("Loading resource: " + remapped_path); Error load_err = OK; Ref res = _load(remapped_path, remapped_path != load_task.local_path ? load_task.local_path : String(), load_task.type_hint, load_task.cache_mode, &load_err, load_task.use_sub_threads, &load_task.progress); @@ -370,7 +370,7 @@ void ResourceLoader::_run_load_task(void *p_userdata) { } if (res.is_null()) { - print_verbose("Failed loading resource: " + remapped_path); + PRINT_VERBOSE("Failed loading resource: " + remapped_path); } thread_load_mutex.lock(); @@ -496,7 +496,7 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String & ResourceLoader::LoadToken *ResourceLoader::_load_threaded_request_reuse_user_token(const String &p_path) { HashMap::Iterator E = user_load_tokens.find(p_path); if (E) { - print_verbose("load_threaded_request(): Another threaded load for resource path '" + p_path + "' has been initiated. Not an error."); + PRINT_VERBOSE("load_threaded_request(): Another threaded load for resource path '" + p_path + "' has been initiated. Not an error."); LoadToken *token = E->value; token->user_rc++; return token; @@ -666,7 +666,7 @@ ResourceLoader::ThreadLoadStatus ResourceLoader::load_threaded_get_status(const MutexLock thread_load_lock(thread_load_mutex); if (!user_load_tokens.has(p_path)) { - print_verbose("load_threaded_get_status(): No threaded load for resource path '" + p_path + "' has been initiated or its result has already been collected."); + PRINT_VERBOSE("load_threaded_get_status(): No threaded load for resource path '" + p_path + "' has been initiated or its result has already been collected."); return THREAD_LOAD_INVALID_RESOURCE; } @@ -707,7 +707,7 @@ Ref ResourceLoader::load_threaded_get(const String &p_path, Error *r_e MutexLock thread_load_lock(thread_load_mutex); if (!user_load_tokens.has(p_path)) { - print_verbose("load_threaded_get(): No threaded load for resource path '" + p_path + "' has been initiated or its result has already been collected."); + PRINT_VERBOSE("load_threaded_get(): No threaded load for resource path '" + p_path + "' has been initiated or its result has already been collected."); if (r_error) { *r_error = ERR_INVALID_PARAMETER; } diff --git a/core/object/worker_thread_pool.cpp b/core/object/worker_thread_pool.cpp index 08903d61964d..0fef16134e7b 100644 --- a/core/object/worker_thread_pool.cpp +++ b/core/object/worker_thread_pool.cpp @@ -760,7 +760,7 @@ void WorkerThreadPool::init(int p_thread_count, float p_low_priority_task_ratio) max_low_priority_threads = CLAMP(p_thread_count * p_low_priority_task_ratio, 1, p_thread_count - 1); - print_verbose(vformat("WorkerThreadPool: %d threads, %d max low-priority.", p_thread_count, max_low_priority_threads)); + PRINT_VERBOSE(vformat("WorkerThreadPool: %d threads, %d max low-priority.", p_thread_count, max_low_priority_threads)); threads.resize(p_thread_count); diff --git a/core/string/print_string.h b/core/string/print_string.h index 570e08c5fbd7..b7f6946eec50 100644 --- a/core/string/print_string.h +++ b/core/string/print_string.h @@ -62,7 +62,7 @@ extern void print_error(const String &p_string); extern bool is_print_verbose_enabled(); // This version avoids processing the text to be printed until it actually has to be printed, saving some CPU usage. -#define print_verbose(m_text) \ +#define PRINT_VERBOSE(m_text) \ { \ if (is_print_verbose_enabled()) { \ print_line(m_text); \ diff --git a/core/string/string_name.cpp b/core/string/string_name.cpp index 2d3c376d0cbe..080f8719f903 100644 --- a/core/string/string_name.cpp +++ b/core/string/string_name.cpp @@ -126,7 +126,7 @@ void StringName::cleanup() { } } if (lost_strings) { - print_verbose(vformat("StringName: %d unclaimed string names at exit.", lost_strings)); + PRINT_VERBOSE(vformat("StringName: %d unclaimed string names at exit.", lost_strings)); } configured = false; } diff --git a/core/variant/variant_utility.cpp b/core/variant/variant_utility.cpp index 50932afbb672..895aca371142 100644 --- a/core/variant/variant_utility.cpp +++ b/core/variant/variant_utility.cpp @@ -999,8 +999,6 @@ void VariantUtilityFunctions::print_rich(const Variant **p_args, int p_arg_count r_error.error = Callable::CallError::CALL_OK; } -#undef print_verbose - void VariantUtilityFunctions::print_verbose(const Variant **p_args, int p_arg_count, Callable::CallError &r_error) { if (OS::get_singleton()->is_stdout_verbose()) { String s; diff --git a/core/variant/variant_utility.h b/core/variant/variant_utility.h index 75cde4942b5f..d2541b3bb05c 100644 --- a/core/variant/variant_utility.h +++ b/core/variant/variant_utility.h @@ -133,7 +133,6 @@ struct VariantUtilityFunctions { static String type_string(Variant::Type p_type); static void print(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); static void print_rich(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); -#undef print_verbose static void print_verbose(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); static void printerr(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); static void printt(const Variant **p_args, int p_arg_count, Callable::CallError &r_error); diff --git a/drivers/alsa/audio_driver_alsa.cpp b/drivers/alsa/audio_driver_alsa.cpp index 6ee22b6eb599..addc984dc6ec 100644 --- a/drivers/alsa/audio_driver_alsa.cpp +++ b/drivers/alsa/audio_driver_alsa.cpp @@ -123,7 +123,7 @@ Error AudioDriverALSA::init_output_device() { status = snd_pcm_hw_params_set_period_size_near(pcm_handle, hwparams, &period_size, nullptr); CHECK_FAIL(status < 0); - print_verbose("Audio buffer frames: " + itos(period_size) + " calculated latency: " + itos(period_size * 1000 / mix_rate) + "ms"); + PRINT_VERBOSE("Audio buffer frames: " + itos(period_size) + " calculated latency: " + itos(period_size * 1000 / mix_rate) + "ms"); status = snd_pcm_hw_params_set_periods_near(pcm_handle, hwparams, &periods, nullptr); CHECK_FAIL(status < 0); @@ -176,9 +176,9 @@ Error AudioDriverALSA::init() { if (ver_parts.size() >= 2) { ver_ok = ((ver_parts[0].to_int() == 1 && ver_parts[1].to_int() >= 1)) || (ver_parts[0].to_int() > 1); // 1.1.0 } - print_verbose(vformat("ALSA %s detected.", version)); + PRINT_VERBOSE(vformat("ALSA %s detected.", version)); if (!ver_ok) { - print_verbose("Unsupported ALSA library version!"); + PRINT_VERBOSE("Unsupported ALSA library version!"); return ERR_CANT_OPEN; } diff --git a/drivers/coreaudio/audio_driver_coreaudio.mm b/drivers/coreaudio/audio_driver_coreaudio.mm index 4e6ff2edb390..e4cf063ef70f 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.mm +++ b/drivers/coreaudio/audio_driver_coreaudio.mm @@ -165,9 +165,9 @@ unsigned int buffer_size = buffer_frames * channels; samples_in.resize(buffer_size); - print_verbose("CoreAudio: detected " + itos(channels) + " channels"); - print_verbose("CoreAudio: output sampling rate: " + itos(mix_rate) + " Hz"); - print_verbose("CoreAudio: output audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); + PRINT_VERBOSE("CoreAudio: detected " + itos(channels) + " channels"); + PRINT_VERBOSE("CoreAudio: output sampling rate: " + itos(mix_rate) + " Hz"); + PRINT_VERBOSE("CoreAudio: output audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); AURenderCallbackStruct callback; memset(&callback, 0, sizeof(AURenderCallbackStruct)); @@ -473,8 +473,8 @@ result = AudioUnitInitialize(input_unit); ERR_FAIL_COND_V(result != noErr, FAILED); - print_verbose("CoreAudio: input sampling rate: " + itos(capture_mix_rate) + " Hz"); - print_verbose("CoreAudio: input audio buffer frames: " + itos(capture_buffer_frames) + " calculated latency: " + itos(capture_buffer_frames * 1000 / capture_mix_rate) + "ms"); + PRINT_VERBOSE("CoreAudio: input sampling rate: " + itos(capture_mix_rate) + " Hz"); + PRINT_VERBOSE("CoreAudio: input audio buffer frames: " + itos(capture_buffer_frames) + " calculated latency: " + itos(capture_buffer_frames * 1000 / capture_mix_rate) + "ms"); return OK; } diff --git a/drivers/d3d12/rendering_device_driver_d3d12.cpp b/drivers/d3d12/rendering_device_driver_d3d12.cpp index cd5df56fbb92..b2268eaf6a6f 100644 --- a/drivers/d3d12/rendering_device_driver_d3d12.cpp +++ b/drivers/d3d12/rendering_device_driver_d3d12.cpp @@ -464,7 +464,7 @@ void RenderingDeviceDriverD3D12::_debug_message_func(D3D12_MESSAGE_CATEGORY p_ca // Convert D3D12 severity to our own log macros. switch (p_severity) { case D3D12_MESSAGE_SEVERITY_MESSAGE: - print_verbose(error_message); + PRINT_VERBOSE(error_message); break; case D3D12_MESSAGE_SEVERITY_INFO: print_line(error_message); @@ -2264,7 +2264,7 @@ Error RenderingDeviceDriverD3D12::command_queue_execute_and_present(CommandQueue SwapChain *swap_chain = (SwapChain *)(p_swap_chains[i].id); res = swap_chain->d3d_swap_chain->Present(swap_chain->sync_interval, swap_chain->present_flags); if (!SUCCEEDED(res)) { - print_verbose(vformat("D3D12: Presenting swapchain failed with error 0x%08ux.", (uint64_t)res)); + PRINT_VERBOSE(vformat("D3D12: Presenting swapchain failed with error 0x%08ux.", (uint64_t)res)); any_present_failed = true; } } @@ -3289,7 +3289,7 @@ Vector RenderingDeviceDriverD3D12::shader_compile_binary_from_spirv(Vec dxil_logger logger = {}; logger.log = [](void *p_priv, const char *p_msg) { #ifdef DEBUG_ENABLED - print_verbose(p_msg); + PRINT_VERBOSE(p_msg); #endif }; @@ -6490,8 +6490,8 @@ Error RenderingDeviceDriverD3D12::_check_capabilities() { ERR_FAIL_COND_V_MSG(!shader_capabilities.shader_model, ERR_UNAVAILABLE, vformat("No support for any of the suitable shader models (%s-%s) has been found.", D3D_SHADER_MODEL_TO_STRING(SMS_TO_CHECK[ARRAY_SIZE(SMS_TO_CHECK) - 1]), D3D_SHADER_MODEL_TO_STRING(SMS_TO_CHECK[0]))); - print_verbose("- Shader:"); - print_verbose(" model: " + D3D_SHADER_MODEL_TO_STRING(shader_capabilities.shader_model)); + PRINT_VERBOSE("- Shader:"); + PRINT_VERBOSE(" model: " + D3D_SHADER_MODEL_TO_STRING(shader_capabilities.shader_model)); } D3D12_FEATURE_DATA_D3D12_OPTIONS options = {}; @@ -6557,51 +6557,51 @@ Error RenderingDeviceDriverD3D12::_check_capabilities() { } if (vrs_capabilities.draw_call_supported || vrs_capabilities.primitive_supported || vrs_capabilities.ss_image_supported) { - print_verbose("- D3D12 Variable Rate Shading supported:"); + PRINT_VERBOSE("- D3D12 Variable Rate Shading supported:"); if (vrs_capabilities.draw_call_supported) { - print_verbose(" Draw call"); + PRINT_VERBOSE(" Draw call"); } if (vrs_capabilities.primitive_supported) { - print_verbose(String(" Per-primitive (multi-viewport: ") + (vrs_capabilities.primitive_in_multiviewport ? "yes" : "no") + ")"); + PRINT_VERBOSE(String(" Per-primitive (multi-viewport: ") + (vrs_capabilities.primitive_in_multiviewport ? "yes" : "no") + ")"); } if (vrs_capabilities.ss_image_supported) { - print_verbose(String(" Screen-space image (tile size: ") + itos(vrs_capabilities.ss_image_tile_size) + ")"); + PRINT_VERBOSE(String(" Screen-space image (tile size: ") + itos(vrs_capabilities.ss_image_tile_size) + ")"); } if (vrs_capabilities.additional_rates_supported) { - print_verbose(String(" Additional rates: ") + (vrs_capabilities.additional_rates_supported ? "yes" : "no")); + PRINT_VERBOSE(String(" Additional rates: ") + (vrs_capabilities.additional_rates_supported ? "yes" : "no")); } } else { - print_verbose("- D3D12 Variable Rate Shading not supported"); + PRINT_VERBOSE("- D3D12 Variable Rate Shading not supported"); } if (multiview_capabilities.is_supported) { - print_verbose("- D3D12 multiview supported:"); - print_verbose(" max view count: " + itos(multiview_capabilities.max_view_count)); - //print_verbose(" max instances: " + itos(multiview_capabilities.max_instance_count)); // Hardcoded; not very useful at the moment. + PRINT_VERBOSE("- D3D12 multiview supported:"); + PRINT_VERBOSE(" max view count: " + itos(multiview_capabilities.max_view_count)); + //PRINT_VERBOSE(" max instances: " + itos(multiview_capabilities.max_instance_count)); // Hardcoded; not very useful at the moment. } else { - print_verbose("- D3D12 multiview not supported"); + PRINT_VERBOSE("- D3D12 multiview not supported"); } if (format_capabilities.relaxed_casting_supported) { #if 0 - print_verbose("- Relaxed casting supported"); + PRINT_VERBOSE("- Relaxed casting supported"); #else // Certain configurations (Windows 11 with an updated NVIDIA driver) crash when using relaxed casting. // Therefore, we disable it temporarily until we can assure that it's reliable. // There are fallbacks in place that work in every case, if less efficient. format_capabilities.relaxed_casting_supported = false; - print_verbose("- Relaxed casting supported (but disabled for now)"); + PRINT_VERBOSE("- Relaxed casting supported (but disabled for now)"); #endif } else { - print_verbose("- Relaxed casting not supported"); + PRINT_VERBOSE("- Relaxed casting not supported"); } - print_verbose(String("- D3D12 16-bit ops supported: ") + (shader_capabilities.native_16bit_ops ? "yes" : "no")); + PRINT_VERBOSE(String("- D3D12 16-bit ops supported: ") + (shader_capabilities.native_16bit_ops ? "yes" : "no")); if (misc_features_support.depth_bounds_supported) { - print_verbose("- Depth bounds test supported"); + PRINT_VERBOSE("- Depth bounds test supported"); } else { - print_verbose("- Depth bounds test not supported"); + PRINT_VERBOSE("- Depth bounds test not supported"); } return OK; @@ -6633,7 +6633,7 @@ Error RenderingDeviceDriverD3D12::_get_device_limits() { res = unused_command_queue->GetTimestampFrequency(&device_limits.timestamp_frequency); if (!SUCCEEDED(res)) { - print_verbose("D3D12: GetTimestampFrequency failed with error " + vformat("0x%08ux", (uint64_t)res) + ". Timestamps will be inaccurate."); + PRINT_VERBOSE("D3D12: GetTimestampFrequency failed with error " + vformat("0x%08ux", (uint64_t)res) + ". Timestamps will be inaccurate."); } return OK; diff --git a/drivers/egl/egl_manager.cpp b/drivers/egl/egl_manager.cpp index 8ca0aa5943eb..31c51964b274 100644 --- a/drivers/egl/egl_manager.cpp +++ b/drivers/egl/egl_manager.cpp @@ -134,7 +134,7 @@ int EGLManager::_get_gldisplay_id(void *p_display) { if (egl_extensions.has("EGL_ANGLE_surface_orientation")) { new_gldisplay.has_EGL_ANGLE_surface_orientation = true; - print_verbose("EGL: EGL_ANGLE_surface_orientation is supported."); + PRINT_VERBOSE("EGL: EGL_ANGLE_surface_orientation is supported."); } } #endif @@ -301,7 +301,7 @@ Error EGLManager::window_create(DisplayServer::WindowID p_window_id, void *p_dis if (eglQuerySurface(gldisplay.egl_display, glwindow.egl_surface, EGL_SURFACE_ORIENTATION_ANGLE, &orientation)) { if (orientation & EGL_SURFACE_ORIENTATION_INVERT_Y_ANGLE && !(orientation & EGL_SURFACE_ORIENTATION_INVERT_X_ANGLE)) { glwindow.flipped_y = true; - print_verbose("EGL: Using optimal surface orientation: Invert Y"); + PRINT_VERBOSE("EGL: Using optimal surface orientation: Invert Y"); } } else { ERR_PRINT(vformat("Failed to get EGL_SURFACE_ORIENTATION_ANGLE, error: 0x%08X", eglGetError())); @@ -480,7 +480,7 @@ Error EGLManager::initialize(void *p_native_display) { int major = GLAD_VERSION_MAJOR(version); int minor = GLAD_VERSION_MINOR(version); - print_verbose(vformat("Loaded EGL %d.%d", major, minor)); + PRINT_VERBOSE(vformat("Loaded EGL %d.%d", major, minor)); ERR_FAIL_COND_V_MSG(!GLAD_EGL_VERSION_1_4, ERR_UNAVAILABLE, vformat("EGL version is too old! %d.%d < 1.4", major, minor)); diff --git a/drivers/gles3/shader_gles3.cpp b/drivers/gles3/shader_gles3.cpp index 83f74865f678..2580a60b4a17 100644 --- a/drivers/gles3/shader_gles3.cpp +++ b/drivers/gles3/shader_gles3.cpp @@ -812,7 +812,7 @@ void ShaderGLES3::initialize(const String &p_general_defines, int p_base_texture } shader_cache_dir_valid = true; - print_verbose("Shader '" + name + "' SHA256: " + base_sha256); + PRINT_VERBOSE("Shader '" + name + "' SHA256: " + base_sha256); } GLES3::Config *config = GLES3::Config::get_singleton(); diff --git a/drivers/metal/rendering_device_driver_metal.mm b/drivers/metal/rendering_device_driver_metal.mm index dea02f699775..3b7b5799f892 100644 --- a/drivers/metal/rendering_device_driver_metal.mm +++ b/drivers/metal/rendering_device_driver_metal.mm @@ -4050,11 +4050,11 @@ bool isArrayTexture(MTLTextureType p_type) { // NOTE: I'm not sure what the limit is as I don't see it referenced anywhere multiview_capabilities.max_instance_count = UINT32_MAX; - print_verbose("- Metal multiview supported:"); - print_verbose(" max view count: " + itos(multiview_capabilities.max_view_count)); - print_verbose(" max instances: " + itos(multiview_capabilities.max_instance_count)); + PRINT_VERBOSE("- Metal multiview supported:"); + PRINT_VERBOSE(" max view count: " + itos(multiview_capabilities.max_view_count)); + PRINT_VERBOSE(" max instances: " + itos(multiview_capabilities.max_instance_count)); } else { - print_verbose("- Metal multiview not supported"); + PRINT_VERBOSE("- Metal multiview not supported"); } // Check required features and abort if any of them is missing. diff --git a/drivers/pulseaudio/audio_driver_pulseaudio.cpp b/drivers/pulseaudio/audio_driver_pulseaudio.cpp index 669e6c2aa951..93beefbfc3a3 100644 --- a/drivers/pulseaudio/audio_driver_pulseaudio.cpp +++ b/drivers/pulseaudio/audio_driver_pulseaudio.cpp @@ -49,19 +49,19 @@ void AudioDriverPulseAudio::pa_state_cb(pa_context *c, void *userdata) { switch (pa_context_get_state(c)) { case PA_CONTEXT_TERMINATED: - print_verbose("PulseAudio: context terminated"); + PRINT_VERBOSE("PulseAudio: context terminated"); ad->pa_ready = -1; break; case PA_CONTEXT_FAILED: - print_verbose("PulseAudio: context failed"); + PRINT_VERBOSE("PulseAudio: context failed"); ad->pa_ready = -1; break; case PA_CONTEXT_READY: - print_verbose("PulseAudio: context ready"); + PRINT_VERBOSE("PulseAudio: context ready"); ad->pa_ready = 1; break; default: - print_verbose("PulseAudio: context other"); + PRINT_VERBOSE("PulseAudio: context other"); // TODO: Check if we want to handle some of the other // PA context states like PA_CONTEXT_UNCONNECTED. break; @@ -144,7 +144,7 @@ Error AudioDriverPulseAudio::detect_channels(bool input) { } else { strcpy(dev, device.utf8().get_data()); } - print_verbose("PulseAudio: Detecting channels for device: " + String(dev)); + PRINT_VERBOSE("PulseAudio: Detecting channels for device: " + String(dev)); // Now using the device name get the amount of channels pa_status = 0; @@ -226,8 +226,8 @@ Error AudioDriverPulseAudio::init_output_device() { buffer_frames = closest_power_of_2(tmp_latency * mix_rate / 1000); pa_buffer_size = buffer_frames * pa_map.channels; - print_verbose("PulseAudio: detected " + itos(pa_map.channels) + " output channels"); - print_verbose("PulseAudio: audio buffer frames: " + itos(buffer_frames) + " calculated output latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); + PRINT_VERBOSE("PulseAudio: detected " + itos(pa_map.channels) + " output channels"); + PRINT_VERBOSE("PulseAudio: audio buffer frames: " + itos(buffer_frames) + " calculated output latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); pa_sample_spec spec; spec.format = PA_SAMPLE_S16LE; @@ -296,9 +296,9 @@ Error AudioDriverPulseAudio::init() { if (ver_parts.size() >= 2) { ver_ok = (ver_parts[0].to_int() >= 8); // 8.0.0 } - print_verbose(vformat("PulseAudio %s detected.", version)); + PRINT_VERBOSE(vformat("PulseAudio %s detected.", version)); if (!ver_ok) { - print_verbose("Unsupported PulseAudio library version!"); + PRINT_VERBOSE("Unsupported PulseAudio library version!"); return ERR_CANT_OPEN; } @@ -713,7 +713,7 @@ Error AudioDriverPulseAudio::init_input_device() { break; } - print_verbose("PulseAudio: detected " + itos(pa_rec_map.channels) + " input channels"); + PRINT_VERBOSE("PulseAudio: detected " + itos(pa_rec_map.channels) + " input channels"); pa_sample_spec spec; @@ -744,8 +744,8 @@ Error AudioDriverPulseAudio::init_input_device() { input_buffer_init(input_buffer_frames); - print_verbose("PulseAudio: detected " + itos(pa_rec_map.channels) + " input channels"); - print_verbose("PulseAudio: input buffer frames: " + itos(input_buffer_frames) + " calculated latency: " + itos(input_buffer_frames * 1000 / mix_rate) + "ms"); + PRINT_VERBOSE("PulseAudio: detected " + itos(pa_rec_map.channels) + " input channels"); + PRINT_VERBOSE("PulseAudio: input buffer frames: " + itos(input_buffer_frames) + " calculated latency: " + itos(input_buffer_frames * 1000 / mix_rate) + "ms"); return OK; } diff --git a/drivers/unix/ip_unix.cpp b/drivers/unix/ip_unix.cpp index d58dbced03b4..ef4c9a73da20 100644 --- a/drivers/unix/ip_unix.cpp +++ b/drivers/unix/ip_unix.cpp @@ -88,12 +88,12 @@ void IPUnix::_resolve_hostname(List &r_addresses, const String &p_hos int s = getaddrinfo(p_hostname.utf8().get_data(), nullptr, &hints, &result); if (s != 0) { - print_verbose("getaddrinfo failed! Cannot resolve hostname."); + PRINT_VERBOSE("getaddrinfo failed! Cannot resolve hostname."); return; } if (result == nullptr || result->ai_addr == nullptr) { - print_verbose("Invalid response from getaddrinfo."); + PRINT_VERBOSE("Invalid response from getaddrinfo."); if (result) { freeaddrinfo(result); } diff --git a/drivers/unix/net_socket_unix.cpp b/drivers/unix/net_socket_unix.cpp index 3eaf1b2885ad..6d7e6ff70855 100644 --- a/drivers/unix/net_socket_unix.cpp +++ b/drivers/unix/net_socket_unix.cpp @@ -159,7 +159,7 @@ NetSocketUnix::NetError NetSocketUnix::_get_socket_error() const { if (errno == ENOBUFS) { return ERR_NET_BUFFER_TOO_SMALL; } - print_verbose("Socket error: " + itos(errno) + "."); + PRINT_VERBOSE("Socket error: " + itos(errno) + "."); return ERR_NET_OTHER; } @@ -293,7 +293,7 @@ Error NetSocketUnix::open(Type p_sock_type, IP::Type &ip_type) { // Disable SIGPIPE (should only be relevant to stream sockets, but seems to affect UDP too on iOS). int par = 1; if (setsockopt(_sock, SOL_SOCKET, SO_NOSIGPIPE, &par, sizeof(int)) != 0) { - print_verbose("Unable to turn off SIGPIPE on socket."); + PRINT_VERBOSE("Unable to turn off SIGPIPE on socket."); } #endif return OK; @@ -318,7 +318,7 @@ Error NetSocketUnix::bind(IPAddress p_addr, uint16_t p_port) { if (::bind(_sock, (struct sockaddr *)&addr, addr_size) != 0) { NetError err = _get_socket_error(); - print_verbose("Failed to bind socket. Error: " + itos(err) + "."); + PRINT_VERBOSE("Failed to bind socket. Error: " + itos(err) + "."); close(); return ERR_UNAVAILABLE; } @@ -331,7 +331,7 @@ Error NetSocketUnix::listen(int p_max_pending) { if (::listen(_sock, p_max_pending) != 0) { _get_socket_error(); - print_verbose("Failed to listen from socket."); + PRINT_VERBOSE("Failed to listen from socket."); close(); return FAILED; } @@ -358,7 +358,7 @@ Error NetSocketUnix::connect_to_host(IPAddress p_host, uint16_t p_port) { case ERR_NET_IN_PROGRESS: return ERR_BUSY; default: - print_verbose("Connection to remote host failed."); + PRINT_VERBOSE("Connection to remote host failed."); close(); return FAILED; } @@ -390,7 +390,7 @@ Error NetSocketUnix::poll(PollType p_type, int p_timeout) const { if (ret < 0 || pfd.revents & POLLERR) { _get_socket_error(); - print_verbose("Error when polling socket."); + PRINT_VERBOSE("Error when polling socket."); return FAILED; } @@ -580,7 +580,7 @@ int NetSocketUnix::get_available_bytes() const { int ret = ioctl(_sock, FIONREAD, &len); if (ret == -1) { _get_socket_error(); - print_verbose("Error when checking available bytes on socket."); + PRINT_VERBOSE("Error when checking available bytes on socket."); return -1; } return len; @@ -593,7 +593,7 @@ Error NetSocketUnix::get_socket_address(IPAddress *r_ip, uint16_t *r_port) const socklen_t len = sizeof(saddr); if (getsockname(_sock, (struct sockaddr *)&saddr, &len) != 0) { _get_socket_error(); - print_verbose("Error when reading local socket address."); + PRINT_VERBOSE("Error when reading local socket address."); return FAILED; } _set_ip_port(&saddr, r_ip, r_port); @@ -609,7 +609,7 @@ Ref NetSocketUnix::accept(IPAddress &r_ip, uint16_t &r_port) { int fd = ::accept(_sock, (struct sockaddr *)&their_addr, &size); if (fd == -1) { _get_socket_error(); - print_verbose("Error when accepting socket connection."); + PRINT_VERBOSE("Error when accepting socket connection."); return out; } diff --git a/drivers/vulkan/rendering_context_driver_vulkan.cpp b/drivers/vulkan/rendering_context_driver_vulkan.cpp index 3c1aa323f45e..256adf85787c 100644 --- a/drivers/vulkan/rendering_context_driver_vulkan.cpp +++ b/drivers/vulkan/rendering_context_driver_vulkan.cpp @@ -468,7 +468,7 @@ Error RenderingContextDriverVulkan::_initialize_instance_extensions() { #ifdef DEV_ENABLED for (uint32_t i = 0; i < instance_extension_count; i++) { - print_verbose(String("VULKAN: Found instance extension ") + String::utf8(instance_extensions[i].extensionName) + String(".")); + PRINT_VERBOSE(String("VULKAN: Found instance extension ") + String::utf8(instance_extensions[i].extensionName) + String(".")); } #endif @@ -486,7 +486,7 @@ Error RenderingContextDriverVulkan::_initialize_instance_extensions() { if (requested_extension.value) { ERR_FAIL_V_MSG(ERR_BUG, String("Required extension ") + String::utf8(requested_extension.key) + String(" not found.")); } else { - print_verbose(String("Optional extension ") + String::utf8(requested_extension.key) + String(" not found.")); + PRINT_VERBOSE(String("Optional extension ") + String::utf8(requested_extension.key) + String(" not found.")); } } } @@ -630,7 +630,7 @@ VKAPI_ATTR VkBool32 VKAPI_CALL RenderingContextDriverVulkan::_debug_messenger_ca // Convert VK severity to our own log macros. switch (p_message_severity) { case VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT: - print_verbose(error_message); + PRINT_VERBOSE(error_message); break; case VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT: print_line(error_message); diff --git a/drivers/vulkan/rendering_device_driver_vulkan.cpp b/drivers/vulkan/rendering_device_driver_vulkan.cpp index fb63e962de9f..357a28ba3a5b 100644 --- a/drivers/vulkan/rendering_device_driver_vulkan.cpp +++ b/drivers/vulkan/rendering_device_driver_vulkan.cpp @@ -581,7 +581,7 @@ Error RenderingDeviceDriverVulkan::_initialize_device_extensions() { #ifdef DEV_ENABLED for (uint32_t i = 0; i < device_extension_count; i++) { - print_verbose(String("VULKAN: Found device extension ") + String::utf8(device_extensions[i].extensionName)); + PRINT_VERBOSE(String("VULKAN: Found device extension ") + String::utf8(device_extensions[i].extensionName)); } #endif @@ -599,7 +599,7 @@ Error RenderingDeviceDriverVulkan::_initialize_device_extensions() { if (requested_extension.value) { ERR_FAIL_V_MSG(ERR_BUG, String("Required extension ") + String::utf8(requested_extension.key) + String(" not found.")); } else { - print_verbose(String("Optional extension ") + String::utf8(requested_extension.key) + String(" not found")); + PRINT_VERBOSE(String("Optional extension ") + String::utf8(requested_extension.key) + String(" not found")); } } } @@ -878,12 +878,12 @@ Error RenderingDeviceDriverVulkan::_check_device_capabilities() { } if (vrs_capabilities.pipeline_vrs_supported || vrs_capabilities.primitive_vrs_supported || vrs_capabilities.attachment_vrs_supported) { - print_verbose("- Vulkan Variable Rate Shading supported:"); + PRINT_VERBOSE("- Vulkan Variable Rate Shading supported:"); if (vrs_capabilities.pipeline_vrs_supported) { - print_verbose(" Pipeline fragment shading rate"); + PRINT_VERBOSE(" Pipeline fragment shading rate"); } if (vrs_capabilities.primitive_vrs_supported) { - print_verbose(" Primitive fragment shading rate"); + PRINT_VERBOSE(" Primitive fragment shading rate"); } if (vrs_capabilities.attachment_vrs_supported) { // TODO: Expose these somehow to the end user. @@ -897,32 +897,32 @@ Error RenderingDeviceDriverVulkan::_check_device_capabilities() { // We'll attempt to default to a texel size of 16x16. vrs_capabilities.texel_size = Vector2i(16, 16).clamp(vrs_capabilities.min_texel_size, vrs_capabilities.max_texel_size); - print_verbose(String(" Attachment fragment shading rate") + String(", min texel size: (") + itos(vrs_capabilities.min_texel_size.x) + String(", ") + itos(vrs_capabilities.min_texel_size.y) + String(")") + String(", max texel size: (") + itos(vrs_capabilities.max_texel_size.x) + String(", ") + itos(vrs_capabilities.max_texel_size.y) + String(")") + String(", max fragment size: (") + itos(vrs_capabilities.max_fragment_size.x) + String(", ") + itos(vrs_capabilities.max_fragment_size.y) + String(")")); + PRINT_VERBOSE(String(" Attachment fragment shading rate") + String(", min texel size: (") + itos(vrs_capabilities.min_texel_size.x) + String(", ") + itos(vrs_capabilities.min_texel_size.y) + String(")") + String(", max texel size: (") + itos(vrs_capabilities.max_texel_size.x) + String(", ") + itos(vrs_capabilities.max_texel_size.y) + String(")") + String(", max fragment size: (") + itos(vrs_capabilities.max_fragment_size.x) + String(", ") + itos(vrs_capabilities.max_fragment_size.y) + String(")")); } } else { - print_verbose("- Vulkan Variable Rate Shading not supported"); + PRINT_VERBOSE("- Vulkan Variable Rate Shading not supported"); } if (multiview_capabilities.is_supported) { multiview_capabilities.max_view_count = multiview_properties.maxMultiviewViewCount; multiview_capabilities.max_instance_count = multiview_properties.maxMultiviewInstanceIndex; - print_verbose("- Vulkan multiview supported:"); - print_verbose(" max view count: " + itos(multiview_capabilities.max_view_count)); - print_verbose(" max instances: " + itos(multiview_capabilities.max_instance_count)); + PRINT_VERBOSE("- Vulkan multiview supported:"); + PRINT_VERBOSE(" max view count: " + itos(multiview_capabilities.max_view_count)); + PRINT_VERBOSE(" max instances: " + itos(multiview_capabilities.max_instance_count)); } else { - print_verbose("- Vulkan multiview not supported"); + PRINT_VERBOSE("- Vulkan multiview not supported"); } - print_verbose("- Vulkan subgroup:"); - print_verbose(" size: " + itos(subgroup_capabilities.size)); - print_verbose(" min size: " + itos(subgroup_capabilities.min_size)); - print_verbose(" max size: " + itos(subgroup_capabilities.max_size)); - print_verbose(" stages: " + subgroup_capabilities.supported_stages_desc()); - print_verbose(" supported ops: " + subgroup_capabilities.supported_operations_desc()); + PRINT_VERBOSE("- Vulkan subgroup:"); + PRINT_VERBOSE(" size: " + itos(subgroup_capabilities.size)); + PRINT_VERBOSE(" min size: " + itos(subgroup_capabilities.min_size)); + PRINT_VERBOSE(" max size: " + itos(subgroup_capabilities.max_size)); + PRINT_VERBOSE(" stages: " + subgroup_capabilities.supported_stages_desc()); + PRINT_VERBOSE(" supported ops: " + subgroup_capabilities.supported_operations_desc()); if (subgroup_capabilities.quad_operations_in_all_stages) { - print_verbose(" quad operations in all stages"); + PRINT_VERBOSE(" quad operations in all stages"); } } @@ -1455,7 +1455,7 @@ VmaPool RenderingDeviceDriverVulkan::_find_or_create_small_allocs_pool(uint32_t return small_allocs_pools[p_mem_type_index]; } - print_verbose("Creating VMA small objects pool for memory type index " + itos(p_mem_type_index)); + PRINT_VERBOSE("Creating VMA small objects pool for memory type index " + itos(p_mem_type_index)); VmaPoolCreateInfo pci = {}; pci.memoryTypeIndex = p_mem_type_index; @@ -4418,11 +4418,11 @@ bool RenderingDeviceDriverVulkan::pipeline_cache_create(const Vector &p if (p_data.is_empty()) { // No pre-existing cache, just create it. } else if (p_data.size() <= (int)sizeof(PipelineCacheHeader)) { - print_verbose("Invalid/corrupt Vulkan pipelines cache. Existing shader pipeline cache will be ignored, which may result in stuttering during gameplay."); + PRINT_VERBOSE("Invalid/corrupt Vulkan pipelines cache. Existing shader pipeline cache will be ignored, which may result in stuttering during gameplay."); } else { const PipelineCacheHeader *loaded_header = reinterpret_cast(p_data.ptr()); if (loaded_header->magic != 868 + VK_PIPELINE_CACHE_HEADER_VERSION_ONE) { - print_verbose("Invalid Vulkan pipelines cache magic number. Existing shader pipeline cache will be ignored, which may result in stuttering during gameplay."); + PRINT_VERBOSE("Invalid Vulkan pipelines cache magic number. Existing shader pipeline cache will be ignored, which may result in stuttering during gameplay."); } else { const uint8_t *loaded_buffer_start = p_data.ptr() + sizeof(PipelineCacheHeader); uint32_t loaded_buffer_size = p_data.size() - sizeof(PipelineCacheHeader); @@ -4434,7 +4434,7 @@ bool RenderingDeviceDriverVulkan::pipeline_cache_create(const Vector &p loaded_header->driver_version != current_header->driver_version || memcmp(loaded_header->uuid, current_header->uuid, VK_UUID_SIZE) != 0 || loaded_header->driver_abi != current_header->driver_abi) { - print_verbose("Invalid Vulkan pipelines cache header. This may be due to an engine change, GPU change or graphics driver version change. Existing shader pipeline cache will be ignored, which may result in stuttering during gameplay."); + PRINT_VERBOSE("Invalid Vulkan pipelines cache header. This may be due to an engine change, GPU change or graphics driver version change. Existing shader pipeline cache will be ignored, which may result in stuttering during gameplay."); } else { pipelines_cache.current_size = loaded_buffer_size; pipelines_cache.buffer = p_data; diff --git a/drivers/wasapi/audio_driver_wasapi.cpp b/drivers/wasapi/audio_driver_wasapi.cpp index b5cb8da249af..ad01668e3eac 100644 --- a/drivers/wasapi/audio_driver_wasapi.cpp +++ b/drivers/wasapi/audio_driver_wasapi.cpp @@ -288,9 +288,9 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_i // IID_IAudioClient3 will never activate on OS versions before Windows 10. // Older Windows versions should fall back gracefully. using_audio_client_3 = false; - print_verbose("WASAPI: Couldn't activate output_device with IAudioClient3 interface, falling back to IAudioClient interface"); + PRINT_VERBOSE("WASAPI: Couldn't activate output_device with IAudioClient3 interface, falling back to IAudioClient interface"); } else { - print_verbose("WASAPI: Activated output_device using IAudioClient3 interface"); + PRINT_VERBOSE("WASAPI: Activated output_device using IAudioClient3 interface"); } } if (!using_audio_client_3) { @@ -318,26 +318,26 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_i hr = p_device->audio_client->GetMixFormat(&pwfex); ERR_FAIL_COND_V(hr != S_OK, ERR_CANT_OPEN); - print_verbose("WASAPI: wFormatTag = " + itos(pwfex->wFormatTag)); - print_verbose("WASAPI: nChannels = " + itos(pwfex->nChannels)); - print_verbose("WASAPI: nSamplesPerSec = " + itos(pwfex->nSamplesPerSec)); - print_verbose("WASAPI: nAvgBytesPerSec = " + itos(pwfex->nAvgBytesPerSec)); - print_verbose("WASAPI: nBlockAlign = " + itos(pwfex->nBlockAlign)); - print_verbose("WASAPI: wBitsPerSample = " + itos(pwfex->wBitsPerSample)); - print_verbose("WASAPI: cbSize = " + itos(pwfex->cbSize)); + PRINT_VERBOSE("WASAPI: wFormatTag = " + itos(pwfex->wFormatTag)); + PRINT_VERBOSE("WASAPI: nChannels = " + itos(pwfex->nChannels)); + PRINT_VERBOSE("WASAPI: nSamplesPerSec = " + itos(pwfex->nSamplesPerSec)); + PRINT_VERBOSE("WASAPI: nAvgBytesPerSec = " + itos(pwfex->nAvgBytesPerSec)); + PRINT_VERBOSE("WASAPI: nBlockAlign = " + itos(pwfex->nBlockAlign)); + PRINT_VERBOSE("WASAPI: wBitsPerSample = " + itos(pwfex->wBitsPerSample)); + PRINT_VERBOSE("WASAPI: cbSize = " + itos(pwfex->cbSize)); WAVEFORMATEX *closest = nullptr; hr = p_device->audio_client->IsFormatSupported(AUDCLNT_SHAREMODE_SHARED, pwfex, &closest); if (hr == S_FALSE) { WARN_PRINT("WASAPI: Mix format is not supported by the output_device"); if (closest) { - print_verbose("WASAPI: closest->wFormatTag = " + itos(closest->wFormatTag)); - print_verbose("WASAPI: closest->nChannels = " + itos(closest->nChannels)); - print_verbose("WASAPI: closest->nSamplesPerSec = " + itos(closest->nSamplesPerSec)); - print_verbose("WASAPI: closest->nAvgBytesPerSec = " + itos(closest->nAvgBytesPerSec)); - print_verbose("WASAPI: closest->nBlockAlign = " + itos(closest->nBlockAlign)); - print_verbose("WASAPI: closest->wBitsPerSample = " + itos(closest->wBitsPerSample)); - print_verbose("WASAPI: closest->cbSize = " + itos(closest->cbSize)); + PRINT_VERBOSE("WASAPI: closest->wFormatTag = " + itos(closest->wFormatTag)); + PRINT_VERBOSE("WASAPI: closest->nChannels = " + itos(closest->nChannels)); + PRINT_VERBOSE("WASAPI: closest->nSamplesPerSec = " + itos(closest->nSamplesPerSec)); + PRINT_VERBOSE("WASAPI: closest->nAvgBytesPerSec = " + itos(closest->nAvgBytesPerSec)); + PRINT_VERBOSE("WASAPI: closest->nBlockAlign = " + itos(closest->nBlockAlign)); + PRINT_VERBOSE("WASAPI: closest->wBitsPerSample = " + itos(closest->wBitsPerSample)); + PRINT_VERBOSE("WASAPI: closest->cbSize = " + itos(closest->cbSize)); WARN_PRINT("WASAPI: Using closest match instead"); pwfex = closest; @@ -399,7 +399,7 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_i // AUDCLNT_STREAMFLAGS_RATEADJUST is an invalid flag with IAudioClient3, therefore we have to use // the closest supported mix rate supported by the audio driver. mix_rate = pwfex->nSamplesPerSec; - print_verbose("WASAPI: mix_rate = " + itos(mix_rate)); + PRINT_VERBOSE("WASAPI: mix_rate = " + itos(mix_rate)); UINT32 default_period_frames, fundamental_period_frames, min_period_frames, max_period_frames; hr = device_audio_client_3->GetSharedModeEnginePeriod( @@ -409,7 +409,7 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_i &min_period_frames, &max_period_frames); if (hr != S_OK) { - print_verbose("WASAPI: GetSharedModeEnginePeriod failed with error 0x" + String::num_uint64(hr, 16) + ", falling back to IAudioClient."); + PRINT_VERBOSE("WASAPI: GetSharedModeEnginePeriod failed with error 0x" + String::num_uint64(hr, 16) + ", falling back to IAudioClient."); CoTaskMemFree(pwfex); return audio_device_init(p_device, p_input, p_reinit, true); } @@ -422,15 +422,15 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_i period_frames = period_frames + fundamental_period_frames; } period_frames = CLAMP(period_frames, min_period_frames, max_period_frames); - print_verbose("WASAPI: fundamental_period_frames = " + itos(fundamental_period_frames)); - print_verbose("WASAPI: min_period_frames = " + itos(min_period_frames)); - print_verbose("WASAPI: max_period_frames = " + itos(max_period_frames)); - print_verbose("WASAPI: selected a period frame size of " + itos(period_frames)); + PRINT_VERBOSE("WASAPI: fundamental_period_frames = " + itos(fundamental_period_frames)); + PRINT_VERBOSE("WASAPI: min_period_frames = " + itos(min_period_frames)); + PRINT_VERBOSE("WASAPI: max_period_frames = " + itos(max_period_frames)); + PRINT_VERBOSE("WASAPI: selected a period frame size of " + itos(period_frames)); buffer_frames = period_frames; hr = device_audio_client_3->InitializeSharedAudioStream(0, period_frames, pwfex, nullptr); if (hr != S_OK) { - print_verbose("WASAPI: InitializeSharedAudioStream failed with error 0x" + String::num_uint64(hr, 16) + ", falling back to IAudioClient."); + PRINT_VERBOSE("WASAPI: InitializeSharedAudioStream failed with error 0x" + String::num_uint64(hr, 16) + ", falling back to IAudioClient."); CoTaskMemFree(pwfex); return audio_device_init(p_device, p_input, p_reinit, true); } else { @@ -441,7 +441,7 @@ Error AudioDriverWASAPI::audio_device_init(AudioDeviceWASAPI *p_device, bool p_i real_latency = (float)output_latency_in_frames / (float)current_pwfex->nSamplesPerSec; CoTaskMemFree(current_pwfex); } else { - print_verbose("WASAPI: GetCurrentSharedModeEnginePeriod failed with error 0x" + String::num_uint64(hr, 16) + ", falling back to IAudioClient."); + PRINT_VERBOSE("WASAPI: GetCurrentSharedModeEnginePeriod failed with error 0x" + String::num_uint64(hr, 16) + ", falling back to IAudioClient."); CoTaskMemFree(pwfex); return audio_device_init(p_device, p_input, p_reinit, true); } @@ -495,8 +495,8 @@ Error AudioDriverWASAPI::init_output_device(bool p_reinit) { input_position = 0; input_size = 0; - print_verbose("WASAPI: detected " + itos(audio_output.channels) + " channels"); - print_verbose("WASAPI: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); + PRINT_VERBOSE("WASAPI: detected " + itos(audio_output.channels) + " channels"); + PRINT_VERBOSE("WASAPI: audio buffer frames: " + itos(buffer_frames) + " calculated latency: " + itos(buffer_frames * 1000 / mix_rate) + "ms"); return OK; } diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index 062dd87aff81..74ea39b00f15 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -535,7 +535,7 @@ void FileAccessWindows::initialize() { } _setmaxstdio(8192); - print_verbose(vformat("Maximum number of file handles: %d", _getmaxstdio())); + PRINT_VERBOSE(vformat("Maximum number of file handles: %d", _getmaxstdio())); } void FileAccessWindows::finalize() { diff --git a/drivers/windows/ip_windows.cpp b/drivers/windows/ip_windows.cpp index 4ff368d3f452..fe2552bb07de 100644 --- a/drivers/windows/ip_windows.cpp +++ b/drivers/windows/ip_windows.cpp @@ -75,12 +75,12 @@ void IPWindows::_resolve_hostname(List &r_addresses, const String &p_ int s = getaddrinfo(p_hostname.utf8().get_data(), nullptr, &hints, &result); if (s != 0) { - print_verbose("getaddrinfo failed! Cannot resolve hostname."); + PRINT_VERBOSE("getaddrinfo failed! Cannot resolve hostname."); return; } if (result == nullptr || result->ai_addr == nullptr) { - print_verbose("Invalid response from getaddrinfo."); + PRINT_VERBOSE("Invalid response from getaddrinfo."); if (result) { freeaddrinfo(result); } diff --git a/drivers/windows/net_socket_winsock.cpp b/drivers/windows/net_socket_winsock.cpp index 3fe7fc619e98..5149086eae75 100644 --- a/drivers/windows/net_socket_winsock.cpp +++ b/drivers/windows/net_socket_winsock.cpp @@ -142,7 +142,7 @@ NetSocketWinSock::NetError NetSocketWinSock::_get_socket_error() const { if (err == WSAEMSGSIZE || err == WSAENOBUFS) { return ERR_NET_BUFFER_TOO_SMALL; } - print_verbose("Socket error: " + itos(err) + "."); + PRINT_VERBOSE("Socket error: " + itos(err) + "."); return ERR_NET_OTHER; } @@ -255,11 +255,11 @@ Error NetSocketWinSock::open(Type p_sock_type, IP::Type &ip_type) { // recv/recvfrom and an ICMP reply was received from a previous send/sendto. unsigned long disable = 0; if (ioctlsocket(_sock, SIO_UDP_CONNRESET, &disable) == SOCKET_ERROR) { - print_verbose("Unable to turn off UDP WSAECONNRESET behavior on Windows."); + PRINT_VERBOSE("Unable to turn off UDP WSAECONNRESET behavior on Windows."); } if (ioctlsocket(_sock, SIO_UDP_NETRESET, &disable) == SOCKET_ERROR) { // This feature seems not to be supported on wine. - print_verbose("Unable to turn off UDP WSAENETRESET behavior on Windows."); + PRINT_VERBOSE("Unable to turn off UDP WSAENETRESET behavior on Windows."); } } return OK; @@ -284,7 +284,7 @@ Error NetSocketWinSock::bind(IPAddress p_addr, uint16_t p_port) { if (::bind(_sock, (struct sockaddr *)&addr, addr_size) != 0) { NetError err = _get_socket_error(); - print_verbose("Failed to bind socket. Error: " + itos(err) + "."); + PRINT_VERBOSE("Failed to bind socket. Error: " + itos(err) + "."); close(); return ERR_UNAVAILABLE; } @@ -297,7 +297,7 @@ Error NetSocketWinSock::listen(int p_max_pending) { if (::listen(_sock, p_max_pending) != 0) { _get_socket_error(); - print_verbose("Failed to listen from socket."); + PRINT_VERBOSE("Failed to listen from socket."); close(); return FAILED; } @@ -324,7 +324,7 @@ Error NetSocketWinSock::connect_to_host(IPAddress p_host, uint16_t p_port) { case ERR_NET_IN_PROGRESS: return ERR_BUSY; default: - print_verbose("Connection to remote host failed."); + PRINT_VERBOSE("Connection to remote host failed."); close(); return FAILED; } @@ -380,7 +380,7 @@ Error NetSocketWinSock::poll(PollType p_type, int p_timeout) const { if (FD_ISSET(_sock, &ex)) { _get_socket_error(); - print_verbose("Exception when polling socket."); + PRINT_VERBOSE("Exception when polling socket."); return FAILED; } @@ -561,7 +561,7 @@ int NetSocketWinSock::get_available_bytes() const { int ret = ioctlsocket(_sock, FIONREAD, &len); if (ret == -1) { _get_socket_error(); - print_verbose("Error when checking available bytes on socket."); + PRINT_VERBOSE("Error when checking available bytes on socket."); return -1; } return len; @@ -574,7 +574,7 @@ Error NetSocketWinSock::get_socket_address(IPAddress *r_ip, uint16_t *r_port) co socklen_t len = sizeof(saddr); if (getsockname(_sock, (struct sockaddr *)&saddr, &len) != 0) { _get_socket_error(); - print_verbose("Error when reading local socket address."); + PRINT_VERBOSE("Error when reading local socket address."); return FAILED; } _set_ip_port(&saddr, r_ip, r_port); @@ -590,7 +590,7 @@ Ref NetSocketWinSock::accept(IPAddress &r_ip, uint16_t &r_port) { SOCKET fd = ::accept(_sock, (struct sockaddr *)&their_addr, &size); if (fd == INVALID_SOCKET) { _get_socket_error(); - print_verbose("Error when accepting socket connection."); + PRINT_VERBOSE("Error when accepting socket connection."); return out; } diff --git a/editor/debugger/editor_file_server.cpp b/editor/debugger/editor_file_server.cpp index 116e6681ae7a..a9e4acfc99c3 100644 --- a/editor/debugger/editor_file_server.cpp +++ b/editor/debugger/editor_file_server.cpp @@ -121,7 +121,7 @@ void EditorFileServer::poll() { EditorProgress pr("updating_remote_file_system", TTR("Updating assets on target device:"), 105); pr.step(TTR("Syncing headers"), 0, true); - print_verbose("EFS: Connecting taken!"); + PRINT_VERBOSE("EFS: Connecting taken!"); char header[4]; Error err = tcp_peer->get_data((uint8_t *)&header, 4); ERR_FAIL_COND(err != OK); @@ -137,17 +137,17 @@ void EditorFileServer::poll() { err = tcp_peer->get_data((uint8_t *)cpassword, PASSWORD_LENGTH); cpassword[PASSWORD_LENGTH] = 0; ERR_FAIL_COND(err != OK); - print_verbose("EFS: Got password: " + String(cpassword)); + PRINT_VERBOSE("EFS: Got password: " + String(cpassword)); ERR_FAIL_COND_MSG(password != cpassword, "Client disconnected because password mismatch."); uint32_t tag_count = tcp_peer->get_u32(); - print_verbose("EFS: Getting tags: " + itos(tag_count)); + PRINT_VERBOSE("EFS: Getting tags: " + itos(tag_count)); ERR_FAIL_COND(tcp_peer->get_status() != StreamPeerTCP::STATUS_CONNECTED); Vector tags; for (uint32_t i = 0; i < tag_count; i++) { String tag = tcp_peer->get_utf8_string(); - print_verbose("EFS: tag #" + itos(i) + ": " + tag); + PRINT_VERBOSE("EFS: tag #" + itos(i) + ": " + tag); ERR_FAIL_COND(tcp_peer->get_status() != StreamPeerTCP::STATUS_CONNECTED); tags.push_back(tag); } @@ -160,7 +160,7 @@ void EditorFileServer::poll() { // Got files cached by client. uint32_t file_buffer_size = tcp_peer->get_32(); - print_verbose("EFS: Getting file buffer: compressed - " + String::humanize_size(file_buffer_size) + " decompressed: " + String::humanize_size(file_buffer_decompressed_size)); + PRINT_VERBOSE("EFS: Getting file buffer: compressed - " + String::humanize_size(file_buffer_size) + " decompressed: " + String::humanize_size(file_buffer_decompressed_size)); ERR_FAIL_COND(tcp_peer->get_status() != StreamPeerTCP::STATUS_CONNECTED); ERR_FAIL_COND(file_buffer_size > MAX_FILE_BUFFER_SIZE); @@ -179,7 +179,7 @@ void EditorFileServer::poll() { String files_text = String::utf8((const char *)file_buffer_decompressed.ptr(), file_buffer_decompressed.size()); Vector files = files_text.split("\n"); - print_verbose("EFS: Total cached files received: " + itos(files.size())); + PRINT_VERBOSE("EFS: Total cached files received: " + itos(files.size())); for (int i = 0; i < files.size(); i++) { if (files[i].get_slice_count("::") != 2) { continue; @@ -195,7 +195,7 @@ void EditorFileServer::poll() { pr.step(TTR("Scanning for local changes"), 3, true); - print_verbose("EFS: Scanning changes:"); + PRINT_VERBOSE("EFS: Scanning changes:"); HashMap files_to_send; // Scan files to send. @@ -216,7 +216,7 @@ void EditorFileServer::poll() { tcp_peer->put_32(files_to_send.size()); - print_verbose("EFS: Sending list of changed files."); + PRINT_VERBOSE("EFS: Sending list of changed files."); pr.step(TTR("Sending list of changed files:"), 4, true); // Send list of changed files first, to ensure that if connecting breaks, the client is not found in a broken state. @@ -225,7 +225,7 @@ void EditorFileServer::poll() { tcp_peer->put_64(K.value); } - print_verbose("EFS: Sending " + itos(files_to_send.size()) + " files."); + PRINT_VERBOSE("EFS: Sending " + itos(files_to_send.size()) + " files."); int idx = 0; for (KeyValue K : files_to_send) { @@ -244,7 +244,7 @@ void EditorFileServer::poll() { tcp_peer->put_data((const uint8_t *)"GEND", 4); // End marker. - print_verbose("EFS: Done."); + PRINT_VERBOSE("EFS: Done."); } void EditorFileServer::start() { diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp index ba57806a7761..ba1491a3450f 100644 --- a/editor/dependency_editor.cpp +++ b/editor/dependency_editor.cpp @@ -620,7 +620,7 @@ void DependencyRemoveDialog::ok_pressed() { } String path = OS::get_singleton()->get_resource_dir() + files_to_delete[i].replace_first("res://", "/"); - print_verbose("Moving to trash: " + path); + PRINT_VERBOSE("Moving to trash: " + path); Error err = OS::get_singleton()->move_to_trash(path); if (err != OK) { EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + files_to_delete[i] + "\n"); @@ -640,7 +640,7 @@ void DependencyRemoveDialog::ok_pressed() { } else { for (int i = 0; i < dirs_to_delete.size(); ++i) { String path = OS::get_singleton()->get_resource_dir() + dirs_to_delete[i].replace_first("res://", "/"); - print_verbose("Moving to trash: " + path); + PRINT_VERBOSE("Moving to trash: " + path); Error err = OS::get_singleton()->move_to_trash(path); if (err != OK) { EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + dirs_to_delete[i] + "\n"); diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index 18c75b48c355..48a5ebde043c 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -421,7 +421,7 @@ void DocTools::generate(BitField p_flags) { while (classes.size()) { const String &name = classes.front()->get(); if (!ClassDB::is_class_exposed(name)) { - print_verbose(vformat("Class '%s' is not exposed, skipping.", name)); + PRINT_VERBOSE(vformat("Class '%s' is not exposed, skipping.", name)); classes.pop_front(); continue; } diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index 4911d5c702dc..dae04de6f991 100644 --- a/editor/editor_file_system.cpp +++ b/editor/editor_file_system.cpp @@ -2636,7 +2636,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector } Error EditorFileSystem::_reimport_file(const String &p_file, const HashMap &p_custom_options, const String &p_custom_importer, Variant *p_generator_parameters, bool p_update_file_system) { - print_verbose(vformat("EditorFileSystem: Importing file: %s", p_file)); + PRINT_VERBOSE(vformat("EditorFileSystem: Importing file: %s", p_file)); uint64_t start_time = OS::get_singleton()->get_ticks_msec(); EditorFileSystemDirectory *fs = nullptr; @@ -2900,7 +2900,7 @@ Error EditorFileSystem::_reimport_file(const String &p_file, const HashMapcheck_for_invalidation(p_file); - print_verbose(vformat("EditorFileSystem: \"%s\" import took %d ms.", p_file, OS::get_singleton()->get_ticks_msec() - start_time)); + PRINT_VERBOSE(vformat("EditorFileSystem: \"%s\" import took %d ms.", p_file, OS::get_singleton()->get_ticks_msec() - start_time)); ERR_FAIL_COND_V_MSG(err != OK, ERR_FILE_UNRECOGNIZED, "Error importing '" + p_file + "'."); return OK; diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index dd8628b113f2..af74980d4de5 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -3007,7 +3007,7 @@ void EditorHelp::generate_doc(bool p_use_cache) { if (p_use_cache && FileAccess::exists(get_cache_full_path())) { worker_thread.start(_load_doc_thread, nullptr); } else { - print_verbose("Regenerating editor help cache"); + PRINT_VERBOSE("Regenerating editor help cache"); doc->generate(); worker_thread.start(_gen_doc_thread, nullptr); } diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 34777bfc1ac6..55061d568879 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -3398,7 +3398,7 @@ void EditorNode::_exit_editor(int p_exit_code) { void EditorNode::unload_editor_addons() { for (const KeyValue &E : addon_name_to_plugin) { - print_verbose(vformat("Unloading addon: %s", E.key)); + PRINT_VERBOSE(vformat("Unloading addon: %s", E.key)); remove_editor_plugin(E.value, false); memdelete(E.value); } @@ -6673,7 +6673,7 @@ void EditorNode::_print_handler_impl(const String &p_string, bool p_error, bool static void _execute_thread(void *p_ud) { EditorNode::ExecuteThreadArgs *eta = (EditorNode::ExecuteThreadArgs *)p_ud; Error err = OS::get_singleton()->execute(eta->path, eta->args, &eta->output, &eta->exitcode, true, &eta->execute_output_mutex); - print_verbose("Thread exit status: " + itos(eta->exitcode)); + PRINT_VERBOSE("Thread exit status: " + itos(eta->exitcode)); if (err != OK) { eta->exitcode = err; } @@ -7770,7 +7770,7 @@ EditorNode::EditorNode() { if (AssetLibraryEditorPlugin::is_available()) { add_editor_plugin(memnew(AssetLibraryEditorPlugin)); } else { - print_verbose("Asset Library not available (due to using Web editor, or SSL support disabled)."); + PRINT_VERBOSE("Asset Library not available (due to using Web editor, or SSL support disabled)."); } // More visually meaningful to have this later. diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index c475297bd4c1..c80a531143bf 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -1216,7 +1216,7 @@ void EditorSettings::create() { singleton->set_path(get_newest_settings_path()); // Settings can be loaded from older version file, so make sure it's newest. singleton->save_changed_setting = true; - print_verbose("EditorSettings: Load OK!"); + PRINT_VERBOSE("EditorSettings: Load OK!"); singleton->setup_language(); singleton->setup_network(); @@ -1314,7 +1314,7 @@ void EditorSettings::save() { ERR_PRINT("Error saving editor settings to " + singleton->get_path()); } else { singleton->changed_settings.clear(); - print_verbose("EditorSettings: Save OK!"); + PRINT_VERBOSE("EditorSettings: Save OK!"); } } diff --git a/editor/export/codesign.cpp b/editor/export/codesign.cpp index f02895fadf1c..93bd043e83e1 100644 --- a/editor/export/codesign.cpp +++ b/editor/export/codesign.cpp @@ -173,7 +173,7 @@ bool CodeSignCodeResources::add_file1(const String &p_root, const String &p_path f.optional = (found == CRMatch::CR_MATCH_OPTIONAL); f.nested = false; f.hash = hash_sha1_base64(p_root.path_join(p_path)); - print_verbose(vformat("CodeSign/CodeResources: File(V1) %s hash1:%s", f.name, f.hash)); + PRINT_VERBOSE(vformat("CodeSign/CodeResources: File(V1) %s hash1:%s", f.name, f.hash)); files1.push_back(f); return true; @@ -195,7 +195,7 @@ bool CodeSignCodeResources::add_file2(const String &p_root, const String &p_path f.hash = hash_sha1_base64(p_root.path_join(p_path)); f.hash2 = hash_sha256_base64(p_root.path_join(p_path)); - print_verbose(vformat("CodeSign/CodeResources: File(V2) %s hash1:%s hash2:%s", f.name, f.hash, f.hash2)); + PRINT_VERBOSE(vformat("CodeSign/CodeResources: File(V2) %s hash1:%s hash2:%s", f.name, f.hash, f.hash2)); files2.push_back(f); return true; @@ -266,7 +266,7 @@ bool CodeSignCodeResources::add_nested_file(const String &p_root, const String & if (req_string.is_empty()) { req_string = "cdhash H\"" + String::hex_encode_buffer(hash.ptr(), hash.size()) + "\""; } - print_verbose(vformat("CodeSign/CodeResources: Nested object %s (cputype: %d) cdhash:%s designated rq:%s", f.name, mh.get_cputype(), f.hash, req_string)); + PRINT_VERBOSE(vformat("CodeSign/CodeResources: Nested object %s (cputype: %d) cdhash:%s designated rq:%s", f.name, mh.get_cputype(), f.hash, req_string)); if (f.requirements != req_string) { if (i != 0) { f.requirements += " or "; @@ -353,7 +353,7 @@ bool CodeSignCodeResources::add_folder_recursive(const String &p_root, const Str bool CodeSignCodeResources::save_to_file(const String &p_path) { PList pl; - print_verbose(vformat("CodeSign/CodeResources: Writing to file: %s", p_path)); + PRINT_VERBOSE(vformat("CodeSign/CodeResources: Writing to file: %s", p_path)); // Write version 1 hashes. Ref files1_dict = PListNode::new_dict(); @@ -1200,7 +1200,7 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const } \ } - print_verbose(vformat("CodeSign: Signing executable: %s, bundle: %s with entitlements %s", p_exe_path, p_bundle_path, p_ent_path)); + PRINT_VERBOSE(vformat("CodeSign: Signing executable: %s, bundle: %s with entitlements %s", p_exe_path, p_bundle_path, p_ent_path)); PackedByteArray info_hash1, info_hash2; PackedByteArray res_hash1, res_hash2; @@ -1215,7 +1215,7 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const // Read Info.plist. if (!p_info.is_empty()) { - print_verbose("CodeSign: Reading bundle info..."); + PRINT_VERBOSE("CodeSign: Reading bundle info..."); PList info_plist; if (info_plist.load_file(p_info)) { info_hash1 = file_hash_sha1(p_info); @@ -1247,7 +1247,7 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const // Extract fat binary. Vector files_to_sign; if (LipO::is_lipo(main_exe)) { - print_verbose(vformat("CodeSign: Executable is fat, extracting...")); + PRINT_VERBOSE(vformat("CodeSign: Executable is fat, extracting...")); String tmp_path_name = EditorPaths::get_singleton()->get_temp_dir().path_join("_lipo"); Error err = da->make_dir_recursive(tmp_path_name); if (err != OK) { @@ -1266,7 +1266,7 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const } } } else if (MachO::is_macho(main_exe)) { - print_verbose("CodeSign: Executable is thin..."); + PRINT_VERBOSE("CodeSign: Executable is thin..."); files_to_sign.push_back(main_exe); } else { r_error_msg = TTR("Invalid binary format."); @@ -1288,7 +1288,7 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const // Generate core resources. if (!p_bundle_path.is_empty()) { - print_verbose("CodeSign: Generating bundle CodeResources..."); + PRINT_VERBOSE("CodeSign: Generating bundle CodeResources..."); CodeSignCodeResources cr; if (p_ios_bundle) { @@ -1368,9 +1368,9 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const id = (String("a-55554944") /*a-UUID*/ + String::hex_encode_buffer(uuid, 16)); } CharString uuid_str = id.utf8(); - print_verbose(vformat("CodeSign: Used bundle ID: %s", id)); + PRINT_VERBOSE(vformat("CodeSign: Used bundle ID: %s", id)); - print_verbose("CodeSign: Processing entitlements..."); + PRINT_VERBOSE("CodeSign: Processing entitlements..."); Ref cet; Ref ceb; @@ -1385,7 +1385,7 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const ceb.instantiate(entitlements); } - print_verbose("CodeSign: Generating requirements..."); + PRINT_VERBOSE("CodeSign: Generating requirements..."); Ref rq; String team_id = ""; rq.instantiate(); @@ -1398,12 +1398,12 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const r_error_msg = TTR("Invalid executable file."); ERR_FAIL_V_MSG(FAILED, "CodeSign: Invalid executable file."); } - print_verbose(vformat("CodeSign: Signing executable for cputype: %d ...", mh.get_cputype())); + PRINT_VERBOSE(vformat("CodeSign: Signing executable for cputype: %d ...", mh.get_cputype())); - print_verbose("CodeSign: Generating CodeDirectory..."); + PRINT_VERBOSE("CodeSign: Generating CodeDirectory..."); Ref cd1 = memnew(CodeSignCodeDirectory(0x14, 0x01, true, uuid_str, team_id.utf8(), 12, mh.get_exe_limit(), mh.get_code_limit())); Ref cd2 = memnew(CodeSignCodeDirectory(0x20, 0x02, true, uuid_str, team_id.utf8(), 12, mh.get_exe_limit(), mh.get_code_limit())); - print_verbose("CodeSign: Calculating special slot hashes..."); + PRINT_VERBOSE("CodeSign: Calculating special slot hashes..."); if (info_hash2.size() == 0x20) { cd2->set_hash_in_slot(info_hash2, CodeSignCodeDirectory::SLOT_INFO_PLIST); } @@ -1441,14 +1441,14 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const sign_size += 16; // Empty signature size. // Alloc/resize signature load command. - print_verbose(vformat("CodeSign: Reallocating space for the signature superblob (%d)...", sign_size)); + PRINT_VERBOSE(vformat("CodeSign: Reallocating space for the signature superblob (%d)...", sign_size)); if (!mh.set_signature_size(sign_size)) { CLEANUP(); r_error_msg = TTR("Can't resize signature load command."); ERR_FAIL_V_MSG(FAILED, "CodeSign: Can't resize signature load command."); } - print_verbose("CodeSign: Calculating executable code hashes..."); + PRINT_VERBOSE("CodeSign: Calculating executable code hashes..."); // Calculate executable code hashes. PackedByteArray buffer; PackedByteArray hash1, hash2; @@ -1485,11 +1485,11 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const cd1->set_hash_in_slot(hash1, cd1->get_page_count()); } - print_verbose("CodeSign: Generating signature..."); + PRINT_VERBOSE("CodeSign: Generating signature..."); Ref cs; cs.instantiate(); - print_verbose("CodeSign: Writing signature superblob..."); + PRINT_VERBOSE("CodeSign: Writing signature superblob..."); // Write signature data to the executable. CodeSignSuperBlob sb = CodeSignSuperBlob(); sb.add_blob(cd2); @@ -1506,7 +1506,7 @@ Error CodeSign::_codesign_file(bool p_use_hardened_runtime, bool p_force, const sb.write_to_file(mh.get_file()); } if (files_to_sign.size() > 1) { - print_verbose("CodeSign: Rebuilding fat executable..."); + PRINT_VERBOSE("CodeSign: Rebuilding fat executable..."); LipO lip; if (!lip.create_file(main_exe, files_to_sign)) { CLEANUP(); diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index cb496fc9f09e..ac25b7639983 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -2296,9 +2296,9 @@ Error EditorExportPlatform::ssh_run_on_remote(const String &p_host, const String Error err = OS::get_singleton()->execute(ssh_path, args, &out, &exit_code, true); if (out.is_empty()) { - print_verbose(vformat("Exit code: %d", exit_code)); + PRINT_VERBOSE(vformat("Exit code: %d", exit_code)); } else { - print_verbose(vformat("Exit code: %d, Output: %s", exit_code, out.replace("\r\n", "\n"))); + PRINT_VERBOSE(vformat("Exit code: %d, Output: %s", exit_code, out.replace("\r\n", "\n"))); } if (r_out) { *r_out = out.replace("\r\n", "\n").get_slice("\n", 0); diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp index 718b62d6612e..fe3020019e1c 100644 --- a/editor/filesystem_dock.cpp +++ b/editor/filesystem_dock.cpp @@ -1459,7 +1459,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_ } Ref da = DirAccess::create(DirAccess::ACCESS_RESOURCES); - print_verbose("Moving " + old_path + " -> " + new_path); + PRINT_VERBOSE("Moving " + old_path + " -> " + new_path); Error err = da->rename(old_path, new_path); if (err == OK) { // Move/Rename any corresponding import settings too. @@ -1495,7 +1495,7 @@ void FileSystemDock::_try_move_item(const FileOrFolder &p_item, const String &p_ // Only treat as a changed dependency if it was successfully moved. for (int i = 0; i < file_changed_paths.size(); ++i) { p_file_renames[file_changed_paths[i]] = file_changed_paths[i].replace_first(old_path, new_path); - print_verbose(" Remap: " + file_changed_paths[i] + " -> " + p_file_renames[file_changed_paths[i]]); + PRINT_VERBOSE(" Remap: " + file_changed_paths[i] + " -> " + p_file_renames[file_changed_paths[i]]); emit_signal(SNAME("files_moved"), file_changed_paths[i], p_file_renames[file_changed_paths[i]]); } for (int i = 0; i < folder_changed_paths.size(); ++i) { @@ -1524,7 +1524,7 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin } if (p_item.is_file) { - print_verbose("Duplicating " + old_path + " -> " + new_path); + PRINT_VERBOSE("Duplicating " + old_path + " -> " + new_path); // Create the directory structure. EditorFileSystem::get_singleton()->make_dir_recursive(p_new_path.get_base_dir()); @@ -1590,7 +1590,7 @@ void FileSystemDock::_update_dependencies_after_move(const HashMap::ConstIterator I = p_renames.find(E); const String file = I ? I->value : E; - print_verbose("Remapping dependencies for: " + file); + PRINT_VERBOSE("Remapping dependencies for: " + file); const Error err = ResourceLoader::rename_dependencies(file, p_renames); if (err == OK) { if (ResourceLoader::get_resource_type(file) == "PackedScene") { @@ -1844,7 +1844,7 @@ void FileSystemDock::_rename_operation_confirm() { current_path_line_edit->set_text(current_path); } - print_verbose("FileSystem: calling rescan."); + PRINT_VERBOSE("FileSystem: calling rescan."); _rescan(); } @@ -2000,7 +2000,7 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path, bool p_cop EditorSceneTabs::get_singleton()->set_current_tab(current_tab); - print_verbose("FileSystem: calling rescan."); + PRINT_VERBOSE("FileSystem: calling rescan."); _rescan(); current_path = p_to_path; diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp index 42f4b59186ce..3e5a78d4503e 100644 --- a/editor/find_in_files.cpp +++ b/editor/find_in_files.cpp @@ -113,12 +113,12 @@ void FindInFiles::_notification(int p_what) { void FindInFiles::start() { if (_pattern.is_empty()) { - print_verbose("Nothing to search, pattern is empty"); + PRINT_VERBOSE("Nothing to search, pattern is empty"); emit_signal(SceneStringName(finished)); return; } if (_extension_filter.size() == 0) { - print_verbose("Nothing to search, filter matches no files"); + PRINT_VERBOSE("Nothing to search, filter matches no files"); emit_signal(SceneStringName(finished)); return; } @@ -197,7 +197,7 @@ void FindInFiles::_iterate() { _scan_file(fpath); } else { - print_verbose("Search complete"); + PRINT_VERBOSE("Search complete"); set_process(false); _current_dir = ""; _searching = false; @@ -215,7 +215,7 @@ float FindInFiles::get_progress() const { void FindInFiles::_scan_dir(const String &path, PackedStringArray &out_folders, PackedStringArray &out_files_to_scan) { Ref dir = DirAccess::open(path); if (dir.is_null()) { - print_verbose("Cannot open directory! " + path); + PRINT_VERBOSE("Cannot open directory! " + path); return; } @@ -262,7 +262,7 @@ void FindInFiles::_scan_dir(const String &path, PackedStringArray &out_folders, void FindInFiles::_scan_file(const String &fpath) { Ref f = FileAccess::open(fpath, FileAccess::READ); if (f.is_null()) { - print_verbose(String("Cannot open file ") + fpath); + PRINT_VERBOSE(String("Cannot open file ") + fpath); return; } @@ -973,7 +973,7 @@ void FindInFilesPanel::apply_replaces_in_file(const String &fpath, const Vector< int _; if (!find_next(line, search_text, repl_begin, _finder->is_match_case(), _finder->is_whole_words(), _, _)) { // Make sure the replace is still valid in case the file was tampered with. - print_verbose(String("Occurrence no longer matches, replace will be ignored in {0}: line {1}, col {2}").format(varray(fpath, repl_line_number, repl_begin))); + PRINT_VERBOSE(String("Occurrence no longer matches, replace will be ignored in {0}: line {1}, col {2}").format(varray(fpath, repl_line_number, repl_begin))); continue; } diff --git a/editor/import/3d/resource_importer_obj.cpp b/editor/import/3d/resource_importer_obj.cpp index 59d39152e9ae..6a49d71d4b21 100644 --- a/editor/import/3d/resource_importer_obj.cpp +++ b/editor/import/3d/resource_importer_obj.cpp @@ -417,8 +417,8 @@ static Error _parse_obj(const String &p_path, List> &r_meshes, surf_tool->index(); - print_verbose("OBJ: Current material library " + current_material_library + " has " + itos(material_map.has(current_material_library))); - print_verbose("OBJ: Current material " + current_material + " has " + itos(material_map.has(current_material_library) && material_map[current_material_library].has(current_material))); + PRINT_VERBOSE("OBJ: Current material library " + current_material_library + " has " + itos(material_map.has(current_material_library))); + PRINT_VERBOSE("OBJ: Current material " + current_material + " has " + itos(material_map.has(current_material_library) && material_map[current_material_library].has(current_material))); Ref material; if (material_map.has(current_material_library) && material_map[current_material_library].has(current_material)) { material = material_map[current_material_library][current_material]; @@ -446,7 +446,7 @@ static Error _parse_obj(const String &p_path, List> &r_meshes, mesh->add_surface(Mesh::PRIMITIVE_TRIANGLES, array, TypedArray(), Dictionary(), material, name, mesh_flags); - print_verbose("OBJ: Added surface :" + mesh->get_surface_name(mesh->get_surface_count() - 1)); + PRINT_VERBOSE("OBJ: Added surface :" + mesh->get_surface_name(mesh->get_surface_count() - 1)); if (!current_material.is_empty()) { if (mesh->get_surface_count() >= 1) { diff --git a/editor/import/3d/resource_importer_scene.cpp b/editor/import/3d/resource_importer_scene.cpp index 9ab97abd56ca..9161d250e5b7 100644 --- a/editor/import/3d/resource_importer_scene.cpp +++ b/editor/import/3d/resource_importer_scene.cpp @@ -728,7 +728,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, HashMap &F : r_node_renames) { if (F.first == absolute_path) { NodePath new_path(ap_root->get_path_to(F.second).get_names(), path.get_subnames(), false); - print_verbose(vformat("Fix: Correcting node path in animation track: %s should be %s", path, new_path)); + PRINT_VERBOSE(vformat("Fix: Correcting node path in animation track: %s should be %s", path, new_path)); anim->track_set_path(i, new_path); break; // Only one match is possible. } @@ -1031,7 +1031,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, HashMapget_path_to(p_node); if (new_path != original_path) { - print_verbose(vformat("Fix: Renamed %s to %s", original_path, new_path)); + PRINT_VERBOSE(vformat("Fix: Renamed %s to %s", original_path, new_path)); r_node_renames.push_back({ original_path, p_node }); } // If we created new node instead, merge meta values from the original node. @@ -3166,13 +3166,13 @@ Error ResourceImporterScene::import(ResourceUID::ID p_source_id, const String &p library.instantiate(); // Will be empty } - print_verbose("Saving animation to: " + p_save_path + ".res"); + PRINT_VERBOSE("Saving animation to: " + p_save_path + ".res"); err = ResourceSaver::save(library, p_save_path + ".res", flags); //do not take over, let the changed files reload themselves ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save animation to file '" + p_save_path + ".res'."); } else if (_scene_import_type == "PackedScene") { Ref packer = memnew(PackedScene); packer->pack(scene); - print_verbose("Saving scene to: " + p_save_path + ".scn"); + PRINT_VERBOSE("Saving scene to: " + p_save_path + ".scn"); err = ResourceSaver::save(packer, p_save_path + ".scn", flags); //do not take over, let the changed files reload themselves ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save scene to file '" + p_save_path + ".scn'."); _generate_editor_preview_for_scene(p_source_file, scene); diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp index 19dafb7c42c7..5c21dc8b8ddd 100644 --- a/editor/import/dynamic_font_import_settings.cpp +++ b/editor/import/dynamic_font_import_settings.cpp @@ -1154,13 +1154,13 @@ void DynamicFontImportSettingsDialog::open_settings(const String &p_path) { ERR_FAIL_COND(config.is_null()); Error err = config->load(p_path + ".import"); - print_verbose("Loading import settings:"); + PRINT_VERBOSE("Loading import settings:"); if (err == OK) { List keys; config->get_section_keys("params", &keys); for (List::Element *E = keys.front(); E; E = E->next()) { String key = E->get(); - print_verbose(String(" ") + key + " == " + String(config->get_value("params", key))); + PRINT_VERBOSE(String(" ") + key + " == " + String(config->get_value("params", key))); if (key == "preload") { Array preload_configurations = config->get_value("params", key); for (int i = 0; i < preload_configurations.size(); i++) { diff --git a/editor/import/resource_importer_bmfont.cpp b/editor/import/resource_importer_bmfont.cpp index b7efdbb6d6d0..9f82ac3a88df 100644 --- a/editor/import/resource_importer_bmfont.cpp +++ b/editor/import/resource_importer_bmfont.cpp @@ -68,7 +68,7 @@ void ResourceImporterBMFont::get_import_options(const String &p_path, List &p_options, List *r_platform_variants, List *r_gen_files, Variant *r_metadata) { - print_verbose("Importing BMFont font from: " + p_source_file); + PRINT_VERBOSE("Importing BMFont font from: " + p_source_file); Array fallbacks = p_options["fallbacks"]; TextServer::FixedSizeScaleMode smode = (TextServer::FixedSizeScaleMode)p_options["scaling_mode"].operator int(); @@ -103,10 +103,10 @@ Error ResourceImporterBMFont::import(ResourceUID::ID p_source_id, const String & flg |= ResourceSaver::SaverFlags::FLAG_COMPRESS; } - print_verbose("Saving to: " + p_save_path + ".fontdata"); + PRINT_VERBOSE("Saving to: " + p_save_path + ".fontdata"); err = ResourceSaver::save(font, p_save_path + ".fontdata", flg); ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save font to file \"" + p_save_path + ".res\"."); - print_verbose("Done saving to: " + p_save_path + ".fontdata"); + PRINT_VERBOSE("Done saving to: " + p_save_path + ".fontdata"); return OK; } diff --git a/editor/import/resource_importer_dynamic_font.cpp b/editor/import/resource_importer_dynamic_font.cpp index 0863af3fefe5..e0d1465414ee 100644 --- a/editor/import/resource_importer_dynamic_font.cpp +++ b/editor/import/resource_importer_dynamic_font.cpp @@ -146,7 +146,7 @@ void ResourceImporterDynamicFont::show_advanced_options(const String &p_path) { } Error ResourceImporterDynamicFont::import(ResourceUID::ID p_source_id, const String &p_source_file, const String &p_save_path, const HashMap &p_options, List *r_platform_variants, List *r_gen_files, Variant *r_metadata) { - print_verbose("Importing dynamic font from: " + p_source_file); + PRINT_VERBOSE("Importing dynamic font from: " + p_source_file); int antialiasing = p_options["antialiasing"]; bool generate_mipmaps = p_options["generate_mipmaps"]; @@ -266,10 +266,10 @@ Error ResourceImporterDynamicFont::import(ResourceUID::ID p_source_id, const Str flg |= ResourceSaver::SaverFlags::FLAG_COMPRESS; } - print_verbose("Saving to: " + p_save_path + ".fontdata"); + PRINT_VERBOSE("Saving to: " + p_save_path + ".fontdata"); Error err = ResourceSaver::save(font, p_save_path + ".fontdata", flg); ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save font to file \"" + p_save_path + ".res\"."); - print_verbose("Done saving to: " + p_save_path + ".fontdata"); + PRINT_VERBOSE("Done saving to: " + p_save_path + ".fontdata"); return OK; } diff --git a/editor/import/resource_importer_imagefont.cpp b/editor/import/resource_importer_imagefont.cpp index e0a8cd924b7d..f907ae73477f 100644 --- a/editor/import/resource_importer_imagefont.cpp +++ b/editor/import/resource_importer_imagefont.cpp @@ -76,7 +76,7 @@ void ResourceImporterImageFont::get_import_options(const String &p_path, List &p_options, List *r_platform_variants, List *r_gen_files, Variant *r_metadata) { - print_verbose("Importing image font from: " + p_source_file); + PRINT_VERBOSE("Importing image font from: " + p_source_file); int columns = p_options["columns"]; int rows = p_options["rows"]; @@ -338,10 +338,10 @@ Error ResourceImporterImageFont::import(ResourceUID::ID p_source_id, const Strin flg |= ResourceSaver::SaverFlags::FLAG_COMPRESS; } - print_verbose("Saving to: " + p_save_path + ".fontdata"); + PRINT_VERBOSE("Saving to: " + p_save_path + ".fontdata"); err = ResourceSaver::save(font, p_save_path + ".fontdata", flg); ERR_FAIL_COND_V_MSG(err != OK, err, "Cannot save font to file \"" + p_save_path + ".res\"."); - print_verbose("Done saving to: " + p_save_path + ".fontdata"); + PRINT_VERBOSE("Done saving to: " + p_save_path + ".fontdata"); return OK; } diff --git a/editor/localization_editor.cpp b/editor/localization_editor.cpp index 7b2e6e81ee29..ab634540772f 100644 --- a/editor/localization_editor.cpp +++ b/editor/localization_editor.cpp @@ -431,7 +431,7 @@ void LocalizationEditor::_filesystem_files_moved(const String &p_old_file, const remaps.erase(p_old_file); remaps[p_new_file] = remapped_files; remaps_changed = true; - print_verbose(vformat("Changed remap key \"%s\" to \"%s\" due to a moved file.", p_old_file, p_new_file)); + PRINT_VERBOSE(vformat("Changed remap key \"%s\" to \"%s\" due to a moved file.", p_old_file, p_new_file)); } // Check for the Array elements of the values. @@ -451,7 +451,7 @@ void LocalizationEditor::_filesystem_files_moved(const String &p_old_file, const remapped_files.remove_at(j + 1); remaps_changed = true; remapped_files_updated = true; - print_verbose(vformat("Changed remap value \"%s\" to \"%s\" of key \"%s\" due to a moved file.", res_path + ":" + locale_name, remapped_files[j], remap_keys[i])); + PRINT_VERBOSE(vformat("Changed remap value \"%s\" to \"%s\" of key \"%s\" due to a moved file.", res_path + ":" + locale_name, remapped_files[j], remap_keys[i])); } } @@ -486,12 +486,12 @@ void LocalizationEditor::_filesystem_file_removed(const String &p_file) { String res_path = remapped_files[j].substr(0, splitter_pos); remaps_changed = p_file == res_path; if (remaps_changed) { - print_verbose(vformat("Remap value \"%s\" of key \"%s\" has been removed from the file system.", remapped_files[j], remap_keys[i])); + PRINT_VERBOSE(vformat("Remap value \"%s\" of key \"%s\" has been removed from the file system.", remapped_files[j], remap_keys[i])); } } } } else { - print_verbose(vformat("Remap key \"%s\" has been removed from the file system.", p_file)); + PRINT_VERBOSE(vformat("Remap key \"%s\" has been removed from the file system.", p_file)); } if (remaps_changed) { diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp index 2b3ade84df10..26db653111fd 100644 --- a/editor/project_converter_3_to_4.cpp +++ b/editor/project_converter_3_to_4.cpp @@ -727,7 +727,7 @@ Vector ProjectConverter3To4::check_for_files() { file_name = dir->_get_next(); } } else { - print_verbose("Failed to open " + path); + PRINT_VERBOSE("Failed to open " + path); } } return collected_files; diff --git a/editor/project_manager/project_list.cpp b/editor/project_manager/project_list.cpp index f530c107273b..ff0762a2628d 100644 --- a/editor/project_manager/project_list.cpp +++ b/editor/project_manager/project_list.cpp @@ -387,15 +387,15 @@ void ProjectList::_scan_thread(void *p_scan_data) { ScanData *scan_data = static_cast(p_scan_data); for (const String &base_path : scan_data->paths_to_scan) { - print_verbose(vformat("Scanning for projects in \"%s\".", base_path)); + PRINT_VERBOSE(vformat("Scanning for projects in \"%s\".", base_path)); _scan_folder_recursive(base_path, &scan_data->found_projects, scan_data->scan_in_progress); if (!scan_data->scan_in_progress.is_set()) { - print_verbose("Scan aborted."); + PRINT_VERBOSE("Scan aborted."); break; } } - print_verbose(vformat("Found %d project(s).", scan_data->found_projects.size())); + PRINT_VERBOSE(vformat("Found %d project(s).", scan_data->found_projects.size())); scan_data->scan_in_progress.clear(); } diff --git a/editor/surface_upgrade_tool.cpp b/editor/surface_upgrade_tool.cpp index ccac7925d8ac..2dc1790e5e06 100644 --- a/editor/surface_upgrade_tool.cpp +++ b/editor/surface_upgrade_tool.cpp @@ -154,7 +154,7 @@ void SurfaceUpgradeTool::finish_upgrade() { ep.step(TTR("Attempting to remove ") + remap_path, step++); String path = OS::get_singleton()->get_resource_dir() + remap_path.replace_first("res://", "/"); - print_verbose("Moving to trash: " + path); + PRINT_VERBOSE("Moving to trash: " + path); err = OS::get_singleton()->move_to_trash(path); if (err != OK) { EditorNode::get_singleton()->add_io_error(TTR("Cannot remove:") + "\n" + remap_path + "\n"); diff --git a/editor/themes/editor_theme_manager.cpp b/editor/themes/editor_theme_manager.cpp index 781281383ae3..3f06c9e2be0c 100644 --- a/editor/themes/editor_theme_manager.cpp +++ b/editor/themes/editor_theme_manager.cpp @@ -170,7 +170,7 @@ Ref EditorThemeManager::_create_base_theme(const Ref & theme->set_generated_fonts_hash(config.hash_fonts()); theme->set_generated_icons_hash(config.hash_icons()); - print_verbose(vformat("EditorTheme: Generating new theme for the config '%d'.", theme->get_generated_hash())); + PRINT_VERBOSE(vformat("EditorTheme: Generating new theme for the config '%d'.", theme->get_generated_hash())); _create_shared_styles(theme, config); @@ -185,10 +185,10 @@ Ref EditorThemeManager::_create_base_theme(const Ref & // Otherwise, regenerate them. bool keep_old_icons = (p_old_theme.is_valid() && theme->get_generated_icons_hash() == p_old_theme->get_generated_icons_hash()); if (keep_old_icons) { - print_verbose("EditorTheme: Can keep old icons, copying."); + PRINT_VERBOSE("EditorTheme: Can keep old icons, copying."); editor_copy_icons(theme, p_old_theme); } else { - print_verbose("EditorTheme: Generating new icons."); + PRINT_VERBOSE("EditorTheme: Generating new icons."); editor_register_icons(theme, config.dark_theme, config.icon_saturation, config.thumb_size, config.gizmo_handle_scale); } @@ -202,7 +202,7 @@ Ref EditorThemeManager::_create_base_theme(const Ref & // TODO: Check if existing font definitions from the old theme are usable and copy them. // External function, see editor_fonts.cpp. - print_verbose("EditorTheme: Generating new fonts."); + PRINT_VERBOSE("EditorTheme: Generating new fonts."); editor_register_fonts(theme); OS::get_singleton()->benchmark_end_measure(get_benchmark_key(), "Register Fonts"); @@ -210,7 +210,7 @@ Ref EditorThemeManager::_create_base_theme(const Ref & // TODO: Check if existing style definitions from the old theme are usable and copy them. - print_verbose("EditorTheme: Generating new styles."); + PRINT_VERBOSE("EditorTheme: Generating new styles."); _populate_standard_styles(theme, config); _populate_editor_styles(theme, config); _populate_text_editor_styles(theme, config); diff --git a/main/main.cpp b/main/main.cpp index b8dec2154b24..b8c9a6b10ddf 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -3113,7 +3113,7 @@ Error Main::setup2(bool p_show_boot_logo) { DisplayServer::get_singleton()->tablet_set_current_driver(DisplayServer::get_singleton()->tablet_get_driver_name(0)); } - print_verbose("Using \"" + tablet_driver + "\" pen tablet driver..."); + PRINT_VERBOSE("Using \"" + tablet_driver + "\" pen tablet driver..."); OS::get_singleton()->benchmark_end_measure("Servers", "Tablet Driver"); } @@ -3450,8 +3450,8 @@ Error Main::setup2(bool p_show_boot_logo) { ClassDB::set_current_api(ClassDB::API_NONE); //no more APIs are registered at this point - print_verbose("CORE API HASH: " + uitos(ClassDB::get_api_hash(ClassDB::API_CORE))); - print_verbose("EDITOR API HASH: " + uitos(ClassDB::get_api_hash(ClassDB::API_EDITOR))); + PRINT_VERBOSE("CORE API HASH: " + uitos(ClassDB::get_api_hash(ClassDB::API_CORE))); + PRINT_VERBOSE("EDITOR API HASH: " + uitos(ClassDB::get_api_hash(ClassDB::API_EDITOR))); MAIN_PRINT("Main: Done"); OS::get_singleton()->benchmark_end_measure("Startup", "Main::Setup2"); diff --git a/main/steam_tracker.cpp b/main/steam_tracker.cpp index 4c90b5d8642e..e1c9f2309a1f 100644 --- a/main/steam_tracker.cpp +++ b/main/steam_tracker.cpp @@ -70,7 +70,7 @@ SteamTracker::SteamTracker() { steam_library_handle = nullptr; return; } - print_verbose("Loaded SteamAPI library"); + PRINT_VERBOSE("Loaded SteamAPI library"); void *symbol_handle = nullptr; err = OS::get_singleton()->get_dynamic_library_symbol_handle(steam_library_handle, "SteamAPI_InitFlat", symbol_handle, true); // Try new API, 1.59+. diff --git a/modules/astcenc/image_compress_astcenc.cpp b/modules/astcenc/image_compress_astcenc.cpp index 1dfa7da766ab..7bba75e67440 100644 --- a/modules/astcenc/image_compress_astcenc.cpp +++ b/modules/astcenc/image_compress_astcenc.cpp @@ -93,7 +93,7 @@ void _compress_astc(Image *r_img, Image::ASTCFormat p_format) { height = required_height; } - print_verbose(vformat("astcenc: Encoding image size %dx%d to format %s%s.", width, height, Image::get_format_name(target_format), mipmaps ? ", with mipmaps" : "")); + PRINT_VERBOSE(vformat("astcenc: Encoding image size %dx%d to format %s%s.", width, height, Image::get_format_name(target_format), mipmaps ? ", with mipmaps" : "")); // Initialize astcenc. @@ -172,7 +172,7 @@ void _compress_astc(Image *r_img, Image::ASTCFormat p_format) { r_img->set_data(width, height, mipmaps, target_format, dest_data); - print_verbose(vformat("astcenc: Encoding took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time)); + PRINT_VERBOSE(vformat("astcenc: Encoding took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time)); } void _decompress_astc(Image *r_img) { @@ -289,5 +289,5 @@ void _decompress_astc(Image *r_img) { r_img->set_data(width, height, mipmaps, target_format, dest_data); - print_verbose(vformat("astcenc: Decompression took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time)); + PRINT_VERBOSE(vformat("astcenc: Decompression took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time)); } diff --git a/modules/basis_universal/image_compress_basisu.cpp b/modules/basis_universal/image_compress_basisu.cpp index be28d8950822..0342a8f8fda0 100644 --- a/modules/basis_universal/image_compress_basisu.cpp +++ b/modules/basis_universal/image_compress_basisu.cpp @@ -251,7 +251,7 @@ Vector basis_universal_packer(const Ref &p_image, Image::UsedCha *(uint32_t *)basisu_data_ptr = decompress_format; memcpy(basisu_data_ptr + 4, basisu_encoded.get_ptr(), basisu_encoded.size()); - print_verbose(vformat("BasisU: Encoding a %dx%d image with %d mipmaps took %d ms.", p_image->get_width(), p_image->get_height(), p_image->get_mipmap_count(), OS::get_singleton()->get_ticks_msec() - start_time)); + PRINT_VERBOSE(vformat("BasisU: Encoding a %dx%d image with %d mipmaps took %d ms.", p_image->get_width(), p_image->get_height(), p_image->get_mipmap_count(), OS::get_singleton()->get_ticks_msec() - start_time)); return basisu_data; } @@ -443,7 +443,7 @@ Ref basis_universal_unpacker_ptr(const uint8_t *p_data, int p_size) { } } - print_verbose(vformat("BasisU: Transcoding a %dx%d image with %d mipmaps into %s took %d ms.", + PRINT_VERBOSE(vformat("BasisU: Transcoding a %dx%d image with %d mipmaps into %s took %d ms.", image->get_width(), image->get_height(), image->get_mipmap_count(), Image::get_format_name(image_format), OS::get_singleton()->get_ticks_msec() - start_time)); return image; diff --git a/modules/bcdec/image_decompress_bcdec.cpp b/modules/bcdec/image_decompress_bcdec.cpp index 6d97ca38abef..0c92f5264f88 100644 --- a/modules/bcdec/image_decompress_bcdec.cpp +++ b/modules/bcdec/image_decompress_bcdec.cpp @@ -162,7 +162,7 @@ void image_decompress_bcdec(Image *p_image) { int new_width = width + (4 - (width % 4)); int new_height = height + (4 - (height % 4)); - print_verbose(vformat("Compressed image's dimensions are not multiples of 4 (%dx%d), aligning to (%dx%d)", width, height, new_width, new_height)); + PRINT_VERBOSE(vformat("Compressed image's dimensions are not multiples of 4 (%dx%d), aligning to (%dx%d)", width, height, new_width, new_height)); width = new_width; height = new_height; @@ -246,6 +246,6 @@ void image_decompress_bcdec(Image *p_image) { p_image->convert_ra_rgba8_to_rg(); } - print_verbose(vformat("bcdec: Decompression of a %dx%d %s image with %d mipmaps took %d ms.", + PRINT_VERBOSE(vformat("bcdec: Decompression of a %dx%d %s image with %d mipmaps took %d ms.", p_image->get_width(), p_image->get_height(), Image::get_format_name(source_format), p_image->get_mipmap_count(), OS::get_singleton()->get_ticks_msec() - start_time)); } diff --git a/modules/betsy/image_compress_betsy.cpp b/modules/betsy/image_compress_betsy.cpp index 35f61521f4bb..8c2d60654be3 100644 --- a/modules/betsy/image_compress_betsy.cpp +++ b/modules/betsy/image_compress_betsy.cpp @@ -660,7 +660,7 @@ Error BetsyCompressor::_compress(BetsyFormat p_format, Image *r_img) { // Set the compressed data to the image. r_img->set_data(r_img->get_width(), r_img->get_height(), r_img->has_mipmaps(), dest_format, dst_data); - print_verbose( + PRINT_VERBOSE( vformat("Betsy: Encoding a %dx%d image with %d mipmaps as %s took %d ms.", r_img->get_width(), r_img->get_height(), diff --git a/modules/camera/camera_feed_linux.cpp b/modules/camera/camera_feed_linux.cpp index 3ae1b70ac9fd..f54194f53c94 100644 --- a/modules/camera/camera_feed_linux.cpp +++ b/modules/camera/camera_feed_linux.cpp @@ -110,7 +110,7 @@ void CameraFeedLinux::_add_format(v4l2_fmtdesc p_description, v4l2_frmsize_discr feed_format.frame_numerator = p_frame_numerator; feed_format.frame_denominator = p_frame_denominator; feed_format.pixel_format = p_description.pixelformat; - print_verbose(vformat("%s %dx%d@%d/%dfps", (char *)p_description.description, p_size.width, p_size.height, p_frame_denominator, p_frame_numerator)); + PRINT_VERBOSE(vformat("%s %dx%d@%d/%dfps", (char *)p_description.description, p_size.width, p_size.height, p_frame_denominator, p_frame_numerator)); formats.push_back(feed_format); } diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index a908b1441251..0ce649dbb06d 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -365,7 +365,7 @@ static void _pack_manifold( ERR_FAIL_COND_MSG(mesh.vertProperties.size() % mesh.numProp != 0, "Invalid vertex properties size."); mesh.Merge(); #ifdef DEV_ENABLED - print_verbose(_export_meshgl_as_json(mesh)); + PRINT_VERBOSE(_export_meshgl_as_json(mesh)); #endif // DEV_ENABLED r_manifold = manifold::Manifold(mesh); } diff --git a/modules/cvtt/image_compress_cvtt.cpp b/modules/cvtt/image_compress_cvtt.cpp index 2087dde2a1bf..777ce0057150 100644 --- a/modules/cvtt/image_compress_cvtt.cpp +++ b/modules/cvtt/image_compress_cvtt.cpp @@ -244,7 +244,7 @@ void image_compress_cvtt(Image *p_image, Image::UsedChannels p_channels) { p_image->set_data(p_image->get_width(), p_image->get_height(), p_image->has_mipmaps(), target_format, data); - print_verbose(vformat("CVTT: Encoding took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time)); + PRINT_VERBOSE(vformat("CVTT: Encoding took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time)); } void image_decompress_cvtt(Image *p_image) { diff --git a/modules/etcpak/image_compress_etcpak.cpp b/modules/etcpak/image_compress_etcpak.cpp index 14887ce469c6..74ff6e86a48f 100644 --- a/modules/etcpak/image_compress_etcpak.cpp +++ b/modules/etcpak/image_compress_etcpak.cpp @@ -301,5 +301,5 @@ void _compress_etcpak(EtcpakType p_compress_type, Image *r_img) { // Replace original image with compressed one. r_img->set_data(width, height, has_mipmaps, target_format, dest_data); - print_verbose(vformat("etcpak: Encoding took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time)); + PRINT_VERBOSE(vformat("etcpak: Encoding took %d ms.", OS::get_singleton()->get_ticks_msec() - start_time)); } diff --git a/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp b/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp index f5b19f803ae6..91ab6dc066f9 100644 --- a/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp +++ b/modules/fbx/editor/editor_scene_importer_fbx2gltf.cpp @@ -86,8 +86,8 @@ Node *EditorSceneFormatImporterFBX2GLTF::import_scene(const String &p_path, uint String standard_out; int ret; OS::get_singleton()->execute(fbx2gltf_path, args, &standard_out, &ret, true); - print_verbose(fbx2gltf_path); - print_verbose(standard_out); + PRINT_VERBOSE(fbx2gltf_path); + PRINT_VERBOSE(standard_out); if (ret != 0) { if (r_err) { @@ -107,7 +107,7 @@ Node *EditorSceneFormatImporterFBX2GLTF::import_scene(const String &p_path, uint if (p_options.has(SNAME("nodes/import_as_skeleton_bones")) ? (bool)p_options[SNAME("nodes/import_as_skeleton_bones")] : false) { state->set_import_as_skeleton_bones(true); } - print_verbose(vformat("glTF path: %s", sink)); + PRINT_VERBOSE(vformat("glTF path: %s", sink)); Error err = gltf->append_from_file(sink, state, p_flags, p_path.get_base_dir()); if (err != OK) { if (r_err) { diff --git a/modules/fbx/editor/editor_scene_importer_ufbx.cpp b/modules/fbx/editor/editor_scene_importer_ufbx.cpp index 64075c06643e..c8293dd4525d 100644 --- a/modules/fbx/editor/editor_scene_importer_ufbx.cpp +++ b/modules/fbx/editor/editor_scene_importer_ufbx.cpp @@ -63,7 +63,7 @@ Node *EditorSceneFormatImporterUFBX::import_scene(const String &p_path, uint32_t fbx.instantiate(); Ref state; state.instantiate(); - print_verbose(vformat("FBX path: %s", p_path)); + PRINT_VERBOSE(vformat("FBX path: %s", p_path)); String path = ProjectSettings::get_singleton()->globalize_path(p_path); bool allow_geometry_helper_nodes = p_options.has("fbx/allow_geometry_helper_nodes") ? (bool)p_options["fbx/allow_geometry_helper_nodes"] : false; if (allow_geometry_helper_nodes) { diff --git a/modules/fbx/fbx_document.cpp b/modules/fbx/fbx_document.cpp index d6c304d0564a..bea5a4ee3ab7 100644 --- a/modules/fbx/fbx_document.cpp +++ b/modules/fbx/fbx_document.cpp @@ -463,7 +463,7 @@ Error FBXDocument::_parse_meshes(Ref p_state) { } for (const ufbx_mesh *fbx_mesh : fbx_scene->meshes) { - print_verbose("FBX: Parsing mesh: " + itos(int64_t(fbx_mesh->typed_id))); + PRINT_VERBOSE("FBX: Parsing mesh: " + itos(int64_t(fbx_mesh->typed_id))); static const Mesh::PrimitiveType primitive_types[] = { Mesh::PRIMITIVE_TRIANGLES, @@ -493,7 +493,7 @@ Error FBXDocument::_parse_meshes(Ref p_state) { Vector blend_weights; Vector blend_channels; if (use_blend_shapes) { - print_verbose("FBX: Mesh has targets"); + PRINT_VERBOSE("FBX: Mesh has targets"); import_mesh->set_blend_shape_mode(Mesh::BLEND_SHAPE_MODE_NORMALIZED); @@ -771,7 +771,7 @@ Error FBXDocument::_parse_meshes(Ref p_state) { Array morphs; //blend shapes if (use_blend_shapes) { - print_verbose("FBX: Mesh has targets"); + PRINT_VERBOSE("FBX: Mesh has targets"); import_mesh->set_blend_shape_mode(Mesh::BLEND_SHAPE_MODE_NORMALIZED); @@ -910,7 +910,7 @@ Error FBXDocument::_parse_meshes(Ref p_state) { p_state->meshes.push_back(mesh); } - print_verbose("FBX: Total meshes: " + itos(p_state->meshes.size())); + PRINT_VERBOSE("FBX: Total meshes: " + itos(p_state->meshes.size())); return OK; } @@ -1105,7 +1105,7 @@ Error FBXDocument::_parse_images(Ref p_state, const String &p_base_pat p_state->textures.push_back(texture); } - print_verbose("FBX: Total images: " + itos(p_state->images.size())); + PRINT_VERBOSE("FBX: Total images: " + itos(p_state->images.size())); return OK; } @@ -1323,7 +1323,7 @@ Error FBXDocument::_parse_materials(Ref p_state) { p_state->materials.push_back(material); } - print_verbose("Total materials: " + itos(p_state->materials.size())); + PRINT_VERBOSE("Total materials: " + itos(p_state->materials.size())); return OK; } @@ -1351,7 +1351,7 @@ Error FBXDocument::_parse_cameras(Ref p_state) { p_state->cameras.push_back(camera); } - print_verbose("FBX: Total cameras: " + itos(p_state->cameras.size())); + PRINT_VERBOSE("FBX: Total cameras: " + itos(p_state->cameras.size())); return OK; } @@ -1444,7 +1444,7 @@ Error FBXDocument::_parse_animations(Ref p_state) { p_state->animations.push_back(animation); } - print_verbose("FBX: Total animations '" + itos(p_state->animations.size()) + "'."); + PRINT_VERBOSE("FBX: Total animations '" + itos(p_state->animations.size()) + "'."); return OK; } @@ -1476,7 +1476,7 @@ BoneAttachment3D *FBXDocument::_generate_bone_attachment(Ref p_state, Ref fbx_node = p_state->nodes[p_node_index]; Ref bone_node = p_state->nodes[p_bone_index]; BoneAttachment3D *bone_attachment = memnew(BoneAttachment3D); - print_verbose("FBX: Creating bone attachment for: " + fbx_node->get_name()); + PRINT_VERBOSE("FBX: Creating bone attachment for: " + fbx_node->get_name()); ERR_FAIL_COND_V(!bone_node->joint, nullptr); @@ -1491,7 +1491,7 @@ ImporterMeshInstance3D *FBXDocument::_generate_mesh_instance(Ref p_sta ERR_FAIL_INDEX_V(fbx_node->mesh, p_state->meshes.size(), nullptr); ImporterMeshInstance3D *mi = memnew(ImporterMeshInstance3D); - print_verbose("FBX: Creating mesh for: " + fbx_node->get_name()); + PRINT_VERBOSE("FBX: Creating mesh for: " + fbx_node->get_name()); p_state->scene_mesh_instances.insert(p_node_index, mi); Ref mesh = p_state->meshes.write[fbx_node->mesh]; @@ -1511,7 +1511,7 @@ Camera3D *FBXDocument::_generate_camera(Ref p_state, const GLTFNodeInd ERR_FAIL_INDEX_V(fbx_node->camera, p_state->cameras.size(), nullptr); - print_verbose("FBX: Creating camera for: " + fbx_node->get_name()); + PRINT_VERBOSE("FBX: Creating camera for: " + fbx_node->get_name()); Ref c = p_state->cameras[fbx_node->camera]; return c->to_node(); @@ -1522,7 +1522,7 @@ Light3D *FBXDocument::_generate_light(Ref p_state, const GLTFNodeIndex ERR_FAIL_INDEX_V(fbx_node->light, p_state->lights.size(), nullptr); - print_verbose("FBX: Creating light for: " + fbx_node->get_name()); + PRINT_VERBOSE("FBX: Creating light for: " + fbx_node->get_name()); Ref l = p_state->lights[fbx_node->light]; Light3D *light = nullptr; @@ -1600,7 +1600,7 @@ Node3D *FBXDocument::_generate_spatial(Ref p_state, const GLTFNodeInde Ref fbx_node = p_state->nodes[p_node_index]; Node3D *spatial = memnew(Node3D); - print_verbose("FBX: Converting spatial: " + fbx_node->get_name()); + PRINT_VERBOSE("FBX: Converting spatial: " + fbx_node->get_name()); return spatial; } @@ -2336,7 +2336,7 @@ Error FBXDocument::_parse_lights(Ref p_state) { light->set_additional_data("GODOT_fbx_light", additional_data); p_state->lights.push_back(light); } - print_verbose("FBX: Total lights: " + itos(p_state->lights.size())); + PRINT_VERBOSE("FBX: Total lights: " + itos(p_state->lights.size())); return OK; } @@ -2439,7 +2439,7 @@ Error FBXDocument::_parse_skins(Ref p_state) { ERR_FAIL_COND_V(SkinTool::_verify_skin(p_state->nodes, skin), ERR_PARSE_ERROR); } - print_verbose("FBX: Total skins: " + itos(p_state->skins.size())); + PRINT_VERBOSE("FBX: Total skins: " + itos(p_state->skins.size())); for (HashMap::Iterator it = joint_mapping.begin(); it != joint_mapping.end(); ++it) { GLTFNodeIndex node_index = it->key; diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index 3d718b29fc16..8902b98cb4e6 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -2550,7 +2550,7 @@ struct GDScriptDepSort { void GDScriptLanguage::reload_all_scripts() { #ifdef DEBUG_ENABLED - print_verbose("GDScript: Reloading all scripts"); + PRINT_VERBOSE("GDScript: Reloading all scripts"); Array scripts; { MutexLock lock(mutex); @@ -2558,7 +2558,7 @@ void GDScriptLanguage::reload_all_scripts() { SelfList *elem = script_list.first(); while (elem) { if (elem->self()->get_path().is_resource_file()) { - print_verbose("GDScript: Found: " + elem->self()->get_path()); + PRINT_VERBOSE("GDScript: Found: " + elem->self()->get_path()); scripts.push_back(Ref(elem->self())); //cast to gdscript to avoid being erased by accident } elem = elem->next(); @@ -2659,7 +2659,7 @@ void GDScriptLanguage::reload_scripts(const Array &p_scripts, bool p_soft_reload for (KeyValue, HashMap>>> &E : to_reload) { Ref scr = E.key; - print_verbose("GDScript: Reloading: " + scr->get_path()); + PRINT_VERBOSE("GDScript: Reloading: " + scr->get_path()); if (scr->is_built_in()) { // TODO: It would be nice to do it more efficiently than loading the whole scene again. Ref scene = ResourceLoader::load(scr->get_path().get_slice("::", 0), "", ResourceFormatLoader::CACHE_MODE_IGNORE_DEEP); diff --git a/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp b/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp index 512f25a21684..cff7813d9857 100644 --- a/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp +++ b/modules/gltf/extensions/physics/gltf_document_extension_physics.cpp @@ -303,7 +303,7 @@ void _setup_shape_mesh_resource_from_index_if_needed(Ref p_state, Ref #ifndef DISABLE_DEPRECATED CollisionObject3D *_generate_shape_with_body(Ref p_state, Ref p_gltf_node, Ref p_physics_shape, Ref p_physics_body) { - print_verbose("glTF: Creating shape with body for: " + p_gltf_node->get_name()); + PRINT_VERBOSE("glTF: Creating shape with body for: " + p_gltf_node->get_name()); bool is_trigger = p_physics_shape->get_is_trigger(); // This method is used for the case where we must generate a parent body. // This is can happen for multiple reasons. One possibility is that this diff --git a/modules/gltf/gltf_document.cpp b/modules/gltf/gltf_document.cpp index bfd21891299e..bed8b076563c 100644 --- a/modules/gltf/gltf_document.cpp +++ b/modules/gltf/gltf_document.cpp @@ -709,7 +709,7 @@ static Vector _parse_base64_uri(const String &p_uri) { } Error GLTFDocument::_encode_buffer_glb(Ref p_state, const String &p_path) { - print_verbose("glTF: Total buffers: " + itos(p_state->buffers.size())); + PRINT_VERBOSE("glTF: Total buffers: " + itos(p_state->buffers.size())); if (p_state->buffers.is_empty()) { return OK; @@ -748,7 +748,7 @@ Error GLTFDocument::_encode_buffer_glb(Ref p_state, const String &p_p } Error GLTFDocument::_encode_buffer_bins(Ref p_state, const String &p_path) { - print_verbose("glTF: Total buffers: " + itos(p_state->buffers.size())); + PRINT_VERBOSE("glTF: Total buffers: " + itos(p_state->buffers.size())); if (p_state->buffers.is_empty()) { return OK; @@ -819,7 +819,7 @@ Error GLTFDocument::_parse_buffers(Ref p_state, const String &p_base_ } } - print_verbose("glTF: Total buffers: " + itos(p_state->buffers.size())); + PRINT_VERBOSE("glTF: Total buffers: " + itos(p_state->buffers.size())); return OK; } @@ -850,7 +850,7 @@ Error GLTFDocument::_encode_buffer_views(Ref p_state) { ERR_FAIL_COND_V(!d.has("byteLength"), ERR_INVALID_DATA); buffers.push_back(d); } - print_verbose("glTF: Total buffer views: " + itos(p_state->buffer_views.size())); + PRINT_VERBOSE("glTF: Total buffer views: " + itos(p_state->buffer_views.size())); if (!buffers.size()) { return OK; } @@ -891,7 +891,7 @@ Error GLTFDocument::_parse_buffer_views(Ref p_state) { p_state->buffer_views.push_back(buffer_view); } - print_verbose("glTF: Total buffer views: " + itos(p_state->buffer_views.size())); + PRINT_VERBOSE("glTF: Total buffer views: " + itos(p_state->buffer_views.size())); return OK; } @@ -947,7 +947,7 @@ Error GLTFDocument::_encode_accessors(Ref p_state) { } p_state->json["accessors"] = accessors; ERR_FAIL_COND_V(!p_state->json.has("accessors"), ERR_FILE_CORRUPT); - print_verbose("glTF: Total accessors: " + itos(p_state->accessors.size())); + PRINT_VERBOSE("glTF: Total accessors: " + itos(p_state->accessors.size())); return OK; } @@ -1074,7 +1074,7 @@ Error GLTFDocument::_parse_accessors(Ref p_state) { p_state->accessors.push_back(accessor); } - print_verbose("glTF: Total accessors: " + itos(p_state->accessors.size())); + PRINT_VERBOSE("glTF: Total accessors: " + itos(p_state->accessors.size())); return OK; } @@ -1159,9 +1159,9 @@ Error GLTFDocument::_encode_buffer_view(Ref p_state, const double *p_ stride += 4 - (stride % 4); //according to spec must be multiple of 4 } //use to debug - print_verbose("glTF: encoding accessor type " + _get_accessor_type_name(p_accessor_type) + " component type: " + _get_component_type_name(p_component_type) + " stride: " + itos(stride) + " amount " + itos(p_count)); + PRINT_VERBOSE("glTF: encoding accessor type " + _get_accessor_type_name(p_accessor_type) + " component type: " + _get_component_type_name(p_component_type) + " stride: " + itos(stride) + " amount " + itos(p_count)); - print_verbose("glTF: encoding accessor offset " + itos(p_byte_offset) + " view offset: " + itos(bv->byte_offset) + " total buffer len: " + itos(gltf_buffer.size()) + " view len " + itos(bv->byte_length)); + PRINT_VERBOSE("glTF: encoding accessor offset " + itos(p_byte_offset) + " view offset: " + itos(bv->byte_offset) + " total buffer len: " + itos(gltf_buffer.size()) + " view len " + itos(bv->byte_length)); const int buffer_end = (stride * (p_count - 1)) + component_size; // TODO define bv->byte_stride @@ -1428,8 +1428,8 @@ Error GLTFDocument::_decode_buffer_view(Ref p_state, double *p_dst, c const uint8_t *bufptr = buffer.ptr(); //use to debug - print_verbose("glTF: accessor type " + _get_accessor_type_name(p_accessor_type) + " component type: " + _get_component_type_name(p_component_type) + " stride: " + itos(stride) + " amount " + itos(p_count)); - print_verbose("glTF: accessor offset " + itos(p_byte_offset) + " view offset: " + itos(bv->byte_offset) + " total buffer len: " + itos(buffer.size()) + " view len " + itos(bv->byte_length)); + PRINT_VERBOSE("glTF: accessor type " + _get_accessor_type_name(p_accessor_type) + " component type: " + _get_component_type_name(p_component_type) + " stride: " + itos(stride) + " amount " + itos(p_count)); + PRINT_VERBOSE("glTF: accessor offset " + itos(p_byte_offset) + " view offset: " + itos(bv->byte_offset) + " total buffer len: " + itos(buffer.size()) + " view len " + itos(bv->byte_length)); const int buffer_end = (stride * (p_count - 1)) + p_element_size; ERR_FAIL_COND_V(buffer_end > bv->byte_length, ERR_PARSE_ERROR); @@ -2782,7 +2782,7 @@ GLTFAccessorIndex GLTFDocument::_encode_accessor_as_variant(Ref p_sta Error GLTFDocument::_serialize_meshes(Ref p_state) { Array meshes; for (GLTFMeshIndex gltf_mesh_i = 0; gltf_mesh_i < p_state->meshes.size(); gltf_mesh_i++) { - print_verbose("glTF: Serializing mesh: " + itos(gltf_mesh_i)); + PRINT_VERBOSE("glTF: Serializing mesh: " + itos(gltf_mesh_i)); Ref import_mesh = p_state->meshes.write[gltf_mesh_i]->get_mesh(); if (import_mesh.is_null()) { continue; @@ -3078,7 +3078,7 @@ Error GLTFDocument::_serialize_meshes(Ref p_state) { primitive["attributes"] = attributes; // Blend shapes - print_verbose("glTF: Mesh has targets"); + PRINT_VERBOSE("glTF: Mesh has targets"); if (import_mesh->get_blend_shape_count()) { ArrayMesh::BlendShapeMode shape_mode = import_mesh->get_blend_shape_mode(); const float normal_tangent_sparse_rounding = 0.001; @@ -3201,7 +3201,7 @@ Error GLTFDocument::_serialize_meshes(Ref p_state) { return OK; } p_state->json["meshes"] = meshes; - print_verbose("glTF: Total meshes: " + itos(meshes.size())); + PRINT_VERBOSE("glTF: Total meshes: " + itos(meshes.size())); return OK; } @@ -3213,7 +3213,7 @@ Error GLTFDocument::_parse_meshes(Ref p_state) { Array meshes = p_state->json["meshes"]; for (GLTFMeshIndex i = 0; i < meshes.size(); i++) { - print_verbose("glTF: Parsing mesh: " + itos(i)); + PRINT_VERBOSE("glTF: Parsing mesh: " + itos(i)); Dictionary mesh_dict = meshes[i]; Ref mesh; @@ -3573,7 +3573,7 @@ Error GLTFDocument::_parse_meshes(Ref p_state) { Array morphs; // Blend shapes if (mesh_prim.has("targets")) { - print_verbose("glTF: Mesh has targets"); + PRINT_VERBOSE("glTF: Mesh has targets"); const Array &targets = mesh_prim["targets"]; import_mesh->set_blend_shape_mode(Mesh::BLEND_SHAPE_MODE_NORMALIZED); @@ -3755,7 +3755,7 @@ Error GLTFDocument::_parse_meshes(Ref p_state) { p_state->meshes.push_back(mesh); } - print_verbose("glTF: Total meshes: " + itos(p_state->meshes.size())); + PRINT_VERBOSE("glTF: Total meshes: " + itos(p_state->meshes.size())); return OK; } @@ -3881,7 +3881,7 @@ Error GLTFDocument::_serialize_images(Ref p_state) { images.push_back(image_dict); } - print_verbose("Total images: " + itos(p_state->images.size())); + PRINT_VERBOSE("Total images: " + itos(p_state->images.size())); if (!images.size()) { return OK; @@ -4144,7 +4144,7 @@ Error GLTFDocument::_parse_images(Ref p_state, const String &p_base_p _parse_image_save_image(p_state, data, file_extension, i, img); } - print_verbose("glTF: Total images: " + itos(p_state->images.size())); + PRINT_VERBOSE("glTF: Total images: " + itos(p_state->images.size())); return OK; } @@ -4631,7 +4631,7 @@ Error GLTFDocument::_serialize_materials(Ref p_state) { return OK; } p_state->json["materials"] = materials; - print_verbose("Total materials: " + itos(p_state->materials.size())); + PRINT_VERBOSE("Total materials: " + itos(p_state->materials.size())); return OK; } @@ -4834,7 +4834,7 @@ Error GLTFDocument::_parse_materials(Ref p_state) { p_state->materials.push_back(material); } - print_verbose("Total materials: " + itos(p_state->materials.size())); + PRINT_VERBOSE("Total materials: " + itos(p_state->materials.size())); return OK; } @@ -4999,7 +4999,7 @@ Error GLTFDocument::_parse_skins(Ref p_state) { ERR_FAIL_COND_V(SkinTool::_verify_skin(p_state->nodes, skin), ERR_PARSE_ERROR); } - print_verbose("glTF: Total skins: " + itos(p_state->skins.size())); + PRINT_VERBOSE("glTF: Total skins: " + itos(p_state->skins.size())); return OK; } @@ -5124,7 +5124,7 @@ Error GLTFDocument::_serialize_lights(Ref p_state) { extensions["KHR_lights_punctual"] = lights_punctual; lights_punctual["lights"] = lights; - print_verbose("glTF: Total lights: " + itos(p_state->lights.size())); + PRINT_VERBOSE("glTF: Total lights: " + itos(p_state->lights.size())); return OK; } @@ -5142,7 +5142,7 @@ Error GLTFDocument::_serialize_cameras(Ref p_state) { p_state->json["cameras"] = cameras; - print_verbose("glTF: Total cameras: " + itos(p_state->cameras.size())); + PRINT_VERBOSE("glTF: Total cameras: " + itos(p_state->cameras.size())); return OK; } @@ -5170,7 +5170,7 @@ Error GLTFDocument::_parse_lights(Ref p_state) { p_state->lights.push_back(light); } - print_verbose("glTF: Total lights: " + itos(p_state->lights.size())); + PRINT_VERBOSE("glTF: Total lights: " + itos(p_state->lights.size())); return OK; } @@ -5186,7 +5186,7 @@ Error GLTFDocument::_parse_cameras(Ref p_state) { p_state->cameras.push_back(GLTFCamera::from_dictionary(cameras[i])); } - print_verbose("glTF: Total cameras: " + itos(p_state->cameras.size())); + PRINT_VERBOSE("glTF: Total cameras: " + itos(p_state->cameras.size())); return OK; } @@ -5413,7 +5413,7 @@ Error GLTFDocument::_serialize_animations(Ref p_state) { } p_state->json["animations"] = animations; - print_verbose("glTF: Total animations '" + itos(p_state->animations.size()) + "'."); + PRINT_VERBOSE("glTF: Total animations '" + itos(p_state->animations.size()) + "'."); return OK; } @@ -5559,7 +5559,7 @@ Error GLTFDocument::_parse_animations(Ref p_state) { p_state->animations.push_back(animation); } - print_verbose("glTF: Total animations '" + itos(p_state->animations.size()) + "'."); + PRINT_VERBOSE("glTF: Total animations '" + itos(p_state->animations.size()) + "'."); return OK; } @@ -5689,7 +5689,7 @@ BoneAttachment3D *GLTFDocument::_generate_bone_attachment(Ref p_state Ref gltf_node = p_state->nodes[p_node_index]; Ref bone_node = p_state->nodes[p_bone_index]; BoneAttachment3D *bone_attachment = memnew(BoneAttachment3D); - print_verbose("glTF: Creating bone attachment for: " + gltf_node->get_name()); + PRINT_VERBOSE("glTF: Creating bone attachment for: " + gltf_node->get_name()); ERR_FAIL_COND_V(!bone_node->joint, nullptr); @@ -5732,7 +5732,7 @@ ImporterMeshInstance3D *GLTFDocument::_generate_mesh_instance(Ref p_s ERR_FAIL_INDEX_V(gltf_node->mesh, p_state->meshes.size(), nullptr); ImporterMeshInstance3D *mi = memnew(ImporterMeshInstance3D); - print_verbose("glTF: Creating mesh for: " + gltf_node->get_name()); + PRINT_VERBOSE("glTF: Creating mesh for: " + gltf_node->get_name()); p_state->scene_mesh_instances.insert(p_node_index, mi); Ref mesh = p_state->meshes.write[gltf_node->mesh]; @@ -5753,7 +5753,7 @@ Light3D *GLTFDocument::_generate_light(Ref p_state, const GLTFNodeInd ERR_FAIL_INDEX_V(gltf_node->light, p_state->lights.size(), nullptr); - print_verbose("glTF: Creating light for: " + gltf_node->get_name()); + PRINT_VERBOSE("glTF: Creating light for: " + gltf_node->get_name()); Ref l = p_state->lights[gltf_node->light]; return l->to_node(); @@ -5764,14 +5764,14 @@ Camera3D *GLTFDocument::_generate_camera(Ref p_state, const GLTFNodeI ERR_FAIL_INDEX_V(gltf_node->camera, p_state->cameras.size(), nullptr); - print_verbose("glTF: Creating camera for: " + gltf_node->get_name()); + PRINT_VERBOSE("glTF: Creating camera for: " + gltf_node->get_name()); Ref c = p_state->cameras[gltf_node->camera]; return c->to_node(); } GLTFCameraIndex GLTFDocument::_convert_camera(Ref p_state, Camera3D *p_camera) { - print_verbose("glTF: Converting camera: " + p_camera->get_name()); + PRINT_VERBOSE("glTF: Converting camera: " + p_camera->get_name()); Ref c = GLTFCamera::from_node(p_camera); GLTFCameraIndex camera_index = p_state->cameras.size(); @@ -5780,7 +5780,7 @@ GLTFCameraIndex GLTFDocument::_convert_camera(Ref p_state, Camera3D * } GLTFLightIndex GLTFDocument::_convert_light(Ref p_state, Light3D *p_light) { - print_verbose("glTF: Converting light: " + p_light->get_name()); + PRINT_VERBOSE("glTF: Converting light: " + p_light->get_name()); Ref l = GLTFLight::from_node(p_light); @@ -5797,7 +5797,7 @@ Node3D *GLTFDocument::_generate_spatial(Ref p_state, const GLTFNodeIn Ref gltf_node = p_state->nodes[p_node_index]; Node3D *spatial = memnew(Node3D); - print_verbose("glTF: Converting spatial: " + gltf_node->get_name()); + PRINT_VERBOSE("glTF: Converting spatial: " + gltf_node->get_name()); return spatial; } diff --git a/modules/jolt_physics/jolt_globals.cpp b/modules/jolt_physics/jolt_globals.cpp index e3e9fb19d086..9a229a8bb3d1 100644 --- a/modules/jolt_physics/jolt_globals.cpp +++ b/modules/jolt_physics/jolt_globals.cpp @@ -72,7 +72,7 @@ void jolt_trace(const char *p_format, ...) { char buffer[1024] = { '\0' }; vsnprintf(buffer, sizeof(buffer), p_format, args); va_end(args); - print_verbose(buffer); + PRINT_VERBOSE(buffer); } bool jolt_assert(const char *p_expr, const char *p_msg, const char *p_file, uint32_t p_line) { diff --git a/modules/lightmapper_rd/lightmapper_rd.cpp b/modules/lightmapper_rd/lightmapper_rd.cpp index a6074012de75..d6331f095d17 100644 --- a/modules/lightmapper_rd/lightmapper_rd.cpp +++ b/modules/lightmapper_rd/lightmapper_rd.cpp @@ -927,7 +927,7 @@ LightmapperRD::BakeError LightmapperRD::_denoise_oidn(RenderingDevice *p_rd, RID if (err != OK || exitcode != 0) { da->remove(fname_out); - print_verbose(str); + PRINT_VERBOSE(str); ERR_FAIL_V_MSG(BAKE_ERROR_LIGHTMAP_CANT_PRE_BAKE_MESHES, vformat("OIDN denoiser failed, return code: %d", exitcode)); } diff --git a/modules/mbedtls/crypto_mbedtls.cpp b/modules/mbedtls/crypto_mbedtls.cpp index be7aaef9d457..ec46a9c3615b 100644 --- a/modules/mbedtls/crypto_mbedtls.cpp +++ b/modules/mbedtls/crypto_mbedtls.cpp @@ -172,7 +172,7 @@ Error X509CertificateMbedTLS::load(const String &p_path) { int ret = mbedtls_x509_crt_parse(&cert, out.ptr(), out.size()); ERR_FAIL_COND_V_MSG(ret < 0, FAILED, vformat("Error parsing X509 certificates from file '%s': %d.", p_path, ret)); if (ret > 0) { // Some certs parsed fine, don't error. - print_verbose(vformat("MbedTLS: Some X509 certificates could not be parsed from file '%s' (%d certificates skipped).", p_path, ret)); + PRINT_VERBOSE(vformat("MbedTLS: Some X509 certificates could not be parsed from file '%s' (%d certificates skipped).", p_path, ret)); } return OK; @@ -184,7 +184,7 @@ Error X509CertificateMbedTLS::load_from_memory(const uint8_t *p_buffer, int p_le int ret = mbedtls_x509_crt_parse(&cert, p_buffer, p_len); ERR_FAIL_COND_V_MSG(ret < 0, FAILED, vformat("Error parsing X509 certificates: %d.", ret)); if (ret > 0) { // Some certs parsed fine, don't error. - print_verbose(vformat("MbedTLS: Some X509 certificates could not be parsed (%d certificates skipped).", ret)); + PRINT_VERBOSE(vformat("MbedTLS: Some X509 certificates could not be parsed (%d certificates skipped).", ret)); } return OK; } @@ -234,7 +234,7 @@ Error X509CertificateMbedTLS::load_from_string(const String &p_string_key) { int ret = mbedtls_x509_crt_parse(&cert, (const unsigned char *)cs.get_data(), cs.size()); ERR_FAIL_COND_V_MSG(ret < 0, FAILED, vformat("Error parsing X509 certificates: %d.", ret)); if (ret > 0) { // Some certs parsed fine, don't error. - print_verbose(vformat("MbedTLS: Some X509 certificates could not be parsed (%d certificates skipped).", ret)); + PRINT_VERBOSE(vformat("MbedTLS: Some X509 certificates could not be parsed (%d certificates skipped).", ret)); } return OK; @@ -368,7 +368,7 @@ void CryptoMbedTLS::load_default_certificates(const String &p_path) { if (!system_certs.is_empty()) { CharString cs = system_certs.utf8(); default_certs->load_from_memory((const uint8_t *)cs.get_data(), cs.size()); - print_verbose("Loaded system CA certificates"); + PRINT_VERBOSE("Loaded system CA certificates"); } #ifdef BUILTIN_CERTS_ENABLED else { @@ -378,7 +378,7 @@ void CryptoMbedTLS::load_default_certificates(const String &p_path) { Compression::decompress(certs.ptrw(), _certs_uncompressed_size, _certs_compressed, _certs_compressed_size, Compression::MODE_DEFLATE); certs.write[_certs_uncompressed_size] = 0; // Make sure it ends with string terminator default_certs->load_from_memory(certs.ptr(), certs.size()); - print_verbose("Loaded builtin CA certificates"); + PRINT_VERBOSE("Loaded builtin CA certificates"); } #endif } diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index b908fe9df853..d9c341ee4ee1 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -102,7 +102,7 @@ String CSharpLanguage::get_extension() const { void CSharpLanguage::init() { #ifdef TOOLS_ENABLED if (OS::get_singleton()->get_cmdline_args().find("--generate-mono-glue")) { - print_verbose(".NET: Skipping runtime initialization because glue generation is enabled."); + PRINT_VERBOSE(".NET: Skipping runtime initialization because glue generation is enabled."); return; } #endif @@ -641,7 +641,7 @@ void CSharpLanguage::reload_assemblies(bool p_soft_reload) { return; } - print_verbose(".NET: Reloading assemblies..."); + PRINT_VERBOSE(".NET: Reloading assemblies..."); // There is no soft reloading with Mono. It's always hard reloading. @@ -2593,7 +2593,7 @@ Error CSharpScript::reload(bool p_keep_state) { if (valid) { #ifdef DEBUG_ENABLED - print_verbose("Found class for script " + get_path()); + PRINT_VERBOSE("Found class for script " + get_path()); #endif update_script_class_info(this); diff --git a/modules/mono/editor/code_completion.cpp b/modules/mono/editor/code_completion.cpp index 94222f3d67d1..f5bfa0263718 100644 --- a/modules/mono/editor/code_completion.cpp +++ b/modules/mono/editor/code_completion.cpp @@ -174,7 +174,7 @@ PackedStringArray get_code_completion(CompletionKind p_kind, const String &p_scr } } break; case CompletionKind::SHADER_PARAMS: { - print_verbose("Shader uniforms completion for C# is not implemented yet."); + PRINT_VERBOSE("Shader uniforms completion for C# is not implemented yet."); } break; case CompletionKind::SIGNALS: { Ref